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 protected
Label()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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)
-
-
-
Method Detail
-
getLabelAlphabet
public LabelAlphabet getLabelAlphabet()
- Specified by:
getLabelAlphabet
in interfaceLabeling
-
getIndex
public int getIndex()
-
getAlphabet
public Alphabet getAlphabet()
- Specified by:
getAlphabet
in interfaceAlphabetCarrying
-
getAlphabets
public Alphabet[] getAlphabets()
- Specified by:
getAlphabets
in interfaceAlphabetCarrying
-
getEntry
public java.lang.Object getEntry()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
compareTo
public int compareTo(java.lang.Object o)
-
getBestLabel
public Label getBestLabel()
- Specified by:
getBestLabel
in interfaceLabeling
-
getBestIndex
public int getBestIndex()
- Specified by:
getBestIndex
in interfaceLabeling
-
getBestValue
public double getBestValue()
- Specified by:
getBestValue
in interfaceLabeling
-
getLabelAtRank
public Label getLabelAtRank(int rank)
- Specified by:
getLabelAtRank
in interfaceLabeling
-
getValueAtRank
public double getValueAtRank(int rank)
- Specified by:
getValueAtRank
in interfaceLabeling
-
numLocations
public int numLocations()
- Specified by:
numLocations
in interfaceLabeling
-
labelAtLocation
public Label labelAtLocation(int loc)
- Specified by:
labelAtLocation
in interfaceLabeling
-
valueAtLocation
public double valueAtLocation(int loc)
- Specified by:
valueAtLocation
in interfaceLabeling
-
indexAtLocation
public int indexAtLocation(int loc)
- Specified by:
indexAtLocation
in interfaceLabeling
-
toLabelVector
public LabelVector toLabelVector()
- Specified by:
toLabelVector
in interfaceLabeling
-
equals
public boolean equals(java.lang.Object l)
- Overrides:
equals
in classjava.lang.Object
-
-