org.javanetworkanalyzer.model
Interface KeyedGraph<V,E extends EdgeID>

All Superinterfaces:
org.jgrapht.Graph<V,E>
All Known Subinterfaces:
DirectedG<V,E>, UndirectedG<V,E>, WeightedKeyedGraph<V,E>
All Known Implementing Classes:
AsUndirectedG, AsUnweightedDirectedG, AsUnweightedG, DirectedPseudoG, DirectedWeightedPseudoG, EdgeReversedG, PseudoG, WeightedEdgeReversedG, WeightedPseudoG

public interface KeyedGraph<V,E extends EdgeID>
extends org.jgrapht.Graph<V,E>

An interface for adding V vertices to a graph keyed by int ids.

Author:
Adam Gouge

Method Summary
 E addEdge(int source, int target)
          Add an edge from the vertex with id source to the vertex with id target.
 E addEdge(int source, int target, int edgeID)
          Add an edge from the vertex with id source to the vertex with id target and set the edge id.
 boolean addVertex(int id)
          Add a vertex with the given id.
 V getVertex(int id)
          Get the vertex with the given id.
 
Methods inherited from interface org.jgrapht.Graph
addEdge, addEdge, addVertex, containsEdge, containsEdge, containsVertex, edgeSet, edgesOf, getAllEdges, getEdge, getEdgeFactory, getEdgeSource, getEdgeTarget, getEdgeWeight, removeAllEdges, removeAllEdges, removeAllVertices, removeEdge, removeEdge, removeVertex, vertexSet
 

Method Detail

addVertex

boolean addVertex(int id)
Add a vertex with the given id.

Parameters:
id - Id
Returns:
True if the vertex was added.

getVertex

V getVertex(int id)
Get the vertex with the given id.

Parameters:
id - Id.
Returns:
The vertex with the given id.

addEdge

E addEdge(int source,
          int target)
Add an edge from the vertex with id source to the vertex with id target.

Parameters:
source - Source id.
target - Target Id.
Returns:
The newly added edge, or null if it was not added.

addEdge

E addEdge(int source,
          int target,
          int edgeID)
Add an edge from the vertex with id source to the vertex with id target and set the edge id.

Parameters:
source - Source id.
target - Target id.
edgeID - Edge id.
Returns:
The newly added edge, or null if it was not added.


Copyright © 2014. All Rights Reserved.