Class NativeKahyparContext

java.lang.Object
fr.univartois.cril.jkahypar.kahypar.NativeKahyparContext

public final class NativeKahyparContext extends Object
The NativeKahyparContext provides an object-oriented wrapper for a native KaHyPar Context object.
  • Method Details

    • configureFrom

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

      public NativeKahyparPartitioner createPartitionerFor(Hypergraph hypergraph)
      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.