cc.mallet.grmm.types
Class Variable
java.lang.Object
cc.mallet.grmm.types.Variable
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable
public class Variable
- extends java.lang.Object
- implements java.lang.Comparable, java.io.Serializable
Class for a discrete random variable in a graphical model.
Created: Thu Sep 18 09:32:25 2003
- Version:
- $Id: Variable.java,v 1.1 2007/10/22 21:37:44 mccallum Exp $
- Author:
- Charles Sutton
- See Also:
- Serialized Form
Field Summary |
static int |
CONTINUOUS
Number of outcomes for a continous variable. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
CONTINUOUS
public static final int CONTINUOUS
- Number of outcomes for a continous variable.
- See Also:
- Constant Field Values
Variable
public Variable(LabelAlphabet outs)
- Creates a new variable with the given outcomes.
Variable
public Variable(Universe universe,
LabelAlphabet outs)
Variable
public Variable(int numOutcomes)
Variable
public Variable(Universe universe,
int numOutcomes)
getLabel
public java.lang.String getLabel()
setLabel
public void setLabel(java.lang.String label)
getNumOutcomes
public int getNumOutcomes()
lookupOutcome
public java.lang.Object lookupOutcome(int i)
getLabelAlphabet
public LabelAlphabet getLabelAlphabet()
compareTo
public int compareTo(java.lang.Object o)
- Specified by:
compareTo
in interface java.lang.Comparable
setNumericProperty
public void setNumericProperty(java.lang.String key,
double value)
getNumericProperty
public double getNumericProperty(java.lang.String key)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
getIndex
public int getIndex()
- Returns the index of this variable in its universe
getUniverse
public Universe getUniverse()
isContinuous
public boolean isContinuous()