Package com.jgalgo

Interface VertexCover.Result

  • Enclosing interface:
    VertexCover

    public static interface VertexCover.Result
    A result object of VertexCover computation.

    The result object is basically the set of vertices that form the cover.

    Author:
    Barak Ugav
    • Method Detail

      • vertices

        IntCollection vertices()
        Get the vertices which are included in the cover.
        Returns:
        the vertices that are included in the cover
      • isInCover

        boolean isInCover​(int vertex)
        Check whether a vertex is included in the cover.
        Parameters:
        vertex - a graph vertex identifier
        Returns:
        true if vertex is included in the cover
      • weight

        double weight​(WeightFunction w)
        Get the weight of the cover with respect to a vertex weight function.
        Parameters:
        w - a vertex weight function
        Returns:
        the weight sum of the vertices of the cover