35 return hash<string>()(to_string(e.
cost) + to_string(e.
from) + to_string(e.
to));
bool operator==(const edge &e) const
Compare this edge to another one.
size_t operator()(const edge &e) const
Generate the hash of an edge.
edge(int f, int t, int c, bool v=false)
Constructor that initializes the private member variables.
int cost
The cost of the edge, i.e., length.
int to
The ending vertex of the edge.
A class for representing edges.
bool vertical
Whether the sweeping pattern is vertical or horizontal.
int from
The starting vertex of the edge.
bool vertical
Whether the sweeping pattern is vertical or horizontal.
bool operator()(const edge &a, const edge &b) const
Compare two edge objects. Edges are compared in terms of cost, orientation, and the position...