| 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 | { |
nothing calls this directly
no test coverage detected