Package org.netlib.util

Examples of org.netlib.util.intW


        /*
         * Calculate factorisation, and extract the triangular factor
         */

        intW info = new intW(0);
        LAPACK.getInstance().dgeqlf(m, n, A.getData(), Matrices.ld(m), tau, work,
                work.length, info);

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


        if (n != A.numRows())
            throw new IllegalArgumentException("n != A.numRows()");

        notspd = false;

        intW info = new intW(0);
        if (upper)
            LAPACK.getInstance().dpptrf(UpLo.Upper.netlib(), A.numRows(),
                    A.getData(), info);
        else
            LAPACK.getInstance().dpptrf(UpLo.Lower.netlib(), A.numRows(),
View Full Code Here

        if (notspd)
            throw new MatrixNotSPDException();
        if (B.numRows() != n)
            throw new IllegalArgumentException("B.numRows() != n");

        intW info = new intW(0);
        if (upper)
            LAPACK.getInstance().dpptrs(UpLo.Upper.netlib(), Cu.numRows(),
                    B.numColumns(), Cu.getData(), B.getData(), Matrices.ld(Cu.numRows()), info);
        else
            LAPACK.getInstance().dpptrs(UpLo.Lower.netlib(), Cl.numRows(),
View Full Code Here

        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().dppcon(UpLo.Upper.netlib(), n, Cu.getData(), anorm,
                    rcond, work, iwork, info);
        else
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().dgeqrf(m, n, new double[0], Matrices.ld(m), new double[0],
                    work, -1, info);

            if (info.val != 0)
                lwork = n;
            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().dorgqr(m, n, k, new double[0],
              Matrices.ld(m), new double[0], workGen, -1, info);

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

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

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

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

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

        X.set(B);

        intW info = new intW(0);
        LAPACK.getInstance().dtbtrs(uplo.netlib(), trans.netlib(), diag.netlib(),
          numRows, kd, X.numColumns(), data, Matrices.ld(kd + 1), Xd, Matrices.ld(n),
          info);

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

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

        X.set(B);

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

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

    Q = new DenseMatrix(m, m);
    R = new DenseMatrix(m, n);
    Afact = new DenseMatrix(m, Math.max(m, n));

    int lwork1, lwork2;
    intW info = new intW(0);
    double dummy[] = new double[1];
    double ret[] = new double[1];

    LAPACK lapack = LAPACK.getInstance();
View Full Code Here

    Afact.zero();
    for (MatrixEntry e : A) {
      Afact.set(e.row(), e.column(), e.get());
    }

    intW info = new intW(0);
    LAPACK lapack = LAPACK.getInstance();

    /*
     * Calculate factorisation
     */
 
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.