public static class GraphUtils.JUNGUtils
extends Object
Auxiliary class to work with the graph library JUNG.
Modifier and Type | Class and Description |
---|---|
static class |
GraphUtils.JUNGUtils.GraphPath<E>
Class to represent a path in a Graph.
|
Constructor and Description |
---|
GraphUtils.JUNGUtils() |
Modifier and Type | Method and Description |
---|---|
static edu.uci.ics.jung.graph.Graph<Integer,Integer> |
getDemandLayerGraph(NetPlan netPlan)
Returns a graph representing the traffic demands (nodes and links) of the network plan.
|
static org.apache.commons.collections15.Transformer<Integer,Double> |
getEdgeWeightTransformer(double[] edgeWeightVector)
Obtains a transformer for returning link weight from link identifier
|
static org.apache.commons.collections15.Transformer<Integer,Integer> |
getEdgeWeightTransformer(int[] edgeWeightVector)
Obtains a transformer for returning link weight from link identifier
|
static edu.uci.ics.jung.graph.Graph<Integer,Integer> |
getGraphFromLinkTable(int[][] linkTable,
int N)
Obtains a
JUNG graph from a given link table. |
static <E> double |
getPathWeight(List<E> path,
org.apache.commons.collections15.Transformer<E,Double> edgeWeightTransformer)
Returns the weight of a path given the sequence of edges.
|
static edu.uci.ics.jung.graph.Graph<Integer,Integer> |
getPhysicalLayerGraph(NetPlan netPlan)
Returns a graph representing the physical topology (nodes and links) of the network plan.
|
public static edu.uci.ics.jung.graph.Graph<Integer,Integer> getGraphFromLinkTable(int[][] linkTable, int N)
JUNG
graph from a given link table.linkTable
- Set of installed links (first column: origin node, second column: destination node)N
- Number of nodesJUNG
graphpublic static <E> double getPathWeight(List<E> path, org.apache.commons.collections15.Transformer<E,Double> edgeWeightTransformer)
E
- Class type for edgespath
- Sequence of edgeedgeWeightTransformer
- The class responsible for returning weights for edgespublic static org.apache.commons.collections15.Transformer<Integer,Double> getEdgeWeightTransformer(double[] edgeWeightVector)
edgeWeightVector
- Link weightspublic static org.apache.commons.collections15.Transformer<Integer,Integer> getEdgeWeightTransformer(int[] edgeWeightVector)
edgeWeightVector
- Link weightspublic static edu.uci.ics.jung.graph.Graph<Integer,Integer> getDemandLayerGraph(NetPlan netPlan)
netPlan
- A network planpublic static edu.uci.ics.jung.graph.Graph<Integer,Integer> getPhysicalLayerGraph(NetPlan netPlan)
netPlan
- A network plan