public class TLcdClusteredPartitioningAlgorithm extends java.lang.Object implements ILcdPartitioningAlgorithm
In practice, this means that:
The algorithm can be configured with the following parameters:
alpha
, the larger the
partitions (and thus the smaller the number of partitions) will be.
Typical values for alpha
are between 0.2 and 0.6. If no alpha
value is provided, the
algorithm will by default use alpha=0.3
. It might be necessary to experiment with several
values for alpha
in order to obtain a good result.
Constructor and Description 

TLcdClusteredPartitioningAlgorithm()
Constructs a new
TLcdClusteredPartitioningAlgorithm . 
TLcdClusteredPartitioningAlgorithm(java.util.Random aRandom)
Constructs a new
TLcdClusteredPartitioningAlgorithm . 
Modifier and Type  Method and Description 

int 
getNrIterations()
Returns the number of iterations that is done for each partitioning.

<N,E> ILcdPartitionedGraph<N,E> 
partition(ILcdGraph<N,E> aGraph)
Returns a partitioned copy of the given graph.

<N,E> ILcdPartitionedGraph<N,E> 
partition(ILcdGraph<N,E> aGraph,
java.util.Vector<E> aConstraintedEdges)
Returns a partitioned copy of the given graph, but keeps each of the constrainted edges within
one partition (none of the constrainted edges will become a boundary edge).

<N,E> ILcdPartitionedGraph<N,E> 
partition(ILcdGraph<N,E> aGraph,
java.util.Vector<E> aConstraintedEdges,
double aAlpha)
Returns a partitioned copy of the given graph, but keeps each of the constrainted edges within
one partition (none of the constrainted edges will become a boundary edge).

<N,E> ILcdPartitionedGraph<N,E> 
partition(ILcdGraph<N,E> aGraph,
java.util.Vector<E> aConstraintedEdges,
int aMaxNrPartitioningLevels,
int aNrEdgesThreshold,
int aMinPartitions,
int aMaxPartitions)
Returns a partitioned copy of the given graph, taking into account the specified constraints.

void 
setNumberOfIterations(int aNrIterations)
Sets the number of iterations that should be done for each partitioning.

public TLcdClusteredPartitioningAlgorithm()
TLcdClusteredPartitioningAlgorithm
.public TLcdClusteredPartitioningAlgorithm(java.util.Random aRandom)
TLcdClusteredPartitioningAlgorithm
.aRandom
 the random number generator to be used by this algorithm.public void setNumberOfIterations(int aNrIterations)
aNrIterations
 the number of iterations that should be done for each partitioning.java.lang.IllegalArgumentException
 if aNrIterations < 1
.getNrIterations()
public int getNrIterations()
setNumberOfIterations(int)
public <N,E> ILcdPartitionedGraph<N,E> partition(ILcdGraph<N,E> aGraph)
If this method does not provide a suitable result, one can consider using the other partition methods which allow providing extra input parameters to the algorithm.
partition
in interface ILcdPartitioningAlgorithm
aGraph
 the graph to be partitioned.public <N,E> ILcdPartitionedGraph<N,E> partition(ILcdGraph<N,E> aGraph, java.util.Vector<E> aConstraintedEdges)
If this method does not provide a suitable result, one can consider using the other partition methods which allow providing extra input parameters to the algorithm.
aGraph
 the graph to be partitioned.aConstraintedEdges
 the edges prohibited to become boundary edges in the partitioned graph.java.lang.NullPointerException
 if one of the arguments is null
.public <N,E> ILcdPartitionedGraph<N,E> partition(ILcdGraph<N,E> aGraph, java.util.Vector<E> aConstraintedEdges, int aMaxNrPartitioningLevels, int aNrEdgesThreshold, int aMinPartitions, int aMaxPartitions)
This algorithm will try to find a solution by experimenting with different values of alpha, using an iterative approach. It can therefore take much more time than a partitioning with a fixed alpha value.
aGraph
 the graph to be partitioned.aConstraintedEdges
 the edges prohibited to become boundary edges in the partitioned graph.aMaxNrPartitioningLevels
 the maximum number of partitioning levels.aNrEdgesThreshold
 the minimum number of edges a graph should have before being further partitioned.aMinPartitions
 the minimal number of partitions in a graph, in addition to the natural partitions
(that is, the partitions that are naturally formed by converting each nonconnected subgraph
of graph into a partition.)aMaxPartitions
 the maximal number of partitions in a graph, in addition to the natural partitionspublic <N,E> ILcdPartitionedGraph<N,E> partition(ILcdGraph<N,E> aGraph, java.util.Vector<E> aConstraintedEdges, double aAlpha)
This method provides direct access to the alpha factor, that influences the number of partitions the algorithm will create.
aGraph
 the graph to be partitioned.aConstraintedEdges
 the edges prohibited to become boundary edges in the partitioned graph.aAlpha
 the alpha factor.java.lang.NullPointerException
 if one of the arguments is null
.