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); }
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); }
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)); }