#include #include #include "vertex.h" using std::ostream; using std::string; vertex::vertex() : name(""), visited(false) {} vertex::vertex(const string nm) : name(nm), visited(false) {} vertex::vertex(const char* nm) : name(nm), visited(false) {} vertex::vertex(const vertex& v) : name(v.name), visited(v.visited) {} vertex& vertex::operator=(const vertex& v) { name = v.name; visited = v.visited; return *this; } bool vertex::operator==(const vertex& v) const { return name==v.name; } bool vertex::operator!=(const vertex& v) const { return name!=v.name; } ostream& operator<<(ostream& strm, const vertex& v) { strm << v.name; return strm; }