Package cc.mallet.fst.semi_supervised.pr
Class CachedDotTransitionIterator
- java.lang.Object
-
- cc.mallet.fst.Transducer.TransitionIterator
-
- cc.mallet.fst.semi_supervised.pr.CachedDotTransitionIterator
-
- All Implemented Interfaces:
java.io.Serializable
,java.util.Iterator<Transducer.State>
public class CachedDotTransitionIterator extends Transducer.TransitionIterator
TransitionIterator that caches dot products.- Author:
- Gregory Druck
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected double[]
weights
-
Constructor Summary
Constructors Modifier Constructor Description CachedDotTransitionIterator(CRF.State source, Sequence inputSeq, int inputPosition, java.lang.String output, double[] dots)
protected
CachedDotTransitionIterator(CRF.State source, java.lang.Object fv, java.lang.String output, double[] dots)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Transducer.State
getDestinationState()
The state we are in after taking this transition.int
getIndex()
An implementation-specific index for this transition object, can be used to index into arrays of per-transition parameters.java.lang.Object
getInput()
The input symbol or object appearing on this transition.java.lang.Object
getOutput()
The output symbol or object appearing on this transition.Transducer.State
getSourceState()
The state we were in before taking this transition.double
getWeight()
The weight (between infinity and -infinity) associated with taking this transition with this input/output.boolean
hasNext()
Transducer.State
nextState()
-
Methods inherited from class cc.mallet.fst.Transducer.TransitionIterator
describeTransition, getInputPositionIncrement, getOutputPositionIncrement, getTransducer, next, numberNext, remove
-
-
-
-
Constructor Detail
-
CachedDotTransitionIterator
public CachedDotTransitionIterator(CRF.State source, Sequence inputSeq, int inputPosition, java.lang.String output, double[] dots)
-
CachedDotTransitionIterator
protected CachedDotTransitionIterator(CRF.State source, java.lang.Object fv, java.lang.String output, double[] dots)
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfacejava.util.Iterator<Transducer.State>
- Specified by:
hasNext
in classTransducer.TransitionIterator
-
nextState
public Transducer.State nextState()
- Specified by:
nextState
in classTransducer.TransitionIterator
-
getIndex
public final int getIndex()
Description copied from class:Transducer.TransitionIterator
An implementation-specific index for this transition object, can be used to index into arrays of per-transition parameters.- Specified by:
getIndex
in classTransducer.TransitionIterator
-
getInput
public final java.lang.Object getInput()
Description copied from class:Transducer.TransitionIterator
The input symbol or object appearing on this transition.- Specified by:
getInput
in classTransducer.TransitionIterator
-
getOutput
public final java.lang.Object getOutput()
Description copied from class:Transducer.TransitionIterator
The output symbol or object appearing on this transition.- Specified by:
getOutput
in classTransducer.TransitionIterator
-
getWeight
public final double getWeight()
Description copied from class:Transducer.TransitionIterator
The weight (between infinity and -infinity) associated with taking this transition with this input/output.- Specified by:
getWeight
in classTransducer.TransitionIterator
-
getSourceState
public final Transducer.State getSourceState()
Description copied from class:Transducer.TransitionIterator
The state we were in before taking this transition.- Specified by:
getSourceState
in classTransducer.TransitionIterator
-
getDestinationState
public final Transducer.State getDestinationState()
Description copied from class:Transducer.TransitionIterator
The state we are in after taking this transition.- Specified by:
getDestinationState
in classTransducer.TransitionIterator
-
-