Examples of DenseMatrix


Examples of no.uib.cipr.matrix.DenseMatrix

        assertEquals(A, QR.factorize(A));
    }

    public void testFactor() {
        QR qr = new QR(A.numRows(), A.numColumns());
        assertEquals(A, qr.factor(new DenseMatrix(A)));
    }
View Full Code Here

Examples of no.uib.cipr.matrix.DenseMatrix

        assertEquals(A, qr.factor(new DenseMatrix(A)));
    }

    public void testRepeatFactor() {
        QR qr = new QR(A.numRows(), A.numColumns());
        qr.factor(new DenseMatrix(A));
        assertEquals(A, qr);
        qr.factor(new DenseMatrix(A));
        assertEquals(A, qr);
    }
View Full Code Here

Examples of no.uib.cipr.matrix.DenseMatrix

        assertEquals(Ar, QR.factorize(Ar));
    }

    public void testFactorNonSquare() {
        QR qr = new QR(Ar.numRows(), Ar.numColumns());
        assertEquals(Ar, qr.factor(new DenseMatrix(Ar)));
    }
View Full Code Here

Examples of no.uib.cipr.matrix.DenseMatrix

        assertEquals(Ar, qr.factor(new DenseMatrix(Ar)));
    }

    public void testRepeatFactorNonSquare() {
        QR qr = new QR(Ar.numRows(), Ar.numColumns());
        qr.factor(new DenseMatrix(Ar));
        assertEquals(Ar, qr);
        qr.factor(new DenseMatrix(Ar));
        assertEquals(Ar, qr);
    }
View Full Code Here

Examples of no.uib.cipr.matrix.DenseMatrix

        BandLU lu = new BandLU(n, kl, ku);
        lu.factor(A.copy());

        lu.solve(I);

        Matrix J = I.mult(A, new DenseMatrix(n, n));
        for (int i = 0; i < n; ++i)
            for (int j = 0; j < n; ++j)
                if (i != j)
                    assertEquals(J.get(i, j), 0, 1e-10);
                else
View Full Code Here

Examples of no.uib.cipr.matrix.DenseMatrix

        BandLU lu = new BandLU(n, kl, ku);
        lu.factor(A.copy());

        lu.transSolve(I);

        Matrix J = I.transAmult(A, new DenseMatrix(n, n));
        for (int i = 0; i < n; ++i)
            for (int j = 0; j < n; ++j)
                if (i != j)
                    assertEquals(J.get(i, j), 0, 1e-10);
                else
View Full Code Here

Examples of no.uib.cipr.matrix.DenseMatrix

        BandCholesky c = new BandCholesky(n, kl, false);
        c.factor(L.copy());

        c.solve(I);

        Matrix J = I.mult(L, new DenseMatrix(n, n));
        for (int i = 0; i < n; ++i)
            for (int j = 0; j < n; ++j)
                if (i != j)
                    assertEquals(J.get(i, j), 0, 1e-10);
                else
View Full Code Here

Examples of no.uib.cipr.matrix.DenseMatrix

        BandCholesky c = new BandCholesky(n, ku, true);
        c.factor(U.copy());

        c.solve(I);

        Matrix J = I.mult(U, new DenseMatrix(n, n));
        for (int i = 0; i < n; ++i)
            for (int j = 0; j < n; ++j)
                if (i != j)
                    assertEquals(J.get(i, j), 0, 1e-10);
                else
View Full Code Here

Examples of no.uib.cipr.matrix.DenseMatrix

    }

    @Override
    protected void setUp() throws Exception {
        int n = Utilities.getInt(1, max);
        A = new DenseMatrix(n, n);
    }
View Full Code Here

Examples of org.apache.mahout.math.DenseMatrix

  public void testHebbianSolver() throws Exception {
    int numColumns = 800;
    Matrix corpus = randomSequentialAccessSparseMatrix(1000, 900, numColumns, 30, 1.0);
    int rank = 50;
    Matrix eigens = new DenseMatrix(rank, numColumns);
    TrainingState state = new TrainingState(eigens, null);
    long optimizedTime = timeSolver(corpus,
                                    0.00001,
                                    5,
                                    rank,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.