Package edu.cmu.tetrad.data
Interface Variable
- All Superinterfaces:
Comparable<Node>
,Node
,Serializable
,TetradSerializable
- All Known Implementing Classes:
AbstractVariable
,ContinuousVariable
,DiscreteVariable
Interface implemented by classes, instantiations of which are capable of serving as variables for columns in a
DataSet. Such a class provides needed details as to how the data in its column are to be interpreted. In particular,
a variable has a name and specifies a value in the column that is to be interpreted as a missing datum. The variable
also specifies how external data (in String form, say) is to be converted into raw data of the type used in the
column in question.
- Version:
- $Id: $Id
- Author:
- josephramsey
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final long
Required serial version UID for serialization. -
Method Summary
Modifier and TypeMethodDescriptionboolean
checkValue
(Object value) Checks to see whether the passed value can be converted into a value for this variable.Returns the name of the variable.boolean
isMissingValue
(Object value) Tests whether the given value is the missing data marker.Methods inherited from interface edu.cmu.tetrad.graph.Node
addAttribute, addPropertyChangeListener, compareTo, equals, getAllAttributes, getAttribute, getCenterX, getCenterY, getName, getNodeType, getNodeVariableType, getSelectionBias, hashCode, like, removeAttribute, setCenter, setCenterX, setCenterY, setName, setNodeType, setNodeVariableType, setSelectionBias, toString
-
Field Details
-
serialVersionUID
static final long serialVersionUIDRequired serial version UID for serialization. Must be 23L.- See Also:
-
-
Method Details
-
getMissingValueMarker
Object getMissingValueMarker()Returns the name of the variable.- Returns:
- the missing value marker as an object--i.e. a double if continuous, an Integer if discrete, etc.
-
isMissingValue
Tests whether the given value is the missing data marker.- Parameters:
value
- The object value one wants to check as a missing value.- Returns:
- true iff the given object is equals to
getMissingValueMarker()
.
-
checkValue
Checks to see whether the passed value can be converted into a value for this variable.- Parameters:
value
- The object value to be checked. For instance, for a continuous variable, this would be a Double, for a discrete variable, and Integer, etc.- Returns:
- true iff the object is a valid value for this variable.
-