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 Summary
Constructors Constructor Description RandomMerger() -
Method Summary
Modifier and Type Method Description voidbuildCoarseningLevels(MultilevelGraph multilevelGraph)Builds the coarsening levels for the graph depending on parameters.StringgetDescription()StringgetName()Parameter[]getParameters()Settings (parameters) for theMerger.voidsetParameters(Parameter[] parameters)Called by the Multilevel Framework when the user updates the parameters.
-
Constructor Details
-
RandomMerger
public RandomMerger()
-
-
Method Details
-
getParameters
Description copied from interface:MergerSettings (parameters) for theMerger.- Specified by:
getParametersin interfaceMerger- Specified by:
getParametersin interfaceParameterizable- Returns:
- an array of
Parameters - See Also:
Merger.getParameters()
-
setParameters
Description copied from interface:MergerCalled by the Multilevel Framework when the user updates the parameters.- Specified by:
setParametersin interfaceMerger- Specified by:
setParametersin interfaceParameterizable- Parameters:
parameters- The updatedParameter.- See Also:
Merger.setParameters(Parameter[])
-
buildCoarseningLevels
Builds the coarsening levels for the graph depending on parameters. The parameterscoarseningFactor,minNumberOfNodesPerLevel,maxNumberOfIterations,useWeights,considerEdgeWeightsaffect the coarsening process. Consult the comments above their declaration for more information.- Specified by:
buildCoarseningLevelsin interfaceMerger- Parameters:
multilevelGraph- The multilevelGraph which the coarsening is performed on. TheMultilevelGraphthat contains the original graph.
-
getName
- Specified by:
getNamein interfaceDescribable- Returns:
- the name of the implementing class.
This may be be used to represent this class to the user.
It should not be
nulland be unique between all classes that implement this interface. - See Also:
Describable.getName()
-
getDescription
- Specified by:
getDescriptionin interfaceDescribable- 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()
-