Package edu.cmu.tetrad.graph
Interface Node
- All Superinterfaces:
- Comparable<Node>,- Serializable,- TetradSerializable
- All Known Subinterfaces:
- Variable
- All Known Implementing Classes:
- AbstractVariable,- ContinuousVariable,- DiscreteVariable,- GraphNode
Represents an object with a name, node type, and position that can serve as a node in a graph.
- Version:
- $Id: $Id
- Author:
- josephramsey
- See Also:
- 
Field SummaryFields
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddAttribute(String key, Object value) addAttribute.voidAdds a property change listener.default intReturns the hashcode for this node.booleanTests whether this variable is equal to the given variable.getAllAttributes.getAttribute(String key) getAttribute.intReturns the x coordinate of the center of this node.intReturns the y coordinate of the center of this node.getName()Returns the name of this node.Returns the node type for this node.Returns the node shape for this node.inthashCode()Removes a property change listener.Creates a new node of the same type as this one with the given name.voidremoveAttribute(String key) removeAttribute.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.voidSets the name 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 variabletoString()Returns the intervention type for this node.
- 
Field Details- 
ALPHAConstantALPHA
- 
ALPHA_NUMConstantALPHA_NUM
- 
LAGConstantLAG
- 
serialVersionUIDstatic final long serialVersionUIDConstantserialVersionUID=23L- See Also:
 
 
- 
- 
Method Details- 
getNameString getName()Returns the name of this node.- Returns:
- the name of the node.
 
- 
setNameSets the name of this node.- Parameters:
- name- the name of this node.
 
- 
getNodeTypeNodeType getNodeType()Returns the node type for this node.- Returns:
- the node type for this node.
 
- 
setNodeTypeSets the node type for this node.- Parameters:
- nodeType- the node type for this node.
 
- 
getNodeVariableTypeNodeVariableType getNodeVariableType()Returns the node shape for this node.- Returns:
- the intervention type
 
- 
setNodeVariableTypeSets the type (domain, interventional status, interventional value..) for this node variable- Parameters:
- nodeVariableType- the type (domain, interventional status, interventional value..) for this node variable
 
- 
toStringString toString()Returns the intervention type for this node.
- 
getCenterXint getCenterX()Returns the x coordinate of the center of this node.- Returns:
- the x coordinate of the center of the node.
 
- 
setCenterXvoid setCenterX(int centerX) Sets the x coordinate of the center of this node.- Parameters:
- centerX- This coordinate.
 
- 
getCenterYint getCenterY()Returns the y coordinate of the center of this node.- Returns:
- the y coordinate of the center of the node.
 
- 
setCenterYvoid setCenterY(int centerY) Sets the y coordinate of the center of this node.- Parameters:
- centerY- This coordinate.
 
- 
setCentervoid setCenter(int centerX, int centerY) Sets the (x, y) coordinates of the center of this node.- Parameters:
- centerX- The x coordinate.
- centerY- The y coordinate.
 
- 
addPropertyChangeListenerAdds a property change listener.- Parameters:
- l- This listener.
 
- 
hashCodeint hashCode()Removes a property change listener.
- 
equalsTests whether this variable is equal to the given variable.
- 
likeCreates a new node of the same type as this one with the given name.- Parameters:
- name- the name of the new node.
- Returns:
- the new node.
 
- 
compareToReturns the hashcode for this node.- Specified by:
- compareToin interface- Comparable<Node>
- Parameters:
- node- the object to be compared.
- Returns:
- the hashcode for this node.
 
- 
getAllAttributesgetAllAttributes. - Returns:
- a Mapobject
 
- 
getAttributegetAttribute. 
- 
removeAttributeremoveAttribute. - Parameters:
- key- a- Stringobject
 
- 
addAttributeaddAttribute. 
 
-