Examples of Dcs


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

public class Dcs_mulScalar {

    public static Dcs  cs_mulScalar(Dcs A, double alpha) {
        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

     * @return numeric Cholesky factorization, null on error
     */
    public static Dcsn cs_chol(Dcs A, Dcss S) {
        double d, lki, Lx[], x[], Cx[];
        int top, i, p, k, n, Li[], Lp[], cp[], pinv[], s[], c[], parent[], Cp[], Ci[];
        Dcs L, C;
        Dcsn N;
        if (!Dcs_util.CS_CSC(A) || S == null || S.cp == null || S.parent == null)
            return (null);
        n = A.n;
        N = new Dcsn(); /* allocate result */
 
View Full Code Here

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

public class Dcs_addScalar {

    public static Dcs  cs_addScalar(Dcs A, double alpha) {
        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

     * @return T if successful, null on error
     */
    public static Dcs cs_load(String fileName) {
        int i, j;
        double x;
        Dcs T;
        BufferedReader in;
        try {
            in = new BufferedReader(new FileReader(fileName));
        } catch (FileNotFoundException e1) {
            return (null);
View Full Code Here

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

    public static int[] cs_counts(Dcs A, int[] parent, int[] post, boolean ata) {
        int i, j, k, n, m, J, s, p, q, ATp[], ATi[], maxfirst[], prevleaf[], ancestor[], colcount[], w[], first[], delta[];
        int[] head = null, next = null;
        int[] jleaf = new int[1];
        int head_offset = 0, next_offset = 0;
        Dcs AT;
        if (!Dcs_util.CS_CSC(A) || parent == null || post == null)
            return (null); /* check inputs */
        m = A.m;
        n = A.n;
        s = 4 * n + (ata ? (n + m + 1) : 0);
View Full Code Here

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

     * @param tol
     *            partial pivoting threshold (1 for partial pivoting)
     * @return numeric LU factorization, null on error
     */
    public static Dcsn cs_lu(Dcs A, Dcss S, double tol) {
        Dcs L, U;
        Dcsn N;
        double pivot, Lx[], Ux[], x[], a, t;
        int Lp[], Li[], Up[], Ui[], pinv[], xi[], q[], n, ipiv, k, top, p, i, col, lnz, unz;
        if (!Dcs_util.CS_CSC(A) || S == null)
            return (null); /* check inputs */
 
View Full Code Here

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

     * @return row and column matching, size m+n
     */
    public static int[] cs_maxtrans(Dcs A, int seed) /*[jmatch [0..m-1]; imatch [0..n-1]]*/
    {
        int i, j, k, n, m, p, n2 = 0, m2 = 0, Ap[], jimatch[], w[], cheap[], js[], is[], ps[], Ai[], Cp[], jmatch[], imatch[], q[];
        Dcs C;
        if (!Dcs_util.CS_CSC(A))
            return (null); /* check inputs */
        n = A.n;
        m = A.m;
        Ap = A.p;
View Full Code Here

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

     * @return Dulmage-Mendelsohn analysis, null on error
     */
    public static Dcsd cs_dmperm(Dcs 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;
        Dcs C;
        Dcsd D, scc;
        /* --- Maximum matching ------------------------------------------------- */
        if (!Dcs_util.CS_CSC(A))
            return (null); /* check inputs */
        m = A.m;
View Full Code Here

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

     * @return C = PAQ, null on error
     */
    public static Dcs cs_permute(Dcs A, int[] pinv, int[] q, boolean values) {
        int t, j, k, nz = 0, m, n, Ap[], Ai[], Cp[], Ci[];
        double Cx[], Ax[];
        Dcs C;
        if (!Dcs_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.tdouble.Dcs_common.Dcs

     * @return C=A', null on error
     */
    public static Dcs cs_transpose(Dcs A, boolean values) {
        int p, q, j, Cp[], Ci[], n, m, Ap[], Ai[], w[];
        double Cx[], Ax[];
        Dcs C;
        if (!Dcs_util.CS_CSC(A))
            return (null); /* check inputs */
        m = A.m;
        n = A.n;
        Ap = A.p;
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.