예제 #1
0
        public static void PrintExpansions(BigInteger maxZ, Expansion.Format expansionFormat = Expansion.Format.FullFormula, bool includeSpaces = false)
        {
            int digits = maxZ.ToString().Length + 1;             //Add 1 to be safe

            foreach (var expList in OptionsMatrixZFinder.IterateExpansionLists(maxZ))
            {
                PrintExpansionList(
                    expList.Value,
                    z: expList.Key,
                    digits: digits,
                    expansionFormat: expansionFormat,
                    includeSpaces: includeSpaces
                    );
            }
        }
예제 #2
0
 public static void PrintExpansionList(List <Expansion> expansionList, BigInteger z, int digits, Expansion.Format expansionFormat = Expansion.Format.FullFormula, bool includeSpaces = false)
 {
     Console.WriteLine(
         z.ToString().PadLeft(digits) + ","
         + expansionList.Count.ToString().PadLeft(digits) + ","
         + string.Join(
             ",",
             expansionList.Select(exp => "=" + exp.ToString(expansionFormat, includeSpaces))
             )
         );
 }