The Structures_Graph_Node class represents a Node that can be member of a graph node set.
A graph node can contain data. Under this API, the node contains default data, and key index data. It behaves, thus, both as a regular data node, and as a dictionary (or associative array) node.
Regular data is accessed via getData and setData. Key indexed data is accessed via getMetadata and setMetadata.
Located in /Structures/Graph/Node.php (line 57)
Constructor
Test wether this node has an arc to the target node
Connect this node to another one.
If the graph is not directed, the reverse arc, connecting $destinationNode to $this is also created.
Node data getter.
Each graph node can contain a reference to one variable. This is the getter for that reference.
Node metadata getter
Each graph node can contain multiple 'metadata' entries, each stored under a different key, as in an associative array or in a dictionary. This method gets the data under the given key. If the key does not exist, an error will be thrown, so testing using metadataKeyExists might be needed.
Return nodes connected to this one.
Calculate the in degree of the node.
The indegree for a node is the number of arcs entering the node. For non directed graphs, the indegree is equal to the outdegree.
Test for existence of metadata under a given key.
Each graph node can contain multiple 'metadata' entries, each stored under a different key, as in an associative array or in a dictionary. This method tests whether a given metadata key exists for this node.
Calculate the out degree of the node.
The outdegree for a node is the number of arcs exiting the node. For non directed graphs, the outdegree is always equal to the indegree.
Node data setter
Each graph node can contain a reference to one variable. This is the setter for that reference.
Node graph setter. This method should not be called directly. Use Graph::addNode instead.
Node metadata setter
Each graph node can contain multiple 'metadata' entries, each stored under a different key, as in an associative array or in a dictionary. This method stores data under the given key. If the key already exists, previously stored data is discarded.
Delete metadata by key
Each graph node can contain multiple 'metadata' entries, each stored under a different key, as in an associative array or in a dictionary. This method removes any data that might be stored under the provided key. If the key does not exist, no error is thrown, so it is safe using this method without testing for key existence.
Documentation generated on Fri, 30 Jan 2004 16:37:29 +0000 by phpDocumentor 1.2.3