
ApplyFilterOverArray |
ptolemy.actor.lib.hoc.ApplyFilterOverArray |
This is an atomic actor that filter an array received at its
<i>inputArray</i> input port via applying a model specified by a
file or URL. The specified model evaluated on each input array
element should return a boolean value and the output is an array
that only contains elements satisfying the specified model (the
evaluated result is true).
<p> Instead of output all the satisfied elements in the input
array, the parameter <i>maxOutputLength</i> can be used to specify
how many elements this actor should only output. If the specified
length is larger than the number of satisfied elements, it will
ignore the specified length and only output all the satisfied
elements.
<p>
FIXME: what should be the correct behavior if no enough elements to output?
<p>
FIXME: make a convention, say when the maxOutputLength is -1, for output
all the satisfied elements?
FIXME: should add a ModelToken and an input port for receiving the filter
model. Create a composite actor for providing a ModelToken from its inside
model.
<P>
Author(s): Yang Zhao, Ilkay Altintas
Version:$Id: ApplyFilterOverArray.doc.html,v 1.1 2006/02/22 18:40:26 mangal Exp $
Pt.Proposed Rating:Yellow (ellen_zh)
Pt.Accepted Rating:Red (ellen_zh)
inputArray
The input port for an input array. It is an ArrayType.
outputArray
The output port for output the filtered array. It has the same
type as the inputArray port.
maxOutputLength
The max amount of elements in the output array.
modelFileOrURL
The file name or URL of the filter model.