public class Graph extends Object implements IGraph
| Constructor and Description |
|---|
Graph(String name,
boolean oriented) |
Graph(String name,
boolean oriented,
Collection<INetworkSection> linearFeatures)
A constructor based on linear features that implements the standardised
COGIT network element interface.
|
Graph(String name,
boolean oriented,
Set<? extends ArcReseau> linearFeatures)
A constructor based on linear features that implements the standardised
COGIT network element interface.
|
| Modifier and Type | Method and Description |
|---|---|
void |
computeCentralities() |
GraphPath |
computeDijkstraShortestPath(INode initialNode,
INode finalNode)
Compute the shortest path between two nodes of the graph using Dijkstra
algorithm.
|
Set<HashSet<INode>> |
cutInConnexParts()
Cut the graph into connex parts.
|
boolean |
equals(Object arg0) |
IEdge |
getEdgeFromGeoObj(IFeature feature) |
Set<IEdge> |
getEdges()
the edges of the graph
|
Set<IEdge> |
getEdgesConnectingNodes(INode node1,
INode node2)
Get all the edges connecting two nodes.
|
int |
getId()
the id of the graph
|
String |
getName()
the name of the graph
|
INode |
getNodeAt(IDirectPosition pt)
Get the node of the graph that is located at a given position.
|
INode |
getNodeFromGeoObj(IFeature feature) |
Set<INode> |
getNodes()
the nodes of the graph
|
Set<GraphPath> |
getPaths()
the paths within the graph
|
int |
hashCode() |
boolean |
isOriented()
is the graph oriented ?
|
double |
nodeEdgeRatio()
Get the ratio of nodes in relation to edges
|
void |
setEdges(Set<IEdge> arcs) |
void |
setId(int id) |
void |
setName(String name) |
void |
setNodes(Set<INode> nodes) |
void |
setOriented(boolean oriented) |
void |
setPaths(Set<GraphPath> paths) |
String |
toString() |
public Graph(String name, boolean oriented)
public Graph(String name, boolean oriented, Set<? extends ArcReseau> linearFeatures)
name - oriented - linearFeatures - public Graph(String name, boolean oriented, Collection<INetworkSection> linearFeatures)
name - oriented - linearFeatures - public Set<IEdge> getEdges()
IGraphpublic Set<INode> getNodes()
IGraphpublic boolean isOriented()
IGraphisOriented in interface IGraphpublic void setOriented(boolean oriented)
setOriented in interface IGraphpublic int getId()
IGraphpublic Set<GraphPath> getPaths()
IGraphpublic GraphPath computeDijkstraShortestPath(INode initialNode, INode finalNode)
Compute the shortest path between two nodes of the graph using Dijkstra
algorithm. Usable for small graphs as all is computed in memory.
initialNode - : the initial nodefinalNode - : the final node.public Set<HashSet<INode>> cutInConnexParts()
Cut the graph into connex parts. The nodes of each connex part are
clustered in a set.
public void computeCentralities()
public double nodeEdgeRatio()
public Set<IEdge> getEdgesConnectingNodes(INode node1, INode node2)
IGraphgetEdgesConnectingNodes in interface IGraphpublic INode getNodeAt(IDirectPosition pt)
IGraphCopyright © 2016 Laboratoire COGIT, IGN. All rights reserved.