java.lang.Object
fr.univartois.cril.jkahypar.KahyparContext
- All Implemented Interfaces:
AutoCloseable
The KahyparContext provides a context for computing hypergraph partitions.
In particular, this context allows to configure the partitioning algorithm.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidconfigureFrom(String iniFile) Loads the configuration of this context from an INI file.createPartitionerFor(Hypergraph hypergraph) Creates a partitioner for the given hypergraph.voidsetImbalance(double imbalance) Sets the imbalance parameter for the partitioning algorithm.voidsetNumberOfBlocks(int numberOfBlocks) Sets the number of blocks in the partitions to compute.
-
Constructor Details
-
KahyparContext
public KahyparContext()Creates a new KahyparContext.
-
-
Method Details
-
configureFrom
Loads the configuration of this context from an INI file.- Parameters:
iniFile- The file to load the configuration from.
-
setImbalance
public void setImbalance(double imbalance) Sets the imbalance parameter for the partitioning algorithm.- Parameters:
imbalance- The imbalance parameter.
-
setNumberOfBlocks
public void setNumberOfBlocks(int numberOfBlocks) Sets the number of blocks in the partitions to compute.- Parameters:
numberOfBlocks- The number of blocks.
-
createPartitionerFor
Creates a partitioner for the given hypergraph.- Parameters:
hypergraph- The hypergraph to compute a partition of.- Returns:
- The created partitioner.
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-