//--------- void RouteFind::step(const Problem & problem, Route visited) { if (visited.cost > this->bestSolution.cost) return; if (visited.back() == this->end) { if (visited.cost < this->bestSolution.cost) { this->bestSolution = visited; } return; } for (int i=0; i<problem.nodeCount; i++) { if (!hasVisited(i, visited)) { Journey j(visited.back(), i); float cost = problem.getSymmetricCost(j); if (cost == -1) continue; else { Route visitBranch(visited); visitBranch.addStep(i, cost); step(problem, visitBranch); } } } }
// // Traverse a branch node. Same comments in binary node apply here. // void TIntermTraverser::traverseBranch(TIntermBranch *node) { bool visit = true; if (preVisit) visit = visitBranch(PreVisit, node); if (visit && node->getExpression()) { incrementDepth(node); node->getExpression()->traverse(this); decrementDepth(); } if (visit && postVisit) visitBranch(PostVisit, node); }
inline void OctreeVisitor<TYPE>::visitBranchV ( const OctreeCell* subCells[8], const OctreeData& octreeData ) { visitBranch( subCells, octreeData ); }