-/**
- * Checks whether one CycleNode can reach another.
- * @param from The CycleNode from which to begin exploration
- * @param to The CycleNode to reach
- * @return True, @a from can reach @a to; otherwise, false
- */
-bool CycleGraph::checkReachable(CycleNode *from, CycleNode *to) {
- std::vector<CycleNode *, ModelAlloc<CycleNode *> > queue;
- HashTable<CycleNode *, CycleNode *, uintptr_t, 4, model_malloc, model_calloc, model_free> discovered(64);
-
- queue.push_back(from);
- discovered.put(from, from);
- while(!queue.empty()) {
- CycleNode * node=queue.back();
- queue.pop_back();
- if (node==to)
- return true;
-
- for(unsigned int i=0;i<node->getEdges()->size();i++) {
- CycleNode *next=(*node->getEdges())[i];
- if (!discovered.contains(next)) {
- discovered.put(next,next);
- queue.push_back(next);
- }
- }
- }
- return false;