Package org.jgrapht.generate
Class WeightedGraphGenerator<V,E>
- java.lang.Object
-
- org.jgrapht.generate.WeightedGraphGenerator<V,E>
-
- Type Parameters:
V
- the graph vertex typeE
- the graph edge type
- All Implemented Interfaces:
GraphGenerator<V,E,V>
public abstract class WeightedGraphGenerator<V,E> extends java.lang.Object implements GraphGenerator<V,E,V>
A base implementation of a weighted graph generator.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Class<? extends E>
edgeClass
protected EdgeFactory<V,E>
edgeFactory
protected double[][]
weights
-
Constructor Summary
Constructors Constructor Description WeightedGraphGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WeightedGraphGenerator<V,E>
edgeClass(java.lang.Class<? extends E> edgeClass)
Set the edge class of the generatorWeightedGraphGenerator<V,E>
edgeFactory(EdgeFactory<V,E> edgeFactory)
Set the edge factory of the generatorWeightedGraphGenerator<V,E>
weights(double[][] weights)
Set the weights of the generator-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jgrapht.generate.GraphGenerator
generateGraph
-
-
-
-
Field Detail
-
edgeClass
protected java.lang.Class<? extends E> edgeClass
-
edgeFactory
protected EdgeFactory<V,E> edgeFactory
-
weights
protected double[][] weights
-
-
Method Detail
-
edgeFactory
public WeightedGraphGenerator<V,E> edgeFactory(EdgeFactory<V,E> edgeFactory)
Set the edge factory of the generator- Parameters:
edgeFactory
- the edge factory- Returns:
- the generator
-
edgeClass
public WeightedGraphGenerator<V,E> edgeClass(java.lang.Class<? extends E> edgeClass)
Set the edge class of the generator- Parameters:
edgeClass
- the edge class- Returns:
- the generator
-
weights
public WeightedGraphGenerator<V,E> weights(double[][] weights)
Set the weights of the generator- Parameters:
weights
- of the generator- Returns:
- the generator
-
-