cc.mallet.types
Class FeatureVectorSequence

java.lang.Object
  extended by cc.mallet.types.FeatureVectorSequence
All Implemented Interfaces:
AlphabetCarrying, Sequence<FeatureVector>, java.io.Serializable
Direct Known Subclasses:
StringEditFeatureVectorSequence

public class FeatureVectorSequence
extends java.lang.Object
implements Sequence<FeatureVector>, java.io.Serializable, AlphabetCarrying

See Also:
Serialized Form

Nested Class Summary
 class FeatureVectorSequence.Iterator
          An iterator over the FeatureVectors in the sequence.
 
Constructor Summary
FeatureVectorSequence(Alphabet dict, TokenSequence tokens)
           
FeatureVectorSequence(Alphabet dict, TokenSequence tokens, boolean binary, boolean augmentable)
           
FeatureVectorSequence(Alphabet dict, TokenSequence tokens, boolean binary, boolean augmentable, boolean growAlphabet)
           
FeatureVectorSequence(FeatureVector[] featureVectors)
           
 
Method Summary
 double dotProduct(int sequencePosition, Matrix2 weights, int weightRowIndex)
           
 double dotProduct(int sequencePosition, Vector weights)
           
 FeatureVector get(int i)
           
 Alphabet getAlphabet()
           
 Alphabet[] getAlphabets()
           
 FeatureVector getFeatureVector(int i)
           
 FeatureVectorSequence.Iterator iterator()
           
 int size()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FeatureVectorSequence

public FeatureVectorSequence(FeatureVector[] featureVectors)

FeatureVectorSequence

public FeatureVectorSequence(Alphabet dict,
                             TokenSequence tokens,
                             boolean binary,
                             boolean augmentable,
                             boolean growAlphabet)

FeatureVectorSequence

public FeatureVectorSequence(Alphabet dict,
                             TokenSequence tokens,
                             boolean binary,
                             boolean augmentable)

FeatureVectorSequence

public FeatureVectorSequence(Alphabet dict,
                             TokenSequence tokens)
Method Detail

getAlphabet

public Alphabet getAlphabet()
Specified by:
getAlphabet in interface AlphabetCarrying

getAlphabets

public Alphabet[] getAlphabets()
Specified by:
getAlphabets in interface AlphabetCarrying

size

public int size()
Specified by:
size in interface Sequence<FeatureVector>

get

public FeatureVector get(int i)
Specified by:
get in interface Sequence<FeatureVector>

getFeatureVector

public FeatureVector getFeatureVector(int i)

dotProduct

public double dotProduct(int sequencePosition,
                         Matrix2 weights,
                         int weightRowIndex)

dotProduct

public double dotProduct(int sequencePosition,
                         Vector weights)

iterator

public FeatureVectorSequence.Iterator iterator()

toString

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