Esempio n. 1
0
        private static void repeatedAssembly(IElementalAccessMatrix A, int nu)
        {
            for (int i = 0; i < repeat; ++i)
            {
                check(A, TesterUtilities.SetAssembleRowMatrix(A, nu));
                Blas.Default.Zero(A);

                check(A, TesterUtilities.setsAssembleRowMatrix(A, nu));
                Blas.Default.Zero(A);

                check(A, TesterUtilities.AddAssembleRowMatrix(A, nu));
                Blas.Default.Zero(A);

                check(A, TesterUtilities.addsAssembleRowMatrix(A, nu));
                Blas.Default.Zero(A);

                check(A, TesterUtilities.setAssembleColumnMatrix(A, nu));
                Blas.Default.Zero(A);

                check(A, TesterUtilities.setsAssembleColumnMatrix(A, nu));
                Blas.Default.Zero(A);

                check(A, TesterUtilities.addAssembleColumnMatrix(A, nu));
                Blas.Default.Zero(A);

                check(A, TesterUtilities.addsAssembleColumnMatrix(A, nu));
                Blas.Default.Zero(A);
            }
        }
Esempio n. 2
0
        /// <summary>Testing <see cref="SparseRowColumnMatrix"/> class.</summary>
        public virtual void SparseRowColumnMatrix()
        {
            int n  = TesterUtilities.getInt(nmax, _random),
                m  = TesterUtilities.getInt(mmax, _random),
                nu = GetNu(n, m);

            for (int i = 0; i < repeat; ++i)
            {
                IElementalAccessMatrix A = new SparseRowColumnMatrix(n, m, nu);
                check(A, TesterUtilities.SetAssembleRowMatrix(A, nu));

                A = new SparseRowColumnMatrix(n, m, nu);
                check(A, TesterUtilities.AddAssembleRowMatrix(A, nu));
            }
        }