Class SmoothToDouble

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

    public class SmoothToDouble
    extends Converter
    Convert a SmoothToken (one that has a double value and an array of derivatives) to a DoubleToken, discarding the derivative information. Normally, such a conversion is not necessary because any actor that can accept a DoubleToken can also transparently accept a SmoothToken. However, when an input port receives a SmoothToken, the port becomes persistent, meaning that it will always have a token. If an actor reads from this input port at a time when no SmoothToken has arrived, then the most recently received SmoothToken will be extrapolated, using its derivative information, to obtain a value at that time. If you wish for a downstream port to not be persistent, then you can use this actor to convert the signal. Downstream input ports will be absent at all times except those when an actual token is sent.
    Since:
    Ptolemy II 11.0
    Version:
    $Id$, $Id$
    Author:
    Thierry S. Nouidui, Christopher Brooks
    Pt.AcceptedRating:
    Red (thn)
    Pt.ProposedRating:
    Green (thn)