Module fr.univartois.cril.jkahypar
Class NativeKahyparContext
java.lang.Object
fr.univartois.cril.jkahypar.kahypar.NativeKahyparContext
The NativeKahyparContext provides an object-oriented wrapper for a native
KaHyPar
Context object.-
Method Summary
Modifier and TypeMethodDescriptionvoidconfigureFrom(String iniFile) Reads the configuration of this context from an INI configuration file.createPartitionerFor(Hypergraph hypergraph) Creates a partitioner for the given hypergraph.voiddispose()Frees the memory used by the underlying native context.doubleGives the imbalance parameter to use in the partitioning algorithm.intGives the number of blocks in the partitions to compute.voidsetBlockWeights(int[] blockWeights) Sets the weights that must have the blocks computed by the partitioning algorithm.voidsetImbalance(double imbalance) Sets the imbalance parameter to use in the partitioning algorithm.voidsetNumberOfBlocks(int numberOfBlocks) Sets the number of blocks in the partitions to compute.
-
Method Details
-
configureFrom
Reads the configuration of this context from an INI configuration file.- Parameters:
iniFile- The name of the file to read the configuration from.
-
setImbalance
public void setImbalance(double imbalance) Sets the imbalance parameter to use in the partitioning algorithm.- Parameters:
imbalance- The imbalance parameter to use.
-
getImbalance
public double getImbalance()Gives the imbalance parameter to use in the partitioning algorithm.- Returns:
- The imbalance parameter to use.
-
setNumberOfBlocks
public void setNumberOfBlocks(int numberOfBlocks) Sets the number of blocks in the partitions to compute.- Parameters:
numberOfBlocks- The number of blocks.
-
getNumberOfBlocks
public int getNumberOfBlocks()Gives the number of blocks in the partitions to compute.- Returns:
- The number of blocks.
-
setBlockWeights
public void setBlockWeights(int[] blockWeights) Sets the weights that must have the blocks computed by the partitioning algorithm.- Parameters:
blockWeights- The weights of the blocks.
-
createPartitionerFor
Creates a partitioner for the given hypergraph.- Parameters:
hypergraph- The hypergraph to partition.- Returns:
- The created partitioner.
-
dispose
public void dispose()Frees the memory used by the underlying native context.
-