Examples of Scs


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

     *            column-compressed matrix
     * @return amd(A+A') if A is symmetric, or amd(A'A) otherwise, null on error
     *         or for natural ordering
     */
    public static int[] cs_amd(int order, Scs A) {
        Scs C, A2, AT;
        int Cp[], Ci[], last[], W[], len[], nv[], next[], P[], head[], elen[], degree[], w[], hhead[], ATp[], ATi[], d, dk, dext, lemax = 0, e, elenk, eln, i, j, k, k1, k2, k3, jlast, ln, dense, nzmax, mindeg = 0, nvi, nvj, nvk, mark, wnvi, cnz, nel = 0, p, p1, p2, p3, p4, pj, pk, pk1, pk2, pn, q, n, m, t;
        int h;
        boolean ok;
        /* --- Construct matrix C ----------------------------------------------- */
        if (!Scs_util.CS_CSC(A) || order <= 0 || order > 3)
View Full Code Here

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

     * @return numeric QR factorization, null on error
     */
    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;
View Full Code Here

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

    }

    /* C = A + triu(A,1)' */
    private static Scs make_sym(Scs A) {
        Scs AT, C;
        AT = Scs_transpose.cs_transpose(A, true); /* AT = A' */
        Scs_fkeep.cs_fkeep(AT, new Dropdiag(), null); /* drop diagonal entries from AT */
        C = Scs_add.cs_add(A, AT, 1, 1); /* C = A+AT */
        return (C);
    }
View Full Code Here

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

     * @param tol
     *            drop tolerance
     * @return problem
     */
    public static Sproblem get_problem(String fileName, float tol) {
        Scs T, A, C;
        int sym, m, n, mn, nz1, nz2;
        Sproblem Prob;
        Prob = new Sproblem();
        T = Scs_load.cs_load(fileName); /* load triplet matrix T from a file */
        Prob.A = A = Scs_compress.cs_compress(T); /* A = compressed-column form of T */
 
View Full Code Here

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

     * @param Prob
     *            problem
     * @return true if successful, false on error
     */
    public static boolean demo2(Sproblem Prob) {
        Scs A, C;
        float b[], x[], resid[], t, tol;
        int k, m, n, order, nb, ns, r[], s[], rr[], sprank;
        boolean ok;
        Scsd D;
        if (Prob == null)
View Full Code Here

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

     * @return C if successful, null on error
     */
    public static Scs cs_compress(Scs T) {
        int m, n, nz, p, k, Cp[], Ci[], w[], Ti[], Tj[];
        float Cx[], Tx[];
        Scs C;
        if (!Scs_util.CS_TRIPLET(T))
            return (null); /* check inputs */
        m = T.m;
        n = T.n;
        Ti = T.i;
View Full Code Here

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

     * @return C=A', null on error
     */
    public static Scs cs_transpose(Scs A, boolean values) {
        int p, q, j, Cp[], Ci[], n, m, Ap[], Ai[], w[];
        float Cx[], Ax[];
        Scs C;
        if (!Scs_util.CS_CSC(A))
            return (null); /* check inputs */
        m = A.m;
        n = A.n;
        Ap = A.p;
View Full Code Here

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

public class Scs_dmperm {
    /* breadth-first search for coarse decomposition (C0,C1,R1 or R0,R3,C3) */
    private static boolean cs_bfs(Scs 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;
        Scs 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.tfloat.Scs_common.Scs

     * @return Sulmage-Mendelsohn analysis, null on error
     */
    public static Scsd cs_dmperm(Scs A, int seed) {
        int m, n, i, j, k, cnz, nc, jmatch[], imatch[], wi[], wj[], pinv[], Cp[], Ci[], ps[], rs[], nb1, nb2, p[], q[], cc[], rr[], r[], s[];
        boolean ok;
        Scs C;
        Scsd S, scc;
        /* --- Maximum matching ------------------------------------------------- */
        if (!Scs_util.CS_CSC(A))
            return (null); /* check inputs */
        m = A.m;
View Full Code Here

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

     * @param triplet
     *            compressed-column if false, triplet form otherwise
     * @return sparse matrix
     */
    public static Scs cs_spalloc(int m, int n, int nzmax, boolean values, boolean triplet) {
        Scs A = new Scs(); /* allocate the Scs 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
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.