SuiteSparse/SPQR/Source/SuiteSparseQR_C.cpp
Long SuiteSparseQR_C             // returns rank(A) estimate, (-1) if failure
(
    // inputs:
    int ordering,           // all, except 3:given treated as 0:fixed
    double tol,             // columns with 2-norm <= tol are treated as 0
    Long econ,              // e = max(min(m,econ),rank(A))
    int getCTX,             // 0: Z=C (e-by-k), 1: Z=C', 2: Z=X (e-by-k)
    cholmod_sparse *A,      // m-by-n sparse matrix to factorize
    cholmod_sparse *Bsparse,// sparse m-by-k B
    cholmod_dense  *Bdense, // dense  m-by-k B
    // outputs:
    cholmod_sparse **Zsparse,   // sparse Z
    cholmod_dense  **Zdense,    // dense Z
    cholmod_sparse **R,     // R factor, e-by-n
    Long **E,               // size n column permutation, NULL if identity
    cholmod_sparse **H,     // m-by-nh Householder vectors
    Long **HPinv,           // size m row permutation
    cholmod_dense **HTau,   // 1-by-nh Householder coefficients
    cholmod_common *cc      // workspace and parameters
)
{
    RETURN_IF_NULL_COMMON (EMPTY) ;
    RETURN_IF_NULL (A, EMPTY) ;
    cc->status = CHOLMOD_OK ;

    return ((A->xtype == CHOLMOD_REAL) ?
        SuiteSparseQR <double>  (ordering, tol, econ, getCTX, A, Bsparse,
            Bdense, Zsparse, Zdense, R, E, H, HPinv, HTau, cc) :
        SuiteSparseQR <Complex> (ordering, tol, econ, getCTX, A, Bsparse,
            Bdense, Zsparse, Zdense, R, E, H, HPinv, HTau, cc)) ;
}
// Primary sparse QR function, with all inputs/outputs available.  The primary
// uses of this function are to perform any one of the the MATLAB equivalent
// statements:
//
//      X = A\B                 % where B is sparse or dense
//      [C,R,E] = qr (A,B)      % where Q*R=A*E and C=Q'*B
//      [Q,R,E] = qr (A)        % with Q in Householder form (H, HPinv, HTau)
//      [Q,R,E] = qr (A)        % where Q is discarded (the "Q-less" QR)
//      R = qr (A)              % as above, but with E=I
//
// To obtain the factor Q in sparse matrix form, use SuiteSparseQR_C_QR instead.
Primary sparse QR function, with all inputs/outputs available.  The primary
uses of this function are to perform any one of the the MATLAB equivalent
statements.



To obtain the factor Q in sparse matrix form, use SuiteSparseQR_C_QR instead.
Primary sparse QR function with all inputs / outputs available . The primary uses of this function are to perform any one of the the MATLAB equivalent statements . To obtain the factor Q in sparse matrix form use SuiteSparseQR_C_QR instead .
Long SuiteSparseQR_C             
(
    int ordering,           
    double tol,             
    Long econ,              
    int getCTX,             
    cholmod_sparse *A,      
    cholmod_sparse *Bsparse,
    cholmod_dense  *Bdense, 
    cholmod_sparse **Zsparse,   
    cholmod_dense  **Zdense,    
    cholmod_sparse **R,     
    Long **E,               
    cholmod_sparse **H,     
    Long **HPinv,           
    cholmod_dense **HTau,   
    cholmod_common *cc      
)
{
    RETURN_IF_NULL_COMMON (EMPTY) ;
    RETURN_IF_NULL (A, EMPTY) ;
    cc->status = CHOLMOD_OK ;
    return ((A->xtype == CHOLMOD_REAL) ?
        SuiteSparseQR <double>  (ordering, tol, econ, getCTX, A, Bsparse,
            Bdense, Zsparse, Zdense, R, E, H, HPinv, HTau, cc) :
        SuiteSparseQR <Complex> (ordering, tol, econ, getCTX, A, Bsparse,
            Bdense, Zsparse, Zdense, R, E, H, HPinv, HTau, cc)) ;
}
Long SuiteSparseQR_C ( int ordering , double tol , Long econ , int getCTX , cholmod_sparse * A , cholmod_sparse * Bsparse , cholmod_dense * Bdense , cholmod_sparse * * Zsparse , cholmod_dense * * Zdense , cholmod_sparse * * R , Long * * E , cholmod_sparse * * H , Long * * HPinv , cholmod_dense * * HTau , cholmod_common * cc ) { RETURN_IF_NULL_COMMON ( EMPTY ) ; RETURN_IF_NULL ( A , EMPTY ) ; cc -> status = CHOLMOD_OK ; return ( ( A -> xtype == CHOLMOD_REAL ) ? SuiteSparseQR < double > ( ordering , tol , econ , getCTX , A , Bsparse , Bdense , Zsparse , Zdense , R , E , H , HPinv , HTau , cc ) : SuiteSparseQR < Complex > ( ordering , tol , econ , getCTX , A , Bsparse , Bdense , Zsparse , Zdense , R , E , H , HPinv , HTau , cc ) ) ; }
Primary sparse QR function, with all inputs/outputs available.
Primary sparse QR function with all inputs / outputs available .
// returns rank(A) estimate, (-1) if failure // inputs: // all, except 3:given treated as 0:fixed // columns with 2-norm <= tol are treated as 0 // e = max(min(m,econ),rank(A)) // 0: Z=C (e-by-k), 1: Z=C', 2: Z=X (e-by-k) // m-by-n sparse matrix to factorize // sparse m-by-k B // dense  m-by-k B // outputs: // sparse Z // dense Z // R factor, e-by-n // size n column permutation, NULL if identity // m-by-nh Householder vectors // size m row permutation // 1-by-nh Householder coefficients // workspace and parameters