Ejemplo n.º 1
0
        /// <summary>
        /// Determines if from <c>target</c> to leaf, there are no junctions - but direct branch, leading to leaf
        /// </summary>
        /// <param name="target">The target.</param>
        /// <param name="stepLimit">The step limit.</param>
        /// <returns>
        ///   <c>true</c> if [is branch to leaf] [the specified step limit]; otherwise, <c>false</c>.
        /// </returns>
        public static Boolean IsBranchToLeaf(this IGraphNode target, Int32 stepLimit = 50)
        {
            var result     = target.GetJunctionOrLeaf(stepLimit);
            var childNames = result.getChildNames();

            if (childNames.Count == 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }