Package org.netlib.util

Examples of org.netlib.util.intW


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

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

        intW info = new intW(0);
        doubleW rcond = new doubleW(0);
        if (upper)
            LAPACK.getInstance().dpbcon(UpLo.Upper.netlib(), n, kd, Cu.getData(),
              Matrices.ld(kd + 1), anorm, rcond, work, lwork, info);
        else
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().dpbtrs(UpLo.Upper.netlib(), n, kd, B.numColumns(),
                    Cu.getData(), Matrices.ld(kd + 1), B.getData(), Matrices.ld(n), info);
        else
            LAPACK.getInstance().dpbtrs(UpLo.Lower.netlib(), n, kd, B.numColumns(),
View Full Code Here

        isuppz = new int[2 * Math.max(1, n)];

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

        // Allocate workspace
        int lwork = 0, liwork = 0;
        if (info.val != 0) {
View Full Code Here

    public SymmTridiagEVD factor(SymmTridiagMatrix A)
            throws NotConvergedException {
        if (A.numRows() != n)
            throw new IllegalArgumentException("A.numRows() != n");

        intW info = new intW(0);
        LAPACK.getInstance().dstevr(job.netlib(), range.netlib(), n, A.getDiagonal(),
                A.getOffDiagonal(), 0, 0, 0, 0, abstol, new intW(1), w,
                job == JobEig.All ? Z.getData() : new double[0], Matrices.ld(n), isuppz, work,
                work.length, iwork, iwork.length, info);

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

      throw new IllegalArgumentException(eigenvalues + " <= 0");
    if (eigenvalues >= matrix.numColumns())
      throw new IllegalArgumentException(eigenvalues + " >= " + (matrix.numColumns()));

    int n = matrix.numRows();
    intW nev = new intW(eigenvalues);

    int ncv = Math.min(2 * eigenvalues, n);

    String bmat = "I";
    String which = ritz.name();
    doubleW tol = new doubleW(TOL);
    intW info = new intW(0);
    int[] iparam = new int[11];
    iparam[0] = 1;
    iparam[2] = 300;
    iparam[6] = 1;
    intW ido = new intW(0);

    // used for initial residual (if info != 0)
    // and eventually the output residual
    double[] resid = new double[n];
    // Lanczos basis vectors
View Full Code Here

        if (A.ku != ku + kl)
            throw new IllegalArgumentException("A.ku != ku + kl");

        singular = false;

        intW info = new intW(0);
        LAPACK.getInstance().dgbtrf(n, n, kl, ku, A.getData(), 2 * kl + ku + 1, ipiv, info);

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

        double anorm = A.norm(norm);

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

        intW info = new intW(0);
        doubleW rcond = new doubleW(0);
        LAPACK.getInstance().dgbcon(norm.netlib(), n, kl, ku, LU.getData(),
           Matrices.ld(2 * kl + ku + 1), ipiv, anorm, rcond, work, lwork, info);

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

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

        intW info = new intW(0);
        LAPACK.getInstance().dgbtrs(trans.netlib(), n, kl, ku, B.numColumns(),
                LU.getData(), 2 * kl + ku + 1, ipiv, B.getData(), Matrices.ld(n), info);

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

        X.set(B);

        int[] piv = new int[numRows];

        intW info = new intW(0);
        LAPACK.getInstance().dgesv(numRows, B.numColumns(),
                data.clone(), Matrices.ld(numRows), piv, Xd, Matrices.ld(numRows), info);

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

                Xtmp.set(i, j, B.get(i, j));
        double[] newData = data.clone();

        // Query optimal workspace
        double[] work = new double[1];
        intW info = new intW(0);
        LAPACK.getInstance().dgels(trans.netlib(), numRows, numColumns, nrhs,
                newData, Matrices.ld(numRows), Xtmp.getData(), Matrices.ld(numRows, numColumns),
                work, -1, info);

        // Allocate workspace
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.