cc.mallet.types
Class Label

java.lang.Object
  extended by cc.mallet.types.Label
All Implemented Interfaces:
AlphabetCarrying, Labeling, java.io.Serializable

public class Label
extends java.lang.Object
implements Labeling, java.io.Serializable, AlphabetCarrying

See Also:
Serialized Form

Constructor Summary
protected Label()
           
 
Method Summary
 void addTo(double[] weights)
           
 void addTo(double[] weights, double scale)
           
 int compareTo(java.lang.Object o)
           
 boolean equals(java.lang.Object l)
           
 Alphabet getAlphabet()
           
 Alphabet[] getAlphabets()
           
 int getBestIndex()
           
 Label getBestLabel()
           
 double getBestValue()
           
 java.lang.Object getEntry()
           
 int getIndex()
           
 LabelAlphabet getLabelAlphabet()
           
 Label getLabelAtRank(int rank)
           
 int getRank(int labelIndex)
           
 int getRank(Label label)
           
 double getValueAtRank(int rank)
           
 int indexAtLocation(int loc)
           
 Label labelAtLocation(int loc)
           
 int numLocations()
           
 LabelVector toLabelVector()
           
 java.lang.String toString()
           
 double value(int labelIndex)
           
 double value(Label label)
           
 double valueAtLocation(int loc)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Label

protected Label()
Method Detail

getLabelAlphabet

public LabelAlphabet getLabelAlphabet()
Specified by:
getLabelAlphabet in interface Labeling

getIndex

public int getIndex()

getAlphabet

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

getAlphabets

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

getEntry

public java.lang.Object getEntry()

toString

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

compareTo

public int compareTo(java.lang.Object o)

getBestLabel

public Label getBestLabel()
Specified by:
getBestLabel in interface Labeling

getBestIndex

public int getBestIndex()
Specified by:
getBestIndex in interface Labeling

getBestValue

public double getBestValue()
Specified by:
getBestValue in interface Labeling

value

public double value(Label label)
Specified by:
value in interface Labeling

value

public double value(int labelIndex)
Specified by:
value in interface Labeling

getRank

public int getRank(Label label)
Specified by:
getRank in interface Labeling

getRank

public int getRank(int labelIndex)
Specified by:
getRank in interface Labeling

getLabelAtRank

public Label getLabelAtRank(int rank)
Specified by:
getLabelAtRank in interface Labeling

getValueAtRank

public double getValueAtRank(int rank)
Specified by:
getValueAtRank in interface Labeling

addTo

public void addTo(double[] weights)
Specified by:
addTo in interface Labeling

addTo

public void addTo(double[] weights,
                  double scale)
Specified by:
addTo in interface Labeling

numLocations

public int numLocations()
Specified by:
numLocations in interface Labeling

labelAtLocation

public Label labelAtLocation(int loc)
Specified by:
labelAtLocation in interface Labeling

valueAtLocation

public double valueAtLocation(int loc)
Specified by:
valueAtLocation in interface Labeling

indexAtLocation

public int indexAtLocation(int loc)
Specified by:
indexAtLocation in interface Labeling

toLabelVector

public LabelVector toLabelVector()
Specified by:
toLabelVector in interface Labeling

equals

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