Class FactorOracleGenerator

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

    public class FactorOracleGenerator
    extends TypedAtomicActor
    A Factor Oracle (FO) builder from an input sequence. Given an input of type String, recognizes a set of alphabet by recognizing the distinct characters in the symbol and builds a factor oracle data structure.

    In the future, this actor will be replaced by an on-line algorithm which adds to the data structure as more symbols are received at the input and the string requirement will be replaced by a music sequence specification.

    This actor builds a factor oracle data structure that represents a finite acyclic automaton that contains at least all the suffixes of a given input sequence.

    Since:
    Ptolemy II 10.0
    Version:
    $Id$
    Author:
    Ilge Akkaya
    Pt.AcceptedRating:
    Red (cxh)
    Pt.ProposedRating:
    Red (ilgea)
    • Field Detail

      • noteSequence

        public TypedIOPort noteSequence
        The ordered note sequence consisting of Note objects.
      • repetitionProbability

        public PortParameter repetitionProbability
        The repetition probability of the forward links in the Factor Oracle.
      • usePitchSpecs

        public Parameter usePitchSpecs
        Parameter indicating whether to check pitch specifications.
      • pitchMoML

        public TypedIOPort pitchMoML
        The pitch oracle in MoML format.
      • durationMoML

        public TypedIOPort durationMoML
        The duration oracle in MoML format.
    • Method Detail

      • attributeChanged

        public void attributeChanged​(Attribute attribute)
                              throws IllegalActionException
        Description copied from class: NamedObj
        React to a change in an attribute. This method is called by a contained attribute when its value changes. In this base class, the method does nothing. In derived classes, this method may throw an exception, indicating that the new attribute value is invalid. It is up to the caller to restore the attribute to a valid value if an exception is thrown.
        Overrides:
        attributeChanged in class NamedObj
        Parameters:
        attribute - The attribute that changed.
        Throws:
        IllegalActionException - If the change is not acceptable to this container (not thrown in this base class).
      • reset

        public void reset()
        Reset the factor oracle generator by discarding cached data.
      • wrapup

        public void wrapup()
                    throws IllegalActionException
        Description copied from class: AtomicActor
        Do nothing except invoke the wrapup() methods of any objects that have been registered with addInitializable(). Derived classes override this method to define operations to be performed exactly once at the end of a complete execution of an application. It typically closes files, displays final results, etc.
        Specified by:
        wrapup in interface Initializable
        Overrides:
        wrapup in class AtomicActor<TypedIOPort>
        Throws:
        IllegalActionException - Not thrown in this base class.
      • _getTransitionsFrom

        protected java.util.List<java.lang.Integer> _getTransitionsFrom​(java.lang.Integer node)
        Get a list of transitions originating from node.
        Parameters:
        node - Node index
        Returns:
        a List of states which can be reached from current node