Examples of DenseMatrix


Examples of ch.akuhn.matrix.DenseMatrix

        for (int i = 0; i < x.length; i++) {
            for (int j = 0; j < x.length; j++) {
                dist[i][j] = dist(i,j);
            }
        }
        return new DenseMatrix(dist);
    }
View Full Code Here

Examples of ch.akuhn.matrix.DenseMatrix

        if (fListener != null) fListener.update(mds);
        return mds.points();
    }

    public MultidimensionalScaling similarities(double[][] matrix) {
      DenseMatrix d = SymmetricMatrix.fromSquare(matrix);
        d.apply(Function.COSINE_TO_DISSIMILARITY);
        fdistances = d;
        return this;
    }
View Full Code Here

Examples of ch.akuhn.matrix.DenseMatrix

                for (int j = 0; j < path.length; j++) {
                    path[i][j] = Math.min(path[i][j], path_i_k + path[k][j]);
                }
            }
        }
        return new DenseMatrix(path);
    }
View Full Code Here

Examples of no.uib.cipr.matrix.DenseMatrix

        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) {
View Full Code Here

Examples of no.uib.cipr.matrix.DenseMatrix

        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) {
View Full Code Here

Examples of no.uib.cipr.matrix.DenseMatrix

    private void solveCoarseSystem(boolean transpose) {
        for (int i = 0; i < size; ++i)
            b0.set(i, zi0[i][0]);

        if (transpose)
            lu.transSolve(new DenseMatrix(b0, false));
        else
            lu.solve(new DenseMatrix(b0, false));

        double[] data = b0.getData();
        for (int i = 0; i < size; ++i)
            zi0[i][0] = data[i];
    }
View Full Code Here

Examples of no.uib.cipr.matrix.DenseMatrix

        @Override
        protected Matrix createMatrix(Communicator comm) {
            int n = x.size();

            Matrix Al = new DenseMatrix(localLength[rank], localLength[rank]);
            Matrix Bl = new DenseMatrix(localLength[rank], n);

            return new DistRowMatrix(n, n, comm, Al, Bl);
        }
View Full Code Here

Examples of no.uib.cipr.matrix.DenseMatrix

        @Override
        protected Matrix createMatrix(Communicator comm) {
            int n = x.size();

            Matrix Al = new DenseMatrix(localLength[rank], localLength[rank]);
            Matrix Bl = new DenseMatrix(n, localLength[rank]);

            return new DistColMatrix(n, n, comm, Al, Bl);
        }
View Full Code Here

Examples of no.uib.cipr.matrix.DenseMatrix

    @Override
    protected void createPrimary() throws Exception {
        int n = Utilities.getInt(1, max);
        int m = Utilities.getInt(1, max);
        A = new DenseMatrix(n, m);
        Ad = Utilities.populate(A);
    }
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);
    Utilities.populate(A);
    Utilities.addDiagonal(A, 1);
    while (Utilities.singular(A))
      Utilities.addDiagonal(A, 1);
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.