3 edge::edge (
int f,
int t,
int c) : from(f), to(t), cost(c)
19 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.
int cost
The cost of the edge, i.e., length.
int to
The ending vertex of the edge.
A class for representing edges.
bool operator()(const edge &a, const edge &b) const
Compare two edge objects in terms of cost.
size_t operator()(const edge &e) const
Generate the hash of an edge.
int from
The starting vertex of the edge.
edge(int f, int t, int c)
Constructor that initializes the private member variables.