public class DirectedGraph extends Object
Constructor and Description |
---|
DirectedGraph(com.fasterxml.jackson.databind.JsonNode jsonGraph)
Initializes a DirectedGraph from the specified JsonNode.
|
Modifier and Type | Method and Description |
---|---|
String |
getId(Integer index)
Retrieve the id mapping the index
|
int |
getVertices()
Returns the number of vertices in this DirectedGraph.
|
int |
indegree(int vertices)
Returns the number of directed edges incident to vertex vertices.
|
DirectedGraph |
reverse()
Returns the reverse of the DirectedGraph.
|
String |
toString()
Returns a string representation of the graph.
|
public DirectedGraph(com.fasterxml.jackson.databind.JsonNode jsonGraph)
jsonGraph
- IndexOutOfBoundsException
- if the endpoints of any edge are not in prescribed rangeIllegalArgumentException
- if the number of vertices or edges is negativepublic int getVertices()
public int indegree(int vertices)
vertices
- the vertexIndexOutOfBoundsException
- unless 0 <= v < verticespublic DirectedGraph reverse()
public String toString()
Copyright © 2018 Vitam. All rights reserved.