Class UnweightedHyperedge

java.lang.Object
fr.univartois.cril.jkahypar.hypergraph.UnweightedHyperedge
All Implemented Interfaces:
Hyperedge

public final class UnweightedHyperedge extends Object implements Hyperedge
The UnweightedHyperedge represents a Hyperedge for which no weight is considered.
  • Method Details

    • joining

      public static UnweightedHyperedge joining(int... vertices)
      Creates a new UnweightedHyperedge.
      Parameters:
      vertices - The vertices joined by the hyperedge.
      Returns:
      The created hyperedge.
    • joining

      public static UnweightedHyperedge joining(List<Integer> vertices)
      Creates a new UnweightedHyperedge.
      Parameters:
      vertices - The vertices joined by the hyperedge.
      Returns:
      The created hyperedge.
    • size

      public int size()
      Description copied from interface: Hyperedge
      Gives the size of this hyperedge, measured as the number of vertices it joins.
      Specified by:
      size in interface Hyperedge
      Returns:
      The size of this hyperedge.
    • getVertices

      public int[] getVertices()
      Description copied from interface: Hyperedge
      Gives the vertices that are joined by this hyperedge in the hypergraph.
      Specified by:
      getVertices in interface Hyperedge
      Returns:
      The vertices joined by this hyperedge.
    • withWeight

      public WeightedHyperedge withWeight(int weight)
      Creates a hyperedge joining the same vertices as this one, and having the given weight.
      Parameters:
      weight - The weight of the hyperedge to create.
      Returns:
      The created hyperedge.
    • toString

      public String toString()
      Description copied from interface: Hyperedge
      Gives the String representation of this hyperedge in the hMetis format.
      Specified by:
      toString in interface Hyperedge
      Overrides:
      toString in class Object
      Returns:
      The hMetis representation of this hyperedge.