5 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 ;
14 printf (
"%d-by-%d, nzmax: %d nnz: %d, 1-norm: %g\n", m, n, nzmax,
16 for (j = 0 ; j < n ; j++)
18 printf (
" col %d : locations %d to %d\n", j, Ap [j], Ap [j+1]-1);
19 for (p = Ap [j] ; p < Ap [j+1] ; p++)
21 printf (
" %d : %g\n", Ai [p], Ax ? Ax [p] : 1) ;
22 if (brief && p > 20) { printf (
" ...\n") ;
return (1) ; }
28 printf (
"triplet: %d-by-%d, nzmax: %d nnz: %d\n", m, n, nzmax, nz) ;
29 for (p = 0 ; p < nz ; p++)
31 printf (
" %d %d : %g\n", Ai [p], Ap [p], Ax ? Ax [p] : 1) ;
32 if (brief && p > 20) { printf (
" ...\n") ;
return (1) ; }
double cs_norm(const cs *A)
int cs_print(const cs *A, int brief)