コード例 #1
0
 internal CombinatoryConv(int maxClasses, double maxError)
 {
     this.maxClasses = maxClasses;
     this.comb       = new Combinatory();
     this.acum       = true;
     this.maxError   = maxError;
 }
コード例 #2
0
        /** Method:  Constructor
         * maxClasses -  maximum of classes allowed for histogram
         * maxCombTerms -  maximum of convolution terms for combinatory calculation
         * maxFftTerms -  maximum of convolution terms for fast fourier calculation
         * nThreads -  number of threads */
        internal Convolution(int maxClasses, int maxCombTerms, int maxFftTerms, int nThreads)
        {
            this.comb = new Combinatory();
            stat      = new StatFunctions();
            normal    = new NormalDistrib();
            fft       = new FFT();

            this.maxClasses   = maxClasses;
            this.maxCombTerms = maxCombTerms;
            this.maxFftTerms  = maxFftTerms;
            this.nThreads     = nThreads;
        }
コード例 #3
0
        public static void TestToToFourRefTypesNullCoalescing()
        {
            (object a, object b, object c, object d) = (new object(), null, new object(), null);

            // Craft the combinations of a, b, c, and d objects from 2 to four in length
            // and test if the null coalescing performs the same as the ternary operator.
            for (int i = 2; i < 4; i++)
            {
                foreach (var combination in Combinatory.Combinations(new[] { a, b, c, d }, i))
                {
                    AssertCombination(combination);
                }
            }
        }