Package no.uib.cipr.matrix

Examples of no.uib.cipr.matrix.DenseVector


        super(numRows, numColumns);
        this.comm = comm;
        this.A = A;
        this.B = B;

        locR = new DenseVector(numRows);
        locC = new DenseVector(numColumns);
        rank = comm.rank();
        size = comm.size();
        n = new int[size + 1];
        m = new int[size + 1];
View Full Code Here


        this.comm = A.getCommunicator();
        rank = comm.rank();
        size = comm.size();

        A0 = new DenseMatrix(size, size);
        b0 = new DenseVector(size);
        lu = new DenseLU(size, size);

        Ai = new double[size];
        if (rank == root) {
            Ai0 = new double[size][size];
View Full Code Here

        this.comm = A.getCommunicator();
        rank = comm.rank();
        size = comm.size();

        A0 = new DenseMatrix(size, size);
        b0 = new DenseVector(size);
        lu = new DenseLU(size, size);

        Ai = new double[size];
        if (rank == root) {
            Ai0 = new double[size][size];
View Full Code Here

    entries[0] = 0.0;
    entries[1] = 0.0;
    entries[2] = 1.0;
    entries[3] = 0.0;
    entries[4] = 2.0;
    Vector dense = new DenseVector(entries, false);
    vector = new SparseVector(dense);

    // NOTE: must compact before calling getIndex()!!!
    // vector.compact();
    index = vector.getIndex();
View Full Code Here

        + index.length + ", with elements " + Arrays.toString(index);
  }

  public void testBug27() {
    double[] tfVector = {0.0,0.5,0.0,0.4,0.0};
    DenseVector dense= new DenseVector(tfVector, false);
    SparseVector vectorTF =  new SparseVector(dense);
    vectorTF.compact();

    assertTrue(vectorTF.getUsed() == 2)// vectorTF.getUsed() returns 5
View Full Code Here

            Communicator comm = coll.createCommunicator(rank);

            Matrix A = createMatrix(comm);
            populateMatrix(A);

            DenseVector bl = new DenseVector(localLength[rank]);
            DistVector b_dist = new DistVector(x.size(), comm, bl);
            DistVector x_dist = b_dist.copy();

            int[] n = getRowOwnerships(A);
            for (int i = n[rank]; i < n[rank + 1]; ++i)
View Full Code Here

        do {
            Utilities.addDiagonal(A_symm, shift);
        } while (!Utilities.spd(A_symm));

        x = new DenseVector(n);
        b_unsymm = x.copy();
        b_symm = x.copy();

        Utilities.populate(x);
        A_unsymm.mult(x, b_unsymm);
View Full Code Here

            throw new IllegalArgumentException(
                    "ICC only applies to square matrices");

        this.R = R;
        int n = R.numRows();
        y = new DenseVector(n);
    }
View Full Code Here

            throw new IllegalArgumentException(
                    "ILU only applies to square matrices");

        this.LU = LU;
        int n = LU.numRows();
        y = new DenseVector(n);
    }
View Full Code Here

            int n = I.numRows(), c = I.numColumns();
            FlexCompRowMatrix Ac = new FlexCompRowMatrix(c, c);

            double[] aiCol = new double[n];
            double[] iCol = new double[n];
            DenseVector aiV = new DenseVector(aiCol, false);
            DenseVector iV = new DenseVector(iCol, false);
            double[] itaiCol = new double[c];
            DenseVector itaiV = new DenseVector(itaiCol, false);

            int[] colptr = I.getColumnPointers();
            int[] rowind = I.getRowIndices();
            double[] Idata = I.getData();
View Full Code Here

TOP

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

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.