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 MergedNode
s with low weight.
This can be changed through the setting useWeights
.-
Constructor Summary
Constructors Constructor Description RandomMerger()
-
Method Summary
Modifier and Type Method Description void
buildCoarseningLevels(MultilevelGraph multilevelGraph)
Builds the coarsening levels for the graph depending on parameters.String
getDescription()
String
getName()
Parameter[]
getParameters()
Settings (parameters) for theMerger
.void
setParameters(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:Merger
Settings (parameters) for theMerger
.- Specified by:
getParameters
in interfaceMerger
- Specified by:
getParameters
in interfaceParameterizable
- Returns:
- an array of
Parameter
s - See Also:
Merger.getParameters()
-
setParameters
Description copied from interface:Merger
Called by the Multilevel Framework when the user updates the parameters.- Specified by:
setParameters
in interfaceMerger
- Specified by:
setParameters
in 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
,considerEdgeWeights
affect the coarsening process. Consult the comments above their declaration for more information.- Specified by:
buildCoarseningLevels
in interfaceMerger
- Parameters:
multilevelGraph
- The multilevelGraph which the coarsening is performed on. TheMultilevelGraph
that contains the original graph.
-
getName
- Specified by:
getName
in interfaceDescribable
- 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
- Specified by:
getDescription
in 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()
-