Example #1
0
File: Model.cs Project: Ring-r/opt
 public bool MoveNextInNode(CheckedBoolFunction ChF)
 {
     do
     {
         if (!current.Rebuild(ChF))
             return true;
         current = current.next.cros.next;
     } while (current != start);
     return false;
 }
Example #2
0
File: Model.cs Project: Ring-r/opt
 public bool MoveNextInTriple(CheckedBoolFunction ChF, CheckedVoidFunction FF)
 {
     do
     {
         if (!current.Rebuild(ChF))
             return true;
         FF(current);
         current = current.next;
     } while (current != start);
     return false;
 }
Example #3
0
File: Model.cs Project: Ring-r/opt
        /// <summary>
        /// Переразбиение двух соседних троек при невыполнении условия некоторого формирования троек в модели.
        /// </summary>
        /// <param name="ChF">Метод проверяющий правильность выполнения условия.</param>
        /// <returns>Возвращает true, если произошло хотябы одно переразбиение.</returns>
        public bool Rebuild(CheckedBoolFunction ChF)
        {
            bool res = !ChF(this);
            if (res)
                Rebuild();
            return res;

        }