protected override PatternNodePPA ComputeMaximalDepth(PatternNodePPA node,
                                                              IPermutationsCollection avoidedPermutations,
                                                              int depthComputed, ResultPPA result)
        {
            List <PatternNodePPA> nodes = Compute(node, avoidedPermutations, depthComputed - 1, result);

            foreach (var nodeProcessed in nodes)
            {
                result.TryProcessNodeChildren(nodeProcessed);
            }

            return(node);
        }
        protected void ComputeStepProcessChildren(PatternNodePPA node, ResultPPA result)
        {
            PatternNodePPA parent = node.Parent;

            List <PatternNodePPA>[] descendants;
            parent.TryGetDescendants(out descendants);
            List <PatternNodePPA> nodes = descendants[node.PositionPrecedingLetters(node.Permutation.Length - 1)];

            foreach (var nodeProcessed in nodes)
            {
                result.TryProcessNodeChildren(nodeProcessed);
            }
        }