Package no.uib.cipr.matrix

Examples of no.uib.cipr.matrix.Vector.norm()


                Vector b = Matrices.random(A.numRows());
                Vector x = Matrices.random(A.numRows());
                x = A.solve(b, x);

                Vector y = A.multAdd(-1, x, x.copy().set(b));
                assertEquals(0, y.norm(Vector.Norm.Two), tol);
                assertEquals(Ad, A);
                return;
            } catch (MatrixSingularException e) {
                Utilities.addDiagonal(A, Ad, 1);
            } catch (MatrixNotSPDException e) {
View Full Code Here


                Vector b = Matrices.random(A.numRows());
                Vector x = Matrices.random(A.numRows());
                x = A.transSolve(b, x);

                Vector y = A.transMultAdd(-1, x, x.copy().set(b));
                assertEquals(0, y.norm(Vector.Norm.Two), tol);
                assertEquals(Ad, A);
                return;
            } catch (MatrixSingularException e) {
                Utilities.addDiagonal(A, Ad, 1);
            } catch (MatrixNotSPDException e) {
View Full Code Here

        ilut.setMatrix(A);
        ilut.apply(b, x);

        Vector r = A.multAdd(-1, x, b.copy());

        assertEquals(0, r.norm(Vector.Norm.TwoRobust), 1e-5);
    }

}
View Full Code Here

        icc.setMatrix(A);
        icc.apply(b, x);

        Vector r = A.multAdd(-1, x, b.copy());

        assertEquals(0, r.norm(Vector.Norm.TwoRobust), 1e-5);
    }

}
View Full Code Here

        ilu.setMatrix(A);
        ilu.apply(b, x);

        Vector r = A.multAdd(-1, x, b.copy());

        assertEquals(0, r.norm(Vector.Norm.TwoRobust), 1e-5);
    }
}
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.