Package no.uib.cipr.matrix

Examples of no.uib.cipr.matrix.Vector


    }

    public void testPentaDiagonal() {
        int n = Utilities.getInt(1, 10);
        Matrix A = new DenseMatrix(n, n);
        Vector x = new DenseVector(n);

        for (int i = 0; i < n; ++i) {
            A.set(i, i, 4);
            x.set(i, 1);
        }
        for (int i = 0; i < n - 1; ++i) {
            A.set(i, i + 1, -1);
            A.set(i + 1, i, -1);
        }
View Full Code Here


*/
public class ICCTest extends IncompleteFactorizationTestAbstract {

    @Override
    void testFactorization(Matrix A, Vector x) {
        Vector b = A.mult(x, x.copy());

        ICC icc = new ICC(new CompRowMatrix(A));
        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

*/
public class ILUTest extends IncompleteFactorizationTestAbstract {

    @Override
    void testFactorization(Matrix A, Vector x) {
        Vector b = A.mult(x, x.copy());

        ILU ilu = new ILU(new CompRowMatrix(A));
        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

  @Override
  public Vector getVector(String aTerm)
    throws SimilarityException
  {
    Vector vec1 = new SparseVector(getConceptCount());
    builder.buildVector(asList(aTerm), VectorAdapter.create(vec1));
    return vec1;
  }
View Full Code Here

TOP

Related Classes of no.uib.cipr.matrix.Vector

Copyright © 2018 www.massapicom. 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.