Package edu.cmu.tetrad.graph
Class GraphNode
java.lang.Object
edu.cmu.tetrad.graph.GraphNode
- All Implemented Interfaces:
- Node,- TetradSerializable,- Serializable,- Comparable<Node>
Implements a basic node in a graph--that is, a node that is not itself a
 variable.
- Author:
- Joseph Ramsey, Willie Wheeler
- See Also:
- 
Field Summary
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddAttribute(String key, Object value) final voidAdds a property change listener.intAlphabetical order.booleanTwo continuous variables are equal if they have the same name and the same missing value marker.getAttribute(String key) final intfinal intfinal StringgetName()final NodeTypeinthashCode()Creates a new node of the same type as this one with the given name.voidremoveAttribute(String key) static GraphNodeGenerates a simple exemplar of this class to test serialization.final voidsetCenter(int centerX, int centerY) Sets the (x, y) coordinates of the center of this node.final voidsetCenterX(int centerX) Sets the x coordinate of the center of this node.final voidsetCenterY(int centerY) Sets the y coordinate of the center of this node.final voidSets the name of this variable.final voidsetNodeType(NodeType nodeType) Sets the node type.voidsetNodeVariableType(NodeVariableType nodeVariableType) Sets the type (domain, interventional status, interventional value..) for this node variabletoString()
- 
Constructor Details- 
GraphNodeConstructs a new Tetrad node with the given (non-null) string.
- 
GraphNodeCopy constructor.
 
- 
- 
Method Details- 
serializableInstanceGenerates a simple exemplar of this class to test serialization.
- 
getName
- 
getNodeType- Specified by:
- getNodeTypein interface- Node
- Returns:
- the node type.
- See Also:
 
- 
setNodeTypeSets the node type.- Specified by:
- setNodeTypein interface- Node
- See Also:
 
- 
setNameSets the name of this variable.
- 
getCenterXpublic final int getCenterX()- Specified by:
- getCenterXin interface- Node
- Returns:
- the x coordinate of the center of the node.
 
- 
setCenterXpublic final void setCenterX(int centerX) Sets the x coordinate of the center of this node.- Specified by:
- setCenterXin interface- Node
 
- 
getCenterYpublic final int getCenterY()- Specified by:
- getCenterYin interface- Node
- Returns:
- the y coordinate of the center of the node.
 
- 
setCenterYpublic final void setCenterY(int centerY) Sets the y coordinate of the center of this node.- Specified by:
- setCenterYin interface- Node
 
- 
setCenterpublic final void setCenter(int centerX, int centerY) Sets the (x, y) coordinates of the center of this node.
- 
addPropertyChangeListenerAdds a property change listener.- Specified by:
- addPropertyChangeListenerin interface- Node
 
- 
toString
- 
hashCodepublic int hashCode()
- 
equalsTwo continuous variables are equal if they have the same name and the same missing value marker.
- 
likeDescription copied from interface:NodeCreates a new node of the same type as this one with the given name.
- 
compareToDescription copied from interface:NodeAlphabetical order.- Specified by:
- compareToin interface- Comparable<Node>
- Specified by:
- compareToin interface- Node
 
- 
getNodeVariableType- Specified by:
- getNodeVariableTypein interface- Node
- Returns:
- the intervention type
 
- 
setNodeVariableTypeDescription copied from interface:NodeSets the type (domain, interventional status, interventional value..) for this node variable- Specified by:
- setNodeVariableTypein interface- Node
 
- 
getAllAttributes- Specified by:
- getAllAttributesin interface- Node
 
- 
getAttribute- Specified by:
- getAttributein interface- Node
 
- 
removeAttribute- Specified by:
- removeAttributein interface- Node
 
- 
addAttribute- Specified by:
- addAttributein interface- Node
 
 
-