Class UnaryMathFunction

  • All Implemented Interfaces:
    java.lang.Cloneable, Actor, Executable, FiringsRecordable, Initializable, TypedActor, Changeable, Debuggable, DebugListener, Derivable, Instantiable, ModelErrorHandler, MoMLExportable, Moveable, Nameable

    public class UnaryMathFunction
    extends Transformer
    Produce an output token on each firing with a value that is equal to the specified math function of the input. The input and output types are DoubleToken. The functions are a subset of those in the java.lang.Math class. They are:
    • exp: The exponential function. This is the default function for this actor If the argument is NaN, then the result is NaN.
    • log: The natural logarithm function. If the argument is NaN, then the result is NaN.
    • sign: If the argument is greater than 0, return 1.0, if it is less than 0, return -1.0, otherwise return 0.0.
    • square: The square function If the argument is NaN, then the result is NaN.
    • sqrt: The square root function. If the argument is NaN, then the result is NaN.

    Since:
    Ptolemy II 4.1
    Version:
    $Id$
    Author:
    C. Fong, Steve Neuendorffer
    See Also:
    AbsoluteValue, Remainder, Scale, TrigFunction
    Pt.AcceptedRating:
    Red (neuendor)
    Pt.ProposedRating:
    Yellow (neuendor)