static void GetPeriod(ValuesA a, ValuesC c, ValuesM m, ValuesX0 x0) { var generator = new RandomSequenceGenerator ( EnumValuesParser.GetValueA(a), EnumValuesParser.GetValueC(c), EnumValuesParser.GetValueM(m), EnumValuesParser.GetValueX0(x0) ); //FileWriter.WritePartOfSequenceToFile(filePath, generator.GetNextSequencePart()); while (!generator.IsEnded) { generator.GetNextSequencePart(); } Console.WriteLine($"{count++}) Period: {generator.Period}"); Console.WriteLine(); }
public static long GetValueX0(ValuesX0 val) { switch (val) { case ValuesX0.val2: { return(2); } case ValuesX0.val4: { return(4); } case ValuesX0.val8: { return(8); } case ValuesX0.val16: { return(16); } case ValuesX0.val32: { return(32); } case ValuesX0.val64: { return(64); } case ValuesX0.val128: { return(128); } case ValuesX0.val256: { return(256); } case ValuesX0.val512: { return(512); } case ValuesX0.val1024: { return(1024); } case ValuesX0.val1: { return(1); } case ValuesX0.val3: { return(3); } case ValuesX0.val5: { return(5); } case ValuesX0.val7: { return(7); } case ValuesX0.val9: { return(9); } case ValuesX0.val11: { return(11); } case ValuesX0.val13: { return(13); } case ValuesX0.val17: { return(17); } case ValuesX0.val19: { return(19); } case ValuesX0.val23: { return(23); } case ValuesX0.val29: { return(29); } case ValuesX0.val31: { return(31); } case ValuesX0.val33: { return(33); } case ValuesX0.val37: { return(37); } case ValuesX0.val41: { return(41); } default: throw new Exception("Unknown value"); } }