public PrimeCountingMod2Odd(int threads) { this.threads = threads; var count = Math.Max(threads, 1); hyperbolicSum = new IDivisorSummatoryFunction <UInt128> [count]; for (var i = 0; i < count; i++) { hyperbolicSum[i] = new DivisorSummatoryFunctionOdd(0, true); } hyperbolicSumParallel = new DivisorSummatoryFunctionOdd(threads, true); }
public PrimeCountingMod3Odd(int threads, bool simple) { this.threads = threads; this.simple = simple; t3Map = new Dictionary <BigInteger, BigInteger>(); var count = Math.Max(threads, 1); hyperbolicSum = new IDivisorSummatoryFunction <BigInteger> [count]; for (var i = 0; i < count; i++) { if (simple) { hyperbolicSum[i] = new DivisionFreeDivisorSummatoryFunction(0, false, true); } else { hyperbolicSum[i] = new DivisorSummatoryFunctionOdd(0, false); } } }