edu.umass.cs.mallet.base.types
Class Label
java.lang.Object
edu.umass.cs.mallet.base.types.Label
- All Implemented Interfaces:
- Labeling, java.io.Serializable
- public class Label
- extends java.lang.Object
- implements Labeling, java.io.Serializable
- 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()
getEntry
public java.lang.Object getEntry()
toString
public java.lang.String toString()
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)