Lines Matching refs:root
94 /// given root atom. Uses the tortoise and hare algorithm to detect a
98 const DefinedAtom *root) {
99 const DefinedAtom *tortoise = root;
100 const DefinedAtom *hare = followOnNexts[root];
117 "> has no follow-on root!"))
126 "> is not reachable from its root!"))
156 for (const DefinedAtom *root : roots)
157 checkNoCycleInFollowonChain(_registry, _followOnNexts, root);
186 // Find the root of the chain if it is a part of a follow-on chain.
276 // The target atom must be in the chain of its root.
299 // The target atom must be in the chain of its root.
305 // Set the root of all atoms in targetAtom's chain to the given root.
307 const DefinedAtom *root) {
308 // Walk through the followon chain and override each node's root.
310 _followOnRoots[targetAtom] = root;
321 /// The followOnRoots map contains a mapping of a DefinedAtom to its root
325 /// a) If the atom is first seen, then make that as the root atom
326 /// b) The targetAtom which this Atom contains, has the root thats set to the
327 /// root of the current atom
328 /// c) If the targetAtom is part of a different tree and the root of the
331 /// d) If the targetAtom is part of a different chain and the root of the
349 // root atom.
355 // If the targetAtom is not a root of any chain, let's make the root of
356 // the targetAtom to the root of the current chain.
369 // If the targetAtom is the root of a chain, the chain becomes part of
370 // the current chain. Rewrite the subchain's root to the current
371 // chain's root.
428 const auto *root = (ri == _followOnRoots.end()) ? atom.get() : ri->second;
430 ret.push_back(SortKey(std::move(atom), root, override));