Interface RandomGraphGenerator.EdgeTopologyFactory<VV,​EE>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void createEdges​(Graph<VV,​EE> targetGraph, java.util.Map<java.lang.Integer,​VV> orderToVertexMap, int numberOfEdges, java.util.Random randomizer)
      Two different calls to the createEdges() with the same parameters must result in the generation of the same.
      boolean isNumberOfEdgesValid​(Graph<VV,​EE> targetGraph, int numberOfEdges)
      Checks if the graph can contain the givven numberOfEdges according to the graph type restrictions.
    • Method Detail

      • createEdges

        void createEdges​(Graph<VV,​EE> targetGraph,
                         java.util.Map<java.lang.Integer,​VV> orderToVertexMap,
                         int numberOfEdges,
                         java.util.Random randomizer)
        Two different calls to the createEdges() with the same parameters must result in the generation of the same. But if the randomizer is different, it should, usually, create different edge topology.
        Parameters:
        targetGraph - - guranteed to start with zero edges.
        orderToVertexMap - - key=Integer of vertex order . between zero to numOfVertexes (exclusive). value = vertex from the graph. unique.
        numberOfEdges - - to create in the graph
        randomizer -
      • isNumberOfEdgesValid

        boolean isNumberOfEdgesValid​(Graph<VV,​EE> targetGraph,
                                     int numberOfEdges)
        Checks if the graph can contain the givven numberOfEdges according to the graph type restrictions. For example: #V means number of vertexes in graph
      • a Simple Graph, can have max of #V*(#V-1)/2 edges. etc
Parameters:
targetGraph - guranteed to start with zero edges.
numberOfEdges -