public interface Hypergraph
The Hypergraph interface defines the contract of the data structures representing hypergraphs.
  • Method Details

    • getNumberOfVertices

      int getNumberOfVertices()
      Gives the number of vertices in this hypergraph.
      Returns:
      The number of vertices.
    • getVertexWeights

      int[] getVertexWeights()
      Gives the weights of the vertices in this hypergraph.
      Returns:
      The weights of the vertices, or null if vertices are not weighted.
    • getNumberOfHyperedges

      int getNumberOfHyperedges()
      Gives the number of hyperedges in this hypergraph.
      Returns:
      The number of hyperedges.
    • getHyperedge

      Hyperedge getHyperedge(int index)
      Gives the index-th hyperedge in this hypergraph.
      Parameters:
      index - The index of the hyperedge to get.
      Returns:
      The index-th hyperedge.
    • getHyperedgeWeights

      int[] getHyperedgeWeights()
      Gives the weights of the hyperedges in this hypergraph.
      Returns:
      The weights of the hyperedges, or null if hyperedges are not weighted.
    • getHyperedgeIndices

      long[] getHyperedgeIndices()
      Gives the indices at which the vertices of each hyperedge start in the array returned by getHyperedgeVertices().
      Returns:
      The indices of the vertices for each hyperedge.
      See Also:
    • getHyperedgeVertices

      int[] getHyperedgeVertices()
      Gives the vertices of the hyperedges in the hypergraph.
      Returns:
      The vertices of the different hyperedges.
      See Also:
    • toString

      String toString()
      Gives a String representation of this hypergraph using the hMetis format.
      Overrides:
      toString in class Object
      Returns:
      The String representation of this hypergraph.