public static int UnaryCount(int size, int startIndex, int count = 1)
        {
            int unaryCount   = 0;
            var endofunctors = Enumerable
                               .Range(startIndex, count)
                               .Select(index => UniqueUnaryAutomata.Generator.GetUniqueAutomatonFromCached(size, index))
                               .Take(count);

            foreach (int[] endoFunctor in endofunctors)
            {
                bool[] isVertInAcTab;
                int    AcSize = AddingBTransition.MakeIsVertInAcTabAndGetAcSize(endoFunctor, out isVertInAcTab);
                if (IsAcSizeInRange(size, AcSize))
                {
                    unaryCount++;
                }
            }
            return(unaryCount);
        }
        public IEnumerable <CoreDefinitions.IOptionalAutomaton> GetAllAcAutomataToCheck(int size, int index)
        {
            byte[] TranA = new byte[size], TranB = new byte[size];
            CoreDefinitions.IOptionalAutomaton unaryAutomata = new CoreDefinitions.OptionalAutomaton(TranA, TranB);

            var endoFunctor = UniqueUnaryAutomata.Generator.GetUniqueAutomatonFromCached(size, index);

            bool[] isVertInAcTab;
            int    AcSize = AddingBTransition.MakeIsVertInAcTabAndGetAcSize(endoFunctor, out isVertInAcTab);

            if (IsAcSizeInRange(size, AcSize))
            {
                for (int i = 0; i < size; i++)
                {
                    unaryAutomata.TransitionFunctionsA[i] = (byte)endoFunctor[i];
                }
                AddingBTransition addingBTransition = new AddingBTransition(unaryAutomata, isVertInAcTab);
                foreach (CoreDefinitions.IOptionalAutomaton acAutomata in addingBTransition.GenerateAc())
                {
                    yield return(acAutomata);
                }
            }
        }