Class VertexWeightsGenerator

java.lang.Object
org.graph4j.generators.VertexWeightsGenerator

public class VertexWeightsGenerator extends Object
Generates weights for the vertices of a graph.
Author:
Cristian Frăsinaru
  • Constructor Details

    • VertexWeightsGenerator

      public VertexWeightsGenerator()
  • Method Details

    • randomIntegers

      public static void randomIntegers(Graph graph, int min, int max)
      Parameters:
      graph - the input graph.
      min - minimum weight (inclusive).
      max - maximum weight (inclusive).
    • randomDoubles

      public static void randomDoubles(Graph graph, double min, double max)
      Parameters:
      graph - the input graph.
      min - minimum weight (inclusive).
      max - maximum weight (inclusive).
    • fill

      public static void fill(Graph graph, double value)
      Parameters:
      graph - the input graph.
      value - the weight of all vertices.