#include "ISPath.hh" bool ISPath::hasLoop() const { map nodeID2flag; for( uint i=0 ; i::const_iterator it = nodeID2flag.find( nodeID ); if( it != nodeID2flag.end() ){ return true; } nodeID2flag.insert( map::value_type(nodeID, true) ); } return false; } string ISPath::getLine() const { string line = (string)""; for( uint i=0 ; i0 ){ line += "|"; } line += Utils::itoa( path.at(i) ); } line += "\t"; for( uint i=0 ; iaddNode( nodeID, nodeLength ); return root; } ISPath* ISPath::instantiateNextPath( const ISPath* p, IDnum nextNodeID, long nextNodeLength ){ ISPath* nextPath = new ISPath(); for( uint i=0 ; igetPathLength() ; ++i ){ nextPath->addNode( p->getNodeID(i), p->getNodeLength(i) ); } nextPath->addNode( nextNodeID, nextNodeLength ); return nextPath; }