Package edu.cmu.tetrad.data
Class ContinuousVariable
java.lang.Object
edu.cmu.tetrad.data.AbstractVariable
edu.cmu.tetrad.data.ContinuousVariable
- All Implemented Interfaces:
- Variable,- Node,- TetradSerializable,- Serializable,- Comparable<Node>
Represents a real-valued variable. The values are doubles, and the default
 missing value marker for is Double.NaN.
- Author:
- Willie Wheeler 07/99, Joseph Ramsey modifications 12/00
- See Also:
- 
Field SummaryFields inherited from class edu.cmu.tetrad.data.AbstractVariableLAST_ID
- 
Constructor SummaryConstructorsConstructorDescriptionContinuousVariable(ContinuousVariable variable) Copy constructor.ContinuousVariable(String name) Constructs a new continuous variable with the given name.
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddAttribute(String key, Object value) voidAdds a property change listener.booleancheckValue(Object value) Checks the value to make sure it's a legitimate value for this column.booleanTwo continuous variables are equal if they have the same name and the same missing value marker.getAttribute(String key) intintstatic doubleinthashCode()static booleanisDoubleMissingValue(double value) Determines whether the argument is equal to the missing value marker.booleanisMissingValue(Object value) Determines whether the argument is equal to the missing value marker.Creates a new node of the same type as this one with the given name.voidremoveAttribute(String key) static ContinuousVariableGenerates a simple exemplar of this class to test serialization.voidsetCenter(int centerX, int centerY) Sets the (x, y) coordinates of the center of this node.voidsetCenterX(int centerX) Sets the x coordinate of the center of this node.voidsetCenterY(int centerY) Sets the y coordinate of the center of this node.voidsetNodeType(NodeType nodeType) Sets the node type for this node.voidsetNodeVariableType(NodeVariableType nodeVariableType) Sets the type (domain, interventional status, interventional value..) for this node variableMethods inherited from class edu.cmu.tetrad.data.AbstractVariablecompareTo, getName, setName, toString
- 
Constructor Details- 
ContinuousVariableConstructs a new continuous variable with the given name.- Parameters:
- name- the name of the variable.
 
- 
ContinuousVariableCopy constructor.
 
- 
- 
Method Details- 
serializableInstanceGenerates a simple exemplar of this class to test serialization.
- 
checkValueChecks the value to make sure it's a legitimate value for this column.- Specified by:
- checkValuein interface- Variable
- Overrides:
- checkValuein class- AbstractVariable
- Parameters:
- value- the value to check.
- Returns:
- true iff the value is legitimate.
 
- 
likeDescription copied from interface:NodeCreates a new node of the same type as this one with the given name.- Specified by:
- likein interface- Node
- Specified by:
- likein class- AbstractVariable
 
- 
getMissingValueMarker- Specified by:
- getMissingValueMarkerin interface- Variable
- Specified by:
- getMissingValueMarkerin class- AbstractVariable
- Returns:
- the missing value marker, wrapped as a Double.
 
- 
getDoubleMissingValuepublic static double getDoubleMissingValue()- Returns:
- the missing value marker.
 
- 
isDoubleMissingValuepublic static boolean isDoubleMissingValue(double value) Determines whether the argument is equal to the missing value marker.- Parameters:
- value- the Object to test--should be a wrapped version of the missing value marker.
- Returns:
- true iff it really is a wrapped version of the missing value marker.
 
- 
isMissingValueDetermines whether the argument is equal to the missing value marker.- Specified by:
- isMissingValuein interface- Variable
- Specified by:
- isMissingValuein class- AbstractVariable
- Parameters:
- value- the Object to test--should be a wrapped version of the missing value marker.
- Returns:
- true iff it really is a wrapped version of the missing value marker.
 
- 
hashCodepublic int hashCode()
- 
equalsTwo continuous variables are equal if they have the same name and the same missing value marker.
- 
getNodeType- Returns:
- the node type for this node.
 
- 
setNodeTypeDescription copied from interface:NodeSets the node type for this node.
- 
getCenterXpublic int getCenterX()- Returns:
- the x coordinate of the center of the node.
 
- 
setCenterXpublic void setCenterX(int centerX) Sets the x coordinate of the center of this node.
- 
getCenterYpublic int getCenterY()- Returns:
- the y coordinate of the center of the node.
 
- 
setCenterYpublic void setCenterY(int centerY) Sets the y coordinate of the center of this node.
- 
setCenterpublic void setCenter(int centerX, int centerY) Sets the (x, y) coordinates of the center of this node.
- 
addPropertyChangeListenerAdds a property change listener.
- 
getNodeVariableType- Returns:
- the intervention type
 
- 
setNodeVariableTypeDescription copied from interface:NodeSets the type (domain, interventional status, interventional value..) for this node variable
- 
getAllAttributes
- 
getAttribute
- 
removeAttribute
- 
addAttribute
 
-