# Class: com.pnfsoftware.jeb.util.graph.Digraph

A directed graph object, cyclic or acyclic. Self\-loops \(x\>x\) are also allowed. Duplicate edges are not allowed, e.g. if an edge x\>y exists, another edge x\>y cannot be added \(a way to represent this information is to specify an edge weight\).

## Constructor: Digraph


## Method: canReach
- parameter: `from`, type: `com.pnfsoftware.jeb.util.graph.Digraph.V`
- parameter: `to`, type: `com.pnfsoftware.jeb.util.graph.Digraph.V`
- return type: `boolean`


## Method: computeEdgeBetweenness
- return type: `java.util.List<java.lang.Integer>`

Description: Compute the edge\-betweenness score of all edges of the graph using Girvan\-Newman. The scores are placed in [E#ebscore](E#ebscore).
return: a list of edge indexes ordered by descending order of edge\-betweenness score; e.g.,         if the first element of the list is 2, it means that the third registered edge         \(getEdge\(2\)\) is the one with the highest EB score

## Method: copyOfEdges
- return type: `java.util.List<com.pnfsoftware.jeb.util.graph.Digraph.E>`


## Method: copyOfVertices
- return type: `java.util.List<com.pnfsoftware.jeb.util.graph.Digraph.V>`


## Method: done
- return type: `com.pnfsoftware.jeb.util.graph.Digraph`

Description: Clients can call this method to indicate that the initial graph is built: after calling this method, additions of vertices or edges is forbidden. However, removal of edges is allowed.

## Method: e
- parameter: `srcId`, type: `int`
- parameter: `dstId`, type: `int`
- parameter: `weight`, type: `java.lang.Double`
- return type: `com.pnfsoftware.jeb.util.graph.Digraph`


## Method: e
- parameter: `srcId`, type: `int`
- parameter: `dstId`, type: `int`
- return type: `com.pnfsoftware.jeb.util.graph.Digraph`


## Method: getEdge
- parameter: `index`, type: `int`
- return type: `com.pnfsoftware.jeb.util.graph.Digraph.E`


## Method: getEdge
- parameter: `srcId`, type: `int`
- parameter: `dstId`, type: `int`
- return type: `com.pnfsoftware.jeb.util.graph.Digraph.E`


## Method: getEdgeCount
- return type: `int`


## Method: getEdgeIndexesByDescendingBetweenness
- return type: `java.util.List<java.lang.Integer>`


## Method: getEdges
- return type: `java.util.List<com.pnfsoftware.jeb.util.graph.Digraph.E>`


## Method: getReachableVertices
- parameter: `fromId`, type: `int`
- return type: `java.util.Set<java.lang.Integer>`


## Method: getVertex
- parameter: `id`, type: `int`
- return type: `com.pnfsoftware.jeb.util.graph.Digraph.V`


## Method: getVertexByIndex
- parameter: `index`, type: `int`
- return type: `com.pnfsoftware.jeb.util.graph.Digraph.V`


## Method: getVertexCount
- return type: `int`


## Method: getVertexIndexesByDescendingCentrality
- return type: `java.util.List<java.lang.Integer>`


## Method: getVertexLabel
- parameter: `id`, type: `int`
- return type: `java.lang.String`


## Method: getVertices
- return type: `java.util.List<com.pnfsoftware.jeb.util.graph.Digraph.V>`


## Method: getWeaklyConnectedComponents
- return type: `java.util.List<com.pnfsoftware.jeb.util.graph.Digraph>`


## Method: isAdjacent
- parameter: `from`, type: `com.pnfsoftware.jeb.util.graph.Digraph.V`
- parameter: `to`, type: `com.pnfsoftware.jeb.util.graph.Digraph.V`
- return type: `boolean`


## Method: isWeaklyConnected
- return type: `boolean`

Description: Determine if this directed graph is weakly connected, that is, if the similar undirected graph is connected.
return: 

## Method: removeEdge
- parameter: `e`, type: `com.pnfsoftware.jeb.util.graph.Digraph.E`


## Method: removeEdge
- parameter: `index`, type: `int`


## Method: removeVertex
- parameter: `v`, type: `com.pnfsoftware.jeb.util.graph.Digraph.V`
- parameter: `reconnectEdges`, type: `boolean`


## Method: resetEdgeBetweennessScores


## Method: setVertexLabel
- parameter: `id`, type: `int`
- parameter: `label`, type: `java.lang.String`


## Method: setVertexLabels
- parameter: `idLabels`, type: `java.lang.Object[]`


## Method: toString
- return type: `java.lang.String`


## Method: v
- parameter: `id`, type: `int`
- parameter: `weight`, type: `java.lang.Double`
- parameter: `label`, type: `java.lang.String`
- return type: `com.pnfsoftware.jeb.util.graph.Digraph`

Description: Add a vertex to this graph.
parameter: id: 
parameter: weight: optional
parameter: label: optional
return: 

## Method: v
- parameter: `id`, type: `int`
- parameter: `weight`, type: `java.lang.Double`
- return type: `com.pnfsoftware.jeb.util.graph.Digraph`


## Method: v
- parameter: `id`, type: `int`
- return type: `com.pnfsoftware.jeb.util.graph.Digraph`


## Static Method: create
- return type: `com.pnfsoftware.jeb.util.graph.Digraph`


## Static Method: load
- parameter: `file`, type: `java.io.File`
- return type: `com.pnfsoftware.jeb.util.graph.Digraph`

Description: 
parameter: file: 
return: 
throws: 

