Class KahyparContext

java.lang.Object
fr.univartois.cril.jkahypar.KahyparContext
All Implemented Interfaces:
AutoCloseable

public final class KahyparContext extends Object implements AutoCloseable
The KahyparContext provides a context for computing hypergraph partitions. In particular, this context allows to configure the partitioning algorithm.
  • Constructor Details

    • KahyparContext

      public KahyparContext()
      Creates a new KahyparContext.
  • Method Details

    • configureFrom

      public void configureFrom(String iniFile)
      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

      public KahyparPartitioner createPartitionerFor(Hypergraph hypergraph)
      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:
      close in interface AutoCloseable