int fill() { setHS1(conn1->getHS1()); setHS2(conn1->getHS2()); #ifdef TEST3 if( getVertex2()->getGraphRoot() != getVertex1()->getGraphRoot() ) { //std::cout << "TOUCH" << std::endl; return -1; // nodes belong to different roots, i.e. different graphs } #endif return 0; }
std::string Graph::Edge::toString() { return "Edge: {v1: " + std::to_string(getVertex1()+1) + ", v2: " + std::to_string(getVertex2()+1) + ", weight: " + std::to_string(getWeight()) + "}"; }
void TwoColoredLine::getVertices(vector<Vector3>& vertices) const { vertices.push_back(getVertex1()); vertices.push_back(getVertex2()); }