Interface IMatching

All Superinterfaces:
Matching<Integer,Integer>

public interface IMatching extends Matching<Integer,Integer>
A matching in a IntGraph.

This interface is a specification of Matching for IntGraph. For the full documentation see Matching.

Author:
Barak Ugav
See Also:
  • Method Details Link icon

    • isVertexMatched Link icon

      boolean isVertexMatched(int vertex)
      Check whether a vertex is matched by the matching.

      A vertex v is said to be matched if the matching contains an edge (v,w) for some other vertex w.

      Parameters:
      vertex - a vertex
      Returns:
      true if vertex has an adjacent edge in the matching, else false
    • isVertexMatched Link icon

      @Deprecated default boolean isVertexMatched(Integer vertex)
      Deprecated.
      Please use isVertexMatched(int) instead to avoid un/boxing.
      Check whether a vertex is matched by the matching.

      A vertex v is said to be matched if the matching contains an edge (v,w) for some other vertex w.

      Specified by:
      isVertexMatched in interface Matching<Integer,Integer>
      Parameters:
      vertex - a vertex
      Returns:
      true if vertex has an adjacent edge in the matching, else false
    • getMatchedEdge Link icon

      int getMatchedEdge(int vertex)
      Get the only matched edge adjacent to a given vertex.
      Parameters:
      vertex - a vertex
      Returns:
      the edge adjacent to vertex in the matching, or -1 if vertex is not matched
    • getMatchedEdge Link icon

      @Deprecated default Integer getMatchedEdge(Integer vertex)
      Deprecated.
      Please use getMatchedEdge(int) instead to avoid un/boxing.
      Get the only matched edge adjacent to a given vertex.
      Specified by:
      getMatchedEdge in interface Matching<Integer,Integer>
      Parameters:
      vertex - a vertex
      Returns:
      the edge adjacent to vertex in the matching, or -1 if vertex is not matched
    • matchedVertices Link icon

      IntSet matchedVertices()
      Description copied from interface: Matching
      Get all the vertices matched by the matching.

      A vertex v is said to be matched if the matching contains an edge (v,w) for some other vertex w.

      Specified by:
      matchedVertices in interface Matching<Integer,Integer>
      Returns:
      all the matched vertices
    • unmatchedVertices Link icon

      IntSet unmatchedVertices()
      Description copied from interface: Matching
      Get all the vertices that are not matched by the matching.

      A vertex v is said to be matched if the matching contains an edge (v,w) for some other vertex w.

      Specified by:
      unmatchedVertices in interface Matching<Integer,Integer>
      Returns:
      all the unmatched vertices
    • containsEdge Link icon

      boolean containsEdge(int edge)
      Check whether an edge is part of the matching.

      A matching M is a sub set of E, the edge set of the graph. This method check whether a given edge is in M.

      Parameters:
      edge - an edge
      Returns:
      true if the edge is part of the matching, else false
    • containsEdge Link icon

      @Deprecated default boolean containsEdge(Integer edge)
      Deprecated.
      Please use containsEdge(int) instead to avoid un/boxing.
      Check whether an edge is part of the matching.

      A matching M is a sub set of E, the edge set of the graph. This method check whether a given edge is in M.

      Specified by:
      containsEdge in interface Matching<Integer,Integer>
      Parameters:
      edge - an edge
      Returns:
      true if the edge is part of the matching, else false
    • edges Link icon

      IntSet edges()
      Description copied from interface: Matching
      The collection of edges forming this matching.
      Specified by:
      edges in interface Matching<Integer,Integer>
      Returns:
      collection containing all the edges that are part of this matching