Sautrela

edu.gtts.sautrela.wfsa.models
Class DefaultTransition<S extends State,Y extends Symbol>

java.lang.Object
  extended by edu.gtts.sautrela.wfsa.models.DefaultTransition<S,Y>
All Implemented Interfaces:
Transition<S,Y>, java.lang.Comparable<Transition<S,Y>>
Direct Known Subclasses:
LMM.xTransition

public class DefaultTransition<S extends State,Y extends Symbol>
extends java.lang.Object
implements Transition<S,Y>

Author:
mpenagar

Constructor Summary
DefaultTransition(S source, Y symbol, S destination, double prob)
          Creates a new instance of DefaultTransition
 
Method Summary
 int compareTo(Transition<S,Y> t)
          Inverse probability order is used when comparing two transitions.
 boolean equals(java.lang.Object o)
           
 S getDestination()
          Returns the destination State of this transition
 java.lang.String getName()
          Returns the name of this transition.
 double getProbability()
          Returns the logProb of this transition
 S getSource()
          Returns the source State of this transition
 Y getSymbol()
          Returns the emitted Symbol of this transition
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultTransition

public DefaultTransition(S source,
                         Y symbol,
                         S destination,
                         double prob)
Creates a new instance of DefaultTransition

Method Detail

getSource

public S getSource()
Description copied from interface: Transition
Returns the source State of this transition

Specified by:
getSource in interface Transition<S extends State,Y extends Symbol>
Returns:
the source State of this transition

getDestination

public S getDestination()
Description copied from interface: Transition
Returns the destination State of this transition

Specified by:
getDestination in interface Transition<S extends State,Y extends Symbol>
Returns:
the destination State of this transition

getSymbol

public Y getSymbol()
Description copied from interface: Transition
Returns the emitted Symbol of this transition

Specified by:
getSymbol in interface Transition<S extends State,Y extends Symbol>
Returns:
the emitted Symbol of this transition

getProbability

public double getProbability()
Description copied from interface: Transition
Returns the logProb of this transition

Specified by:
getProbability in interface Transition<S extends State,Y extends Symbol>
Returns:
the logProb of this transition

getName

public java.lang.String getName()
Description copied from interface: Transition
Returns the name of this transition. The name of a transition will be used at decoding stage

Specified by:
getName in interface Transition<S extends State,Y extends Symbol>
Returns:
the name of this transition

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

compareTo

public int compareTo(Transition<S,Y> t)
Inverse probability order is used when comparing two transitions. This is usefull to create descending probability sorted sets (the most probable transition is the first and the less probable is the last).

Specified by:
compareTo in interface java.lang.Comparable<Transition<S extends State,Y extends Symbol>>

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

Sautrela