cc.mallet.types
Class Label
java.lang.Object
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()
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Label
protected Label()
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