## org.biojava.bio.dp
Class SimpleEmissionState

    java.lang.Object
      |
      +--org.biojava.bio.dp.SimpleEmissionState

Direct Known Subclasses:
  MagicalState

public class SimpleEmissionState
extends java.lang.Object
implements EmissionState, java.io.Serializable

See Also:
  Serialized Form

Constructor Summary
`SimpleEmissionState(java.lang.String name, Annotation ann, int[] advance, Distribution dis)`

Method Summary
`int[]` `getAdvance()` Determine the number of symbols this state advances along one or more symbol lists.
`Annotation` `getAnnotation()` Should return the associated annotation object.
`Distribution` `getDistribution()` Get the Distribution associated with this state.
`Alphabet` `getMatches()` Return an alphabet containing only this symbol.
`java.lang.String` `getName()` The long name for the symbol.
`char` `getToken()` The token for the symbol.
`void` `registerWithTrainer(ModelTrainer trainer)` Perform any registration that is necisary with mt.
`void` `setAdvance(int[] advance)`
`void` `setAnnotation(Annotation ann)`
`void` `setDistribution(Distribution dis)` Set the Distribution associated with this state.
`void` `setName(java.lang.String name)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SimpleEmissionState

    public SimpleEmissionState(java.lang.String name,
                               Annotation ann,
                               int[] advance,
                               Distribution dis)

Method Detail

### getAnnotation

    public final Annotation getAnnotation()

  Description copied from interface: Annotatable
  Should return the associated annotation object.
  Tags copied from interface: Annotatable
  Returns:
    an Annotation object, never null

### setAnnotation

    public final void setAnnotation(Annotation ann)

### getDistribution

    public final Distribution getDistribution()

  Description copied from interface: EmissionState
  Get the Distribution associated with this state.

  If the state is to be added to an HMM, then the state's emission spectrum must be compatible with the HMM - that is, their emission alphabets must match.

  Specified by:
    getDistribution in interface EmissionState
  Tags copied from interface: EmissionState
  Returns:
    the current Distribution object used by this state

### setDistribution

    public final void setDistribution(Distribution dis)

  Description copied from interface: EmissionState
  Set the Distribution associated with this state.
  Specified by:
    setDistribution in interface EmissionState
  Tags copied from interface: EmissionState
  Parameters:
    `dis` - the new Distribution to use

### getAdvance

    public int[] getAdvance()

  Description copied from interface: EmissionState
  Determine the number of symbols this state advances along one or more symbol lists. In the simple case, this method should almost always return {1} if it is a true `emmision' state, or {0} if it is a dot state which only emits a gap character. For pairwise HMMs, it will normally return {1, 1} for match state, and {0, 1} or {1, 0} for a gap state. Under some circumstances it may be valid to return values other than 1 or 0, but you should consider the consequences for HMM architecture very carefully.

  Note that the int array returned by this method should never be modified.

  Specified by:
    getAdvance in interface EmissionState

### setAdvance

    public void setAdvance(int[] advance)

### getToken

    public char getToken()

  Description copied from interface: Symbol
  The token for the symbol.
  Tags copied from interface: Symbol
  Returns:
    the token

### getName

    public final java.lang.String getName()

  Description copied from interface: Symbol
  The long name for the symbol.
  Tags copied from interface: Symbol
  Returns:
    the long name

### setName

    public final void setName(java.lang.String name)

### getMatches

    public Alphabet getMatches()

  Description copied from interface: AtomicSymbol
  Return an alphabet containing only this symbol.
  Tags copied from interface: Symbol
  Returns:
    the Alphabet of symbols matched by this symbol

### registerWithTrainer

    public void registerWithTrainer(ModelTrainer trainer)

  Description copied from interface: Trainable
  Perform any registration that is necisary with mt.

  This may include registering handelers for transition or emission counts, or registering other Trainable objects with the ModelTrainer.

  Tags copied from interface: Trainable
  Parameters:
    `mt` - the ModelTrainer that encapsulates the training environment
  Returns:
    a StateTrainer