Class WeightedGraphGenerator<V,​E>

  • Type Parameters:
    V - the graph vertex type
    E - 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 Detail

      • edgeClass

        protected java.lang.Class<? extends E> edgeClass
      • weights

        protected double[][] weights
    • Constructor Detail

      • WeightedGraphGenerator

        public WeightedGraphGenerator()
    • 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