| 825 | } |
| 826 | |
| 827 | void iiWriteMatrix(matrix im, const char *n, int dim, const ring r, int spaces) |
| 828 | { |
| 829 | int i,ii = MATROWS(im)-1; |
| 830 | int j,jj = MATCOLS(im)-1; |
| 831 | poly *pp = im->m; |
| 832 | |
| 833 | for (i=0; i<=ii; i++) |
| 834 | { |
| 835 | for (j=0; j<=jj; j++) |
| 836 | { |
| 837 | if (spaces>0) |
| 838 | Print("%-*.*s",spaces,spaces," "); |
| 839 | if (dim == 2) Print("%s[%u,%u]=",n,i+1,j+1); |
| 840 | else if (dim == 1) Print("%s[%u]=",n,j+1); |
| 841 | else if (dim == 0) Print("%s=",n); |
| 842 | if ((i<ii)||(j<jj)) p_Write(*pp++, r); |
| 843 | else p_Write0(*pp, r); |
| 844 | } |
| 845 | } |
| 846 | } |
| 847 | |
| 848 | char * iiStringMatrix(matrix im, int dim, const ring r, char ch) |
| 849 | { |
no test coverage detected