
Scale |
ptolemy.actor.lib.Scale |
Produce an output token on each firing with a value that is
equal to a scaled version of the input. The actor is polymorphic
in that it can support any token type that supports multiplication
by the factor parameter. If the input type is a scalar, the output
type is constrained to be at least as general as both the input and the
factor parameter; if the input is an array, the output is also
an array with the elements scaled. The input can be an array of array,
in which case the elements of the inner most array will be scaled.
For data types where multiplication is not commutative (such
as matrices), whether the factor is multiplied on the left is controlled
by the scaleOnLeft parameter. Setting the parameter to true means
that the factor is multiplied on the left, and the input
on the right. Otherwise, the factor is multiplied on the right.
Author(s): Edward A. Lee, Steve Neuendorffer
Version:$Id: Scale.java,v 1.57 2005/10/28 20:14:58 cxh Exp $
Pt.Proposed Rating:Yellow (eal)
Pt.Accepted Rating:Yellow (yuhong)
factor
The factor.
This parameter can contain any scalar token that supports
multiplication. The default value of this parameter is the
IntToken 1.
scaleOnLeft
Multiply on the left.
This parameter controls whether the scale factor is multiplied
on the left. The default value is a boolean token of value true.
Setting is to false will multiply the factor on the right.