Class DiscreteVariable

java.lang.Object
edu.cmu.tetrad.data.AbstractVariable
edu.cmu.tetrad.data.DiscreteVariable
All Implemented Interfaces:
Variable, Node, TetradSerializable, Serializable, Comparable<Node>

public final class DiscreteVariable extends AbstractVariable implements Node

Represents a discrete variable as a range of integer-valued categories 0, 1, ..., m - 1, where m is the number of categories for the variable. These integer-valued categories may be associated with categories that may be explicitly set. Categories that are not explicitly set take the are set to DataUtils.defaultCategory(i) for category i.

Instances of this class may currently be used only to represent nominal discrete variables. Support for ordinal discrete variables may be added in the future.

Like other variable classes, DiscreteVariable implements the Node interface. The purpose of this is to allow variables to serve as nodes in graphs.

The index value used to indicate missing data is -99.

Version:
$Id: $Id
Author:
josephramsey
See Also: