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
,SessionNode
Represents an object with a name, node type, and position that can serve as a node in a graph.
- Author:
- josephramsey
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAttribute
(String key, Object value) void
Adds a property change listener.int
Alphabetical order.boolean
getAttribute
(String key) int
int
getName()
int
hashCode()
Creates a new node of the same type as this one with the given name.void
removeAttribute
(String key) void
setCenter
(int centerX, int centerY) Sets the (x, y) coordinates of the center of this node.void
setCenterX
(int centerX) Sets the x coordinate of the center of this node.void
setCenterY
(int centerY) Sets the y coordinate of the center of this node.void
Sets the name of this node.void
setNodeType
(NodeType nodeType) Sets the node type for this node.void
setNodeVariableType
(NodeVariableType nodeVariableType) Sets the type (domain, interventional status, interventional value..) for this node variabletoString()
-
Field Details
-
ALPHA
-
ALPHA_NUM
-
LAG
-
serialVersionUID
static final long serialVersionUID- See Also:
-
-
Method Details
-
getName
String getName()- Returns:
- the name of the node.
-
setName
Sets the name of this node. -
getNodeType
NodeType getNodeType()- Returns:
- the node type for this node.
-
setNodeType
Sets the node type for this node. -
getNodeVariableType
NodeVariableType getNodeVariableType()- Returns:
- the intervention type
-
setNodeVariableType
Sets the type (domain, interventional status, interventional value..) for this node variable -
toString
String toString() -
getCenterX
int getCenterX()- Returns:
- the x coordinate of the center of the node.
-
setCenterX
void setCenterX(int centerX) Sets the x coordinate of the center of this node. -
getCenterY
int getCenterY()- Returns:
- the y coordinate of the center of the node.
-
setCenterY
void setCenterY(int centerY) Sets the y coordinate of the center of this node. -
setCenter
void setCenter(int centerX, int centerY) Sets the (x, y) coordinates of the center of this node. -
addPropertyChangeListener
Adds a property change listener. -
hashCode
int hashCode() -
equals
-
like
Creates a new node of the same type as this one with the given name. -
compareTo
Alphabetical order.- Specified by:
compareTo
in interfaceComparable<Node>
-
getAllAttributes
-
getAttribute
-
removeAttribute
-
addAttribute
-