Class ColtPoisson

  • All Implemented Interfaces:
    java.lang.Cloneable, Changeable, Debuggable, DebugListener, Derivable, ModelErrorHandler, MoMLExportable, Moveable, Nameable

    public class ColtPoisson
    extends ColtRandomSource
    An adapter class for ptolemy.actor.lib.colt.ColtPoisson. NOTE: Currently, random numbers produced by c code generated by this class differ from those produced by the ColtPoisson random generator.
    Since:
    Ptolemy II 10.0
    Version:
    $Id$
    Author:
    Christopher Brooks, based on codegen version by Teale Fristoe
    See Also:
    ColtPoisson
    Pt.AcceptedRating:
    Red (cxh)
    Pt.ProposedRating:
    Red (cxh)
    • Constructor Detail

      • ColtPoisson

        public ColtPoisson​(ColtPoisson actor)
        Constructor method for the ColtPoisson helper.
        Parameters:
        actor - the associated actor
    • Method Detail

      • generateInitializeCode

        public java.lang.String generateInitializeCode()
                                                throws IllegalActionException
        Generate the code for initializing the random number generator with the seed, if it has been given. A seed of zero is interpreted to mean that no seed is specified. In such cases, a seed based on the current time and this instance of a ColtRandomSource is used to be fairly sure that two identical sequences will not be returned.
        Overrides:
        generateInitializeCode in class ColtRandomSource
        Returns:
        The initialize code of this actor.
        Throws:
        IllegalActionException - Not thrown in this class.
      • getHeaderFiles

        public java.util.Set getHeaderFiles()
                                     throws IllegalActionException
        Get the files needed by the code generated for the ColtPoisson actor.
        Overrides:
        getHeaderFiles in class ColtRandomSource
        Returns:
        A set of Strings that are names of the files needed by the code generated for the ColtPoisson actor.
        Throws:
        IllegalActionException - Not Thrown in this subclass.