Package org.netlib.util

Examples of org.netlib.util.intW


        double anorm = A.norm(Norm.One);

        double[] work = new double[3 * n];
        int[] iwork = new int[n];

        intW info = new intW(0);
        doubleW rcond = new doubleW(0);
        if (upper)
            LAPACK.getInstance().dpocon(UpLo.Upper.netlib(), n, Cu.getData(),
              Matrices.ld(n), anorm, rcond, work, iwork, info);
        else
View Full Code Here


        uplo = upper ? UpLo.Upper : UpLo.Lower;

        // Find the needed workspace
        double[] worksize = new double[1];
        int[] iworksize = new int[1];
        intW info = new intW(0);
        LAPACK.getInstance().dsbevd(job.netlib(), uplo.netlib(), n, 0, new double[0],
          1, new double[0], new double[0], Matrices.ld(n), worksize, -1, iworksize, -1, info);

        // Allocate workspace
        int lwork = 0, liwork = 0;
View Full Code Here

    private SymmBandEVD factor(Matrix A, double[] data, int kd)
            throws NotConvergedException {
        if (A.numRows() != n)
            throw new IllegalArgumentException("A.numRows() != n");

        intW info = new intW(0);
        LAPACK.getInstance().dsbevd(job.netlib(), uplo.netlib(), n, kd, data, Matrices.ld(kd + 1),
          w, job == JobEig.All ? Z.getData() : new double[0], Matrices.ld(n), work,
            work.length, iwork, iwork.length, info);

        if (info.val > 0)
View Full Code Here

     * @return The current decomposition
     */
    public DenseLU factor(DenseMatrix A) {
        singular = false;

        intW info = new intW(0);
        LAPACK.getInstance().dgetrf(A.numRows(), A.numColumns(),
                A.getData(), Matrices.ld(A.numRows()), piv, info);

        if (info.val > 0)
            singular = true;
View Full Code Here

        double anorm = A.norm(norm);

        int n = A.numRows();

        intW info = new intW(0);
        doubleW rcond = new doubleW(0);
        LAPACK.getInstance().dgecon(norm.netlib(), n, LU.getData(), Matrices.ld(n), anorm,
                rcond, new double[4 * n], new int[n], info);

        if (info.val < 0)
View Full Code Here

        if (singular)
            throw new MatrixSingularException();
        if (B.numRows() != LU.numRows())
            throw new IllegalArgumentException("B.numRows() != LU.numRows()");

        intW info = new intW(0);
        LAPACK.getInstance().dgetrs(trans.netlib(), LU.numRows(),
                B.numColumns(), LU.getData(), Matrices.ld(LU.numRows()),
                piv, B.getData(), Matrices.ld(LU.numRows()), info);

        if (info.val < 0)
View Full Code Here

        double[] Xd = ((DenseMatrix) X).getData();

        X.set(B);

        intW info = new intW(0);
        LAPACK.getInstance().dptsv(numRows, X.numColumns(),
                diag.clone(), offDiag.clone(), Xd, Matrices.ld(numRows), info);

        if (info.val > 0)
            throw new MatrixNotSPDException();
View Full Code Here

        int lwork;

        // Query optimal workspace. First for computing the factorization
        {
            work = new double[1];
            intW info = new intW(0);
            LAPACK.getInstance().dgerqf(m, n, new double[0], Matrices.ld(m), new double[0],
                    work, -1, info);

            if (info.val != 0)
                lwork = m;
            else
                lwork = (int) work[0];
            lwork = Math.max(1, lwork);
            work = new double[lwork];
        }

        // Workspace needed for generating an explicit orthogonal matrix
        {
            workGen = new double[1];
            intW info = new intW(0);
            LAPACK.getInstance().dorgrq(m, n, m, new double[0],Matrices.ld(m),
                    new double[0], workGen, -1, info);

            if (info.val != 0)
                lwork = m;
View Full Code Here

            throw new IllegalArgumentException("R == null");

        /*
         * Calculate factorisation, and extract the triangular factor
         */
        intW info = new intW(0);
        LAPACK.getInstance().dgerqf(m, n, A.getData(), Matrices.ld(m), tau, work,
                work.length, info);

        if (info.val < 0)
            throw new IllegalArgumentException();
View Full Code Here

        if (!upper && A.kl != kd)
            throw new IllegalArgumentException("A.kl != kd");

        notspd = false;

        intW info = new intW(0);
        if (upper)
            LAPACK.getInstance().dpbtrf(UpLo.Upper.netlib(), n, kd, A.getData(),
              Matrices.ld(kd + 1), info);
        else
            LAPACK.getInstance().dpbtrf(UpLo.Lower.netlib(), n, kd, A.getData(),
View Full Code Here

TOP

Related Classes of org.netlib.util.intW

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.