Class RandomMerger

java.lang.Object
org.vanted.plugins.layout.multilevelframework.RandomMerger
All Implemented Interfaces:
Describable, Merger, Parameterizable

public class RandomMerger
extends Object
implements Merger
Merger that randomly merges edges. Note that the default setting is not to merge completely randomly. Starting from the second level, the RandomMerger will prefer merging MergedNodes with low weight. This can be changed through the setting useWeights.
  • Constructor Details

    • RandomMerger

      public RandomMerger()
  • Method Details

    • getParameters

      public Parameter[] getParameters()
      Description copied from interface: Merger
      Settings (parameters) for the Merger.
      Specified by:
      getParameters in interface Merger
      Specified by:
      getParameters in interface Parameterizable
      Returns:
      an array of Parameters
      See Also:
      Merger.getParameters()
    • setParameters

      public void setParameters​(Parameter[] parameters)
      Description copied from interface: Merger
      Called by the Multilevel Framework when the user updates the parameters.
      Specified by:
      setParameters in interface Merger
      Specified by:
      setParameters in interface Parameterizable
      Parameters:
      parameters - The updated Parameter.
      See Also:
      Merger.setParameters(Parameter[])
    • buildCoarseningLevels

      public void buildCoarseningLevels​(MultilevelGraph multilevelGraph)
      Builds the coarsening levels for the graph depending on parameters. The parameters coarseningFactor, minNumberOfNodesPerLevel, maxNumberOfIterations, useWeights, considerEdgeWeights affect the coarsening process. Consult the comments above their declaration for more information.
      Specified by:
      buildCoarseningLevels in interface Merger
      Parameters:
      multilevelGraph - The multilevelGraph which the coarsening is performed on. The MultilevelGraph that contains the original graph.
    • getName

      public String getName()
      Specified by:
      getName in interface Describable
      Returns:
      the name of the implementing class. This may be be used to represent this class to the user. It should not be null and be unique between all classes that implement this interface.
      See Also:
      Describable.getName()
    • getDescription

      public String getDescription()
      Specified by:
      getDescription in interface Describable
      Returns:
      the description of the implementing class. This may be be used to explain the behaviour of this class to the user. It should not be null.
      See Also:
      Describable.getDescription()