14 typedef size_t Vertex;
37 Edge(Vertex u, Vertex v,
string lbl) :
38 source(u), dest(v), weight(-1), label(lbl) { }
47 Edge(Vertex u, Vertex v,
int w,
string lbl) :
48 source(u), dest(v), weight(w), label(lbl) { }
54 source(-1), dest(-1), weight(-1), label(
"") { }
64 return weight < other.weight;
Represents an edge in a graph; used by the Graph class.
Definition: edge.h:22
Edge()
Default constructor.
Definition: edge.h:53
Edge(Vertex u, Vertex v, string lbl)
Parameter constructor for unweighted graphs.
Definition: edge.h:37
Edge(Vertex u, Vertex v, int w, string lbl)
Parameter constructor for weighted graphs.
Definition: edge.h:47
bool operator<(const Edge &other) const
Compares two Edges.
Definition: edge.h:62