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.
- Version:
- $Id: $Id
- Author:
- josephramsey, Willie Wheeler
- See Also:
- 
Field Summary
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddAttribute(String key, Object value) addAttribute.final voidAdds a property change listener.booleanTests whether this variable is equal to the given variable.getAllAttributes.getAttribute(String key) getAttribute.final intGetter for the fieldcenterX.final intGetter for the fieldcenterY.final StringgetName()Getter for the fieldname.final NodeTypeGetter for the fieldnodeType.Returns the node shape for this node.booleanReturns true if this node is selected as a bias node.inthashCode()hashCode.Creates a new node of the same type as this one with the given name.voidremoveAttribute(String key) removeAttribute.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 node.final voidsetNodeType(NodeType nodeType) Sets the node type for this node.voidsetNodeVariableType(NodeVariableType nodeVariableType) Sets the type (domain, interventional status, interventional value..) for this node variablefinal voidsetSelectionBias(boolean selectionBias) Sets whether the node is selected as a bias node.toString()toString.
- 
Constructor Details- 
GraphNode
- 
GraphNode
 
- 
- 
Method Details- 
serializableInstance
- 
getName
- 
setName
- 
getNodeTypeGetter for the field nodeType.- Specified by:
- getNodeTypein interface- Node
- Returns:
- the node type.
- See Also:
 
- 
setNodeTypeSets the node type for this node.Sets the node type. - Specified by:
- setNodeTypein interface- Node
- Parameters:
- nodeType- the node type for this node.
- See Also:
 
- 
getCenterXpublic final int getCenterX()Getter for the field centerX.- 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.Sets the x coordinate of the center of this node. - Specified by:
- setCenterXin interface- Node
- Parameters:
- centerX- This coordinate.
 
- 
getCenterYpublic final int getCenterY()Getter for the field centerY.- 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.Sets the y coordinate of the center of this node. - Specified by:
- setCenterYin interface- Node
- Parameters:
- centerY- This coordinate.
 
- 
setCenter
- 
addPropertyChangeListenerAdds a property change listener.Adds a property change listener. - Specified by:
- addPropertyChangeListenerin interface- Node
- Parameters:
- l- This listener.
 
- 
toString
- 
hashCode
- 
equalsTests whether this variable is equal to the given variable.Two continuous variables are equal if they have the same name and the same missing value marker. 
- 
like
- 
getNodeVariableTypeReturns the node shape for this node.- Specified by:
- getNodeVariableTypein interface- Node
- Returns:
- the intervention type
 
- 
setNodeVariableTypeSets the type (domain, interventional status, interventional value..) for this node variable- Specified by:
- setNodeVariableTypein interface- Node
- Parameters:
- nodeVariableType- the type (domain, interventional status, interventional value..) for this node variable
 
- 
getAllAttributes
- 
getAttribute
- 
removeAttributeremoveAttribute. - Specified by:
- removeAttributein interface- Node
- Parameters:
- key- a- Stringobject
 
- 
addAttribute
- 
getSelectionBiaspublic boolean getSelectionBias()Returns true if this node is selected as a bias node.- Specified by:
- getSelectionBiasin interface- Node
- Returns:
- true if this node is selected as a bias node.
 
- 
setSelectionBiaspublic final void setSelectionBias(boolean selectionBias) Sets whether the node is selected as a bias node.- Specified by:
- setSelectionBiasin interface- Node
- Parameters:
- selectionBias- the selection bias status for this node.
 
 
-