| 368 | } |
| 369 | } |
| 370 | void print_matrix( matrix omat ) |
| 371 | { |
| 372 | int i,j; |
| 373 | int val; |
| 374 | Print(" matrix m[%d][%d]=(\n",MATROWS( omat ),MATCOLS( omat )); |
| 375 | for ( i= 1; i <= MATROWS( omat ); i++ ) |
| 376 | { |
| 377 | for ( j= 1; j <= MATCOLS( omat ); j++ ) |
| 378 | { |
| 379 | if ( (MATELEM( omat, i, j)!=NULL) |
| 380 | && (!nIsZero(pGetCoeff( MATELEM( omat, i, j))))) |
| 381 | { |
| 382 | val= n_Int(pGetCoeff( MATELEM( omat, i, j) ), currRing->cf); |
| 383 | if ( i==MATROWS(omat) && j==MATCOLS(omat) ) |
| 384 | { |
| 385 | Print("%d ",val); |
| 386 | } |
| 387 | else |
| 388 | { |
| 389 | Print("%d, ",val); |
| 390 | } |
| 391 | } |
| 392 | else |
| 393 | { |
| 394 | if ( i==MATROWS(omat) && j==MATCOLS(omat) ) |
| 395 | { |
| 396 | PrintS(" 0"); |
| 397 | } |
| 398 | else |
| 399 | { |
| 400 | PrintS(" 0, "); |
| 401 | } |
| 402 | } |
| 403 | } |
| 404 | PrintLn(); |
| 405 | } |
| 406 | PrintS(");\n"); |
| 407 | } |
| 408 | #endif |
| 409 | //<- |
| 410 |
no test coverage detected