Examples of Dcs


Examples of edu.emory.mathcs.csparsej.tdouble.Dcs_common.Dcs

    public static Dcs cs_add(Dcs A, Dcs B, double alpha, double beta) {
        int p, j, nz = 0, anz;
        int Cp[], Ci[], Bp[], m, n, bnz, w[];
        double x[], Bx[], Cx[];
        boolean values;
        Dcs C;
        if (!Dcs_util.CS_CSC(A) || !Dcs_util.CS_CSC(B))
            return null; /* check inputs */
        if (A.m != B.m || A.n != B.n)
            return null;
        m = A.m;             // number of rows
View Full Code Here

Examples of edu.emory.mathcs.csparsej.tdouble.Dcs_common.Dcs

     */
    public static boolean cs_qrsol(int order, Dcs A, double[] b) {
        double x[];
        Dcss S;
        Dcsn N;
        Dcs AT = null;
        int k, m, n;
        boolean ok;
        if (!Dcs_util.CS_CSC(A) || b == null)
            return (false); /* check inputs */
        n = A.n;
View Full Code Here

Examples of edu.emory.mathcs.csparsej.tdouble.Dcs_common.Dcs

public class Dcs_dmperm {
    /* breadth-first search for coarse decomposition (C0,C1,R1 or R0,R3,C3) */
    private static boolean cs_bfs(Dcs A, int n, int[] wi, int[] wj, int[] queue, int[] imatch, int imatch_offset,
            int[] jmatch, int jmatch_offset, int mark) {
        int Ap[], Ai[], head = 0, tail = 0, j, i, p, j2;
        Dcs C;
        for (j = 0; j < n; j++) /* place all unmatched nodes in queue */
        {
            if (imatch[imatch_offset + j] >= 0)
                continue; /* skip j if matched */
            wj[j] = 0; /* j in set C0 (R0 if transpose) */
 
View Full Code Here

Examples of edu.emory.mathcs.csparsej.tdouble.Dcs_common.Dcs

     * @param triplet
     *            compressed-column if false, triplet form otherwise
     * @return sparse matrix
     */
    public static Dcs cs_spalloc(int m, int n, int nzmax, boolean values, boolean triplet) {
        Dcs A = new Dcs(); /* allocate the Dcs struct */
        A.m = m; /* define dimensions and nzmax */
        A.n = n;
        A.nzmax = nzmax = Math.max(nzmax, 1);
        A.nz = triplet ? 0 : -1; /* allocate triplet or comp.col */
        A.p = triplet ? new int[nzmax] : new int[n + 1];
View Full Code Here

Examples of edu.emory.mathcs.csparsej.tdouble.Dcs_common.Dcs

public class Dcs_clone {

    public static Dcs  cs_clone(Dcs A) {
        int p, j,  anz;
        int   m, n;
        Dcs C;
        if (!Dcs_util.CS_CSC(A) )
            return null; /* check inputs */
       
        m = A.m;             // number of rows
        n = A.n;  // number of columns
        anz = A.p[A.n]// non-zero elements of matrix A
       
        C = new Dcs();
        C.nz = -1;   // compressed-col format
        C.m = m;
        C.n = n;
        C.p = new int[n+1];   // column pointers
        C.i = new int[anz]; // row pointers
View Full Code Here

Examples of edu.emory.mathcs.csparsej.tdouble.Dcs_common.Dcs

     *            column-compressed matrix
     * @return symbolic analysis for Cholesky, null on error
     */
    public static Dcss cs_schol(int order, Dcs A) {
        int n, c[], post[], P[];
        Dcs C;
        Dcss S;
        if (!Dcs_util.CS_CSC(A))
            return (null); /* check inputs */
        n = A.n;
        S = new Dcss(); /* allocate result S */
 
View Full Code Here

Examples of edu.emory.mathcs.csparsej.tdouble.Dcs_common.Dcs

     * @return C = PAP', null on error
     */
    public static Dcs cs_symperm(Dcs A, int[] pinv, boolean values) {
        int i, j, p, q, i2, j2, n, Ap[], Ai[], Cp[], Ci[], w[];
        double Cx[], Ax[];
        Dcs C;
        if (!Dcs_util.CS_CSC(A))
            return (null); /* check inputs */
        n = A.n;
        Ap = A.p;
        Ai = A.i;
View Full Code Here

Examples of edu.emory.mathcs.csparsej.tdouble.Dcs_common.Dcs

     */
    public static Dcs cs_multiply(Dcs A, Dcs B) {
        int p, j, nz = 0, anz, Cp[], Ci[], Bp[], m, n, bnz, w[], Bi[];
        double x[], Bx[], Cx[];
        boolean values;
        Dcs C;
        if (!Dcs_util.CS_CSC(A) || !Dcs_util.CS_CSC(B))
            return (null); /* check inputs */
        if (A.n != B.m)
            return (null);
        m = A.m;
View Full Code Here

Examples of edu.emory.mathcs.csparsej.tdouble.Dcs_common.Dcs

     * @return numeric QR factorization, null on error
     */
    public static Dcsn cs_qr(Dcs A, Dcss S) {
        double 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[];
        Dcs R, V;
        Dcsn N;
        if (!Dcs_util.CS_CSC(A) || S == null)
            return (null);
        n = A.n;
        Ap = A.p;
View Full Code Here

Examples of edu.emory.mathcs.csparsej.tdouble.Dcs_common.Dcs

               
        if (A == null) {
            System.out.print("(null)\n");
            return null;
        }
        Dcs T;
        T = Dcs_util.cs_spalloc(0, 0, 1, true, true); /* allocate result */
        while (nextTripletValue() != false) {  // while exist more triplets
                if (!Dcs_entry.cs_entry(T, nonZeroRow, nonZeroCol, value))
                    return (null);
            }
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.