Package 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
Constructors Modifier Constructor Description protectedLabel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddTo(double[] weights)voidaddTo(double[] weights, double scale)intcompareTo(java.lang.Object o)booleanequals(java.lang.Object l)AlphabetgetAlphabet()Alphabet[]getAlphabets()intgetBestIndex()LabelgetBestLabel()doublegetBestValue()java.lang.ObjectgetEntry()intgetIndex()LabelAlphabetgetLabelAlphabet()LabelgetLabelAtRank(int rank)intgetRank(int labelIndex)intgetRank(Label label)doublegetValueAtRank(int rank)intindexAtLocation(int loc)LabellabelAtLocation(int loc)intnumLocations()LabelVectortoLabelVector()java.lang.StringtoString()doublevalue(int labelIndex)doublevalue(Label label)doublevalueAtLocation(int loc)
-
-
-
Method Detail
-
getLabelAlphabet
public LabelAlphabet getLabelAlphabet()
- Specified by:
getLabelAlphabetin interfaceLabeling
-
getIndex
public int getIndex()
-
getAlphabet
public Alphabet getAlphabet()
- Specified by:
getAlphabetin interfaceAlphabetCarrying
-
getAlphabets
public Alphabet[] getAlphabets()
- Specified by:
getAlphabetsin interfaceAlphabetCarrying
-
getEntry
public java.lang.Object getEntry()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
compareTo
public int compareTo(java.lang.Object o)
-
getBestLabel
public Label getBestLabel()
- Specified by:
getBestLabelin interfaceLabeling
-
getBestIndex
public int getBestIndex()
- Specified by:
getBestIndexin interfaceLabeling
-
getBestValue
public double getBestValue()
- Specified by:
getBestValuein interfaceLabeling
-
getLabelAtRank
public Label getLabelAtRank(int rank)
- Specified by:
getLabelAtRankin interfaceLabeling
-
getValueAtRank
public double getValueAtRank(int rank)
- Specified by:
getValueAtRankin interfaceLabeling
-
numLocations
public int numLocations()
- Specified by:
numLocationsin interfaceLabeling
-
labelAtLocation
public Label labelAtLocation(int loc)
- Specified by:
labelAtLocationin interfaceLabeling
-
valueAtLocation
public double valueAtLocation(int loc)
- Specified by:
valueAtLocationin interfaceLabeling
-
indexAtLocation
public int indexAtLocation(int loc)
- Specified by:
indexAtLocationin interfaceLabeling
-
toLabelVector
public LabelVector toLabelVector()
- Specified by:
toLabelVectorin interfaceLabeling
-
equals
public boolean equals(java.lang.Object l)
- Overrides:
equalsin classjava.lang.Object
-
-