Class LargestCommonSubgraph.Edge

java.lang.Object
org.cicirello.search.problems.LargestCommonSubgraph.Edge
Enclosing class:
LargestCommonSubgraph

public static final class LargestCommonSubgraph.Edge extends Object

This class is used to represent edges when specifying instances of the LargestCommonSubgraph problem. Instances of this class are immutable. The edges are undirected.

  • Constructor Details

    • Edge

      public Edge(int u, int v)
      Constructs an undirected edge.
      Parameters:
      u - An endpoint of the edge.
      v - The other endpoint of the edge.
  • Method Details

    • getU

      public int getU()
      Gets one endpoint of the edge. The edge is undirected, so there is no meaning behind which endpoint is which. Use the getV() method to get the other endpoint.
      Returns:
      one of the endpoints
    • getV

      public int getV()
      Gets one endpoint of the edge. The edge is undirected, so there is no meaning behind which endpoint is which. Use the getU() method to get the other endpoint.
      Returns:
      one of the endpoints