Ejemplo n.º 1
0
        /// <summary>
        /// Check if the class have to pass the moved down test
        /// </summary>
        /// <param name="s">The split to check</param>
        /// <param name="classIndex">The class index to check in the 's' split</param>
        /// <param name="splitSofs">The SoFs corresponding to classes</param>
        /// <returns></returns>
        public virtual bool HaveToMoveDown(Split s, int classIndex, List <int> splitSofs)
        {
            // some exceptions:
            if (ParameterTopSplitExceptionValue == 1 && s.Number == 1)
            {
                // if the ParameterTopSplitExceptionValue is set to 1
                // and it is the first split.
                // -> never move down classes on it
                return(false);
            }

            if (s.Number == Splits.Count)
            {
                // if the split is the last one

                // -> never move down classes on it
                return(false);
            }


            if (!s.GetClassesIndex().Contains(classIndex))
            {
                // the split doest not contains the class

                return(false);
            }
            // -->

            return(TestIfMoveDownNeeded(s, classIndex, splitSofs));
        }