Class AbstractGraph<R extends GraphNode<K,V>,K,V>
java.lang.Object
ubic.basecode.dataStructure.graph.AbstractGraph<R,K,V>
- All Implemented Interfaces:
Graph<R,
K, V>
- Direct Known Subclasses:
DirectedGraph
public abstract class AbstractGraph<R extends GraphNode<K,V>,K,V>
extends Object
implements Graph<R,K,V>
- Author:
- Paul Pavlidis
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract void
abstract void
abstract boolean
containsKey
(K key) Retrieve a node by key.getItems()
getNodeContents
(K key) Retrieve the contents of a node by key.void
Reset the 'visited' marks of the graph to false.
-
Constructor Details
-
AbstractGraph
public AbstractGraph() -
AbstractGraph
Create a new graph from a set of nodes. This allows us to easily make subtrees.- Parameters:
nodes
- Set of AbstractGraphNodes.
-
-
Method Details
-
addNode
-
addNode
- Parameters:
node
- GraphNode
-
containsKey
-
get
Retrieve a node by key. To get the contents of a node use getNodeContents(key) -
getItems
- Returns:
- Map
-
getNodeContents
Retrieve the contents of a node by key. -
unmarkAll
public void unmarkAll()Reset the 'visited' marks of the graph to false.
-