|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.graph.Graph
A Graph is a structure that represents the relationship between a collection of features. These relationships can be represented as either edges or nodes in the graph.
Constructor Summary | |
Graph(java.util.Collection nodes,
java.util.Collection edges)
Creates a graph that contains a collection of nodes and edges. |
Method Summary | |
org.geotools.feature.FeatureCollection |
asEdgeFC()
Convenience method for wrapping the edges of the graph in a FeatureCollection. |
org.geotools.feature.FeatureCollection |
asNodeFC()
Convenience method for wrapping the nodes of the graph in a FeatureCollection. |
java.util.Collection |
getEdges()
Returns the edges of the graph. |
java.util.Collection |
getNodes()
Returns the nodes of the graph. |
java.util.Collection |
getNodesOfDegree(int n)
Returns all the nodes in the graph of a specified degree. |
java.util.Collection |
getVisitedNodes(boolean visited)
Returns all the nodes in the graph that have been marked as visited or non-visited. |
void |
init()
Initialises the graph. |
void |
initEdges()
Initializes the edges in the graph by setting all visited flags to false and all counts to zero. |
void |
initNodes()
Initializes the nodes in the graph by setting all visited flags to false and all counts to zero. |
java.util.Collection |
queryEdges(GraphVisitor visitor)
Performs a query against the edges of the graph. |
java.util.Collection |
queryNodes(GraphVisitor visitor)
Performs a query against the nodes of the graph. |
void |
traverseEdges(GraphTraversal traversal)
Traverses the edges of the graph. |
void |
traverseNodes(GraphTraversal traversal)
Traverses the nodes of a the graph. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Graph(java.util.Collection nodes, java.util.Collection edges)
nodes
- edges
- Method Detail |
public java.util.Collection getNodes()
Node
public java.util.Collection getEdges()
Edge
public java.util.Collection queryNodes(GraphVisitor visitor)
visitor
- Returns a non zero integer value if the node meets the
query criteria.
Node
,
GraphVisitor
public java.util.Collection queryEdges(GraphVisitor visitor)
visitor
- Returns a non zero integer value if the edge meets the
query criteria.
Edge
,
GraphVisitor
public java.util.Collection getNodesOfDegree(int n)
n
- degree of nodes to be returned.
public java.util.Collection getVisitedNodes(boolean visited)
visited
- True if node is visited, false if node is unvisited.
public void traverseNodes(GraphTraversal traversal)
traversal
- Specifies the algorithm in which to traverse the graph.public void traverseEdges(GraphTraversal traversal)
traversal
- Specifies the algorithm in which to traverse the graph.public void initNodes()
public void initEdges()
public void init()
public org.geotools.feature.FeatureCollection asNodeFC()
FeatureCollection
public org.geotools.feature.FeatureCollection asEdgeFC()
FeatureCollection
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |