MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / dfsVisit_

Method dfsVisit_

src/openms_gui/source/VISUAL/TOPPASScene.cpp:572–594  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

570 }
571
572 bool TOPPASScene::dfsVisit_(TOPPASVertex* vertex)
573 {
574 vertex->setDFSColor(TOPPASVertex::DFS_GRAY);
575 for (TOPPASVertex::ConstEdgeIterator it = vertex->outEdgesBegin(); it != vertex->outEdgesEnd(); ++it)
576 {
577 TOPPASVertex* target = (*it)->getTargetVertex();
578 if (target->getDFSColor() == TOPPASVertex::DFS_WHITE)
579 {
580 if (dfsVisit_(target))
581 {
582 // back edge found
583 return true;
584 }
585 }
586 else if (target->getDFSColor() == TOPPASVertex::DFS_GRAY)
587 {
588 // back edge found
589 return true;
590 }
591 }
592 vertex->setDFSColor(TOPPASVertex::DFS_BLACK);
593 return false;
594 }
595
596 void TOPPASScene::resetDownstream(TOPPASVertex* vertex)
597 {

Callers

nothing calls this directly

Calls 5

setDFSColorMethod · 0.80
outEdgesBeginMethod · 0.80
outEdgesEndMethod · 0.80
getTargetVertexMethod · 0.80
getDFSColorMethod · 0.80

Tested by

no test coverage detected