equalToVertices method

bool equalToVertices(
  1. Vertex a,
  2. Vertex b
)

For checking if an Edge contains Vertices a and b.

Implementation

bool equalToVertices(Vertex a, Vertex b) {
  return this.a.equalsById(a) && this.b.equalsById(b) ||
      this.a.equalsById(b) && this.b.equalsById(a);
}