コード例 #1
0
        private static void SetNodeWeights(TreeContext context, IDependency dependency, IDependency dep2)
        {
            if (context.IsParent(dependency.Token, dep2.Token) || context.IsParent(dep2.Token, dependency.Token))
            {
                return;
            }

            SetNodeWeights(context, dependency);
            SetNodeWeights(context, dep2);
        }
コード例 #2
0
        private static void SetNodeWeights(TreeContext context, IDependency dependency, IDependency dep2)
        {
            if (context.IsParent(dependency.Token, dep2.Token) || context.IsParent(dep2.Token, dependency.Token))
            {
                return;
            }

            SetNodeWeights(context, dependency);
            SetNodeWeights(context, dep2);
        }
コード例 #3
0
 private static bool DependencyIsAbsorbed(this TreeContext context, IDependency dependency, INode node)
 {
     if (dependency.Type == DependencyType.Single && dependency.Token == node.Token)
     {
         return(true);
     }
     return(context.IsParent(dependency.Token, node.Token));
 }