Slicer
ptolemy.actor.lib.comm.Slicer

The Slicer functions as a decoder of the LineCoder. The parameter <i>table</i> and <i>wordLength</i> has the same meaning as in LineCoder, except that the type of <i>table</i> is constrained to an ArrayToken of complex numbers. On each firing, the Slicer consumes one complex token from its input port and computes the Euclidean distance between the input data and the elements in the Slicer. The actor produces <i>wordLength</i> booleans on each firing. The values of these booleans correspond to the index of the entry that minimizes the distance. For example, if the first entry minimizes the distance, then all of these values are <i>false</i>. If the second entry minimizes the distance, then only the first boolean is true.

Author(s): Ye Zhou
Version:$Id: Slicer.doc.html,v 1.1 2006/02/22 18:42:26 mangal Exp $
Pt.Proposed Rating:Red (zhouye)
Pt.Accepted Rating:Red (cxh)




table
The code table. It is an array token of complex type. The number of values in this array must be at least 2<sup><i>wordLength</i></sup>, or an exception will be thrown. Its default value is {-1.0, 1.0}.
wordLength
The word length is the number of boolean output that are produced on each firing. Its value is an IntToken, with default value one.