5 CS_INT p, j, m, n, nzmax, nz, *Ap, *Ai ;
7 if (!A) { printf (
"(null)\n") ;
return (0) ; }
8 m = A->m ; n = A->n ; Ap = A->p ; Ai = A->i ; Ax = A->x ;
9 nzmax = A->nzmax ; nz = A->nz ;
14 printf (
"%g-by-%g, nzmax: %g nnz: %g, 1-norm: %g\n", (
double) m,
15 (
double) n, (
double) nzmax, (
double) (Ap [n]),
cs_norm (A)) ;
16 for (j = 0 ; j < n ; j++)
18 printf (
" col %g : locations %g to %g\n", (
double) j,
19 (
double) (Ap [j]), (
double) (Ap [j+1]-1)) ;
20 for (p = Ap [j] ; p < Ap [j+1] ; p++)
22 printf (
" %g : ", (
double) (Ai [p])) ;
27 printf (
"%g\n", Ax ? Ax [p] : 1) ;
29 if (brief && p > 20) { printf (
" ...\n") ;
return (1) ; }
35 printf (
"triplet: %g-by-%g, nzmax: %g nnz: %g\n", (
double) m,
36 (
double) n, (
double) nzmax, (
double) nz) ;
37 for (p = 0 ; p < nz ; p++)
40 printf (
" %g %g : ", (
double) (Ai [p]), (
double) (Ap [p])) ;
45 printf (
"%g\n", Ax ? Ax [p] : 1) ;
47 if (brief && p > 20) { printf (
" ...\n") ;
return (1) ; }
double cs_norm(const cs *A)
CS_INT cs_print(const cs *A, CS_INT brief)