Package edu.emory.mathcs.csparsej.tfloat.Scs_common

Examples of edu.emory.mathcs.csparsej.tfloat.Scs_common.Scsn


        Scs A, C, W = null, WW, WT, E = null, W2;
        int n, k, Li[], Lp[], Wi[], Wp[], p1, p2, p[] = null;
        boolean ok;
        float b[], x[], resid[], y[] = null, Lx[], Wx[], s, t, t1;
        Scss S = null;
        Scsn N = null;
        if (Prob == null || Prob.sym == 0 || Prob.A.n == 0)
            return (false);
        A = Prob.A;
        C = Prob.C;
        b = Prob.b;
View Full Code Here


     *            partial pivoting threshold (1 for partial pivoting)
     * @return numeric LU factorization, null on error
     */
    public static Scsn cs_lu(Scs A, Scss S, float tol) {
        Scs L, U;
        Scsn N;
        float pivot, Lx[], Ux[], x[], a, t;
        int Lp[], Li[], Up[], Ui[], pinv[], xi[], q[], n, ipiv, k, top, p, i, col, lnz, unz;
        if (!Scs_util.CS_CSC(A) || S == null)
            return (null); /* check inputs */
        n = A.n;
        q = S.q;
        lnz = S.lnz;
        unz = S.unz;
        x = new float[n]; /* get float workspace */
        xi = new int[2 * n]; /* get int workspace */
        N = new Scsn(); /* allocate result */
        N.L = L = Scs_util.cs_spalloc(n, n, lnz, true, false); /* allocate result L */
        N.U = U = Scs_util.cs_spalloc(n, n, unz, true, false); /* allocate result U */
        N.pinv = pinv = new int[n]; /* allocate result pinv */
        Lp = L.p;
        Up = U.p;
View Full Code Here

     * @return true if successful, false on error
     */
    public static boolean cs_qrsol(int order, Scs A, float[] b) {
        float x[];
        Scss S;
        Scsn N;
        Scs AT = null;
        int k, m, n;
        boolean ok;
        if (!Scs_util.CS_CSC(A) || b == null)
            return (false); /* check inputs */
 
View Full Code Here

     */
    public static Scsn cs_qr(Scs A, Scss S) {
        float Rx[], Vx[], Ax[], x[], Beta[];
        int i, k, p, n, vnz, p1, top, m2, len, col, rnz, s[], leftmost[], Ap[], Ai[], parent[], Rp[], Ri[], Vp[], Vi[], w[], pinv[], q[];
        Scs R, V;
        Scsn N;
        if (!Scs_util.CS_CSC(A) || S == null)
            return (null);
        n = A.n;
        Ap = A.p;
        Ai = A.i;
        Ax = A.x;
        q = S.q;
        parent = S.parent;
        pinv = S.pinv;
        m2 = S.m2;
        vnz = S.lnz;
        rnz = S.unz;
        leftmost = S.leftmost;
        w = new int[m2 + n]; /* get int workspace */
        x = new float[m2]; /* get float workspace */
        N = new Scsn(); /* allocate result */
        s = w;
        int s_offset = m2; /* s is size n */
        for (k = 0; k < m2; k++)
            x[k] = 0; /* clear workspace x */
        N.L = V = Scs_util.cs_spalloc(m2, n, vnz, true, false); /* allocate result V */
 
View Full Code Here

     * @return true if successful, false on error
     */
    public static boolean cs_cholsol(int order, Scs A, float[] b) {
        float x[];
        Scss S;
        Scsn N;
        int n;
        boolean ok;
        if (!Scs_util.CS_CSC(A) || b == null)
            return (false); /* check inputs */
        n = A.n;
View Full Code Here

     */
    public static Scsn cs_chol(Scs A, Scss S) {
        float d, lki, Lx[], x[], Cx[];
        int top, i, p, k, n, Li[], Lp[], cp[], pinv[], s[], c[], parent[], Cp[], Ci[];
        Scs L, C;
        Scsn N;
        if (!Scs_util.CS_CSC(A) || S == null || S.cp == null || S.parent == null)
            return (null);
        n = A.n;
        N = new Scsn(); /* allocate result */
        c = new int[2 * n]; /* get int workspace */
        x = new float[n]; /* get float workspace */
        cp = S.cp;
        pinv = S.pinv;
        parent = S.parent;
View Full Code Here

     * @return true if successful, false on error
     */
    public static boolean cs_lusol(int order, Scs A, float[] b, float tol) {
        float[] x;
        Scss S;
        Scsn N;
        int n;
        boolean ok;
        if (!Scs_util.CS_CSC(A) || b == null)
            return (false); /* check inputs */
        n = A.n;
View Full Code Here

TOP

Related Classes of edu.emory.mathcs.csparsej.tfloat.Scs_common.Scsn

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.