Home | History | Annotate | Download | only in meta

Lines Matching refs:Node

29 // A Graph is a Map from each node to a set containing its neighbors.
44 // DfsVisit(VisitedSet, VisitingSet, Node) does a DFS visit starting at Node and returns a
46 // of the loop starting at Node (if any loop was found) or Null otherwise.
48 template <typename VisitedSet, typename VisitingSet, typename Node>
50 using NewVisitingSet = AddToSetUnchecked(VisitingSet, Node);
60 // Found a loop in another neighbor of the same node, we don't need to
66 using NewVisitedSet = AddToSet(VisitedSet, Node);
67 using Neighbors = GraphFindNeighbors(ImmutableG, Node);
72 If(IsInSet(Node, VisitingSet),
73 // We've just found a loop, since Node is another node that we're currently
75 Triplet<VisitedSet, Vector<Node>, Bool<false>>,
81 If(VectorEndsWith(GetSecond(Result) /* Loop */, Node),
84 // Loop still not complete, add the current node.
85 ConsTriplet(GetFirst(Result), PushFront(GetSecond(Result), Node), Bool<false>))))));
91 template <typename CurrentResult, typename Node>
93 using DfsResult = DfsVisit(GetFirst(CurrentResult), EmptySet, Node);