private PrecalculatedState[] CreateEmptyPrecalculatedStatesArray()
 {
     PrecalculatedState[] outputStates = new PrecalculatedState[MarkovChain.States];
     for (var i = 0; i < MarkovChain.States; i++)
     {
         outputStates[i] = PrecalculatedState.Nothing;
     }
     return(outputStates);
 }
 private void SetFlagForComplement(PrecalculatedState[] outputStates, PrecalculatedState flagToLookFor, PrecalculatedState flagToSet)
 {
     for (var i = 0; i < MarkovChain.States; i++)
     {
         if (!outputStates[i].HasFlag(flagToLookFor))
         {
             outputStates[i] |= flagToSet;
         }
     }
 }
        private double[] CreateDerivedVector(PrecalculatedState[] precalculatedStates, PrecalculatedState flagToLookFor)
        {
            var derivedVector = new double[MarkovChain.States];

            for (var i = 0; i < MarkovChain.States; i++)
            {
                if (precalculatedStates[i].HasFlag(flagToLookFor))
                {
                    derivedVector[i] = 1.0;
                }
                else
                {
                    derivedVector[i] = 0.0;
                }
            }
            return(derivedVector);
        }