| 99 | } |
| 100 | |
| 101 | int |
| 102 | Vertex::addEdge(int otherTag) |
| 103 | { |
| 104 | // don't allow itself to be added |
| 105 | if (otherTag == this->getTag()) |
| 106 | return 0; |
| 107 | |
| 108 | // check the otherVertex has not already been added |
| 109 | return myAdjacency.insert(otherTag); |
| 110 | } |
| 111 | |
| 112 | |
| 113 | int |