comparison liboctave/CSparse.cc @ 6924:be176b7e110a

[project @ 2007-09-25 19:08:19 by dbateman]
author dbateman
date Tue, 25 Sep 2007 19:08:20 +0000
parents 2f17d5556756
children 93c65f2a5668
comparison
equal deleted inserted replaced
6923:1fcee6e2c4d3 6924:be176b7e110a
1210 octave_idx_type nr = rows (); 1210 octave_idx_type nr = rows ();
1211 octave_idx_type nc = cols (); 1211 octave_idx_type nc = cols ();
1212 octave_idx_type nm = (nc < nr ? nc : nr); 1212 octave_idx_type nm = (nc < nr ? nc : nr);
1213 err = 0; 1213 err = 0;
1214 1214
1215 if (nr == 0 || nc == 0 || nr != b.rows ()) 1215 if (nr != b.rows ())
1216 (*current_liboctave_error_handler) 1216 (*current_liboctave_error_handler)
1217 ("matrix dimension mismatch solution of linear equations"); 1217 ("matrix dimension mismatch solution of linear equations");
1218 else if (nr == 0 || nc == 0 || b.cols () == 0)
1219 retval = ComplexMatrix (nc, b.cols (), Complex (0.0, 0.0));
1218 else 1220 else
1219 { 1221 {
1220 // Print spparms("spumoni") info if requested 1222 // Print spparms("spumoni") info if requested
1221 int typ = mattype.type (); 1223 int typ = mattype.type ();
1222 mattype.info (); 1224 mattype.info ();
1269 octave_idx_type nr = rows (); 1271 octave_idx_type nr = rows ();
1270 octave_idx_type nc = cols (); 1272 octave_idx_type nc = cols ();
1271 octave_idx_type nm = (nc < nr ? nc : nr); 1273 octave_idx_type nm = (nc < nr ? nc : nr);
1272 err = 0; 1274 err = 0;
1273 1275
1274 if (nr == 0 || nc == 0 || nr != b.rows ()) 1276 if (nr != b.rows ())
1275 (*current_liboctave_error_handler) 1277 (*current_liboctave_error_handler)
1276 ("matrix dimension mismatch solution of linear equations"); 1278 ("matrix dimension mismatch solution of linear equations");
1279 else if (nr == 0 || nc == 0 || b.cols () == 0)
1280 retval = SparseComplexMatrix (nc, b.cols ());
1277 else 1281 else
1278 { 1282 {
1279 // Print spparms("spumoni") info if requested 1283 // Print spparms("spumoni") info if requested
1280 int typ = mattype.type (); 1284 int typ = mattype.type ();
1281 mattype.info (); 1285 mattype.info ();
1358 octave_idx_type nr = rows (); 1362 octave_idx_type nr = rows ();
1359 octave_idx_type nc = cols (); 1363 octave_idx_type nc = cols ();
1360 octave_idx_type nm = (nc < nr ? nc : nr); 1364 octave_idx_type nm = (nc < nr ? nc : nr);
1361 err = 0; 1365 err = 0;
1362 1366
1363 if (nr == 0 || nc == 0 || nr != b.rows ()) 1367 if (nr != b.rows ())
1364 (*current_liboctave_error_handler) 1368 (*current_liboctave_error_handler)
1365 ("matrix dimension mismatch solution of linear equations"); 1369 ("matrix dimension mismatch solution of linear equations");
1370 else if (nr == 0 || nc == 0 || b.cols () == 0)
1371 retval = ComplexMatrix (nc, b.cols (), Complex (0.0, 0.0));
1366 else 1372 else
1367 { 1373 {
1368 // Print spparms("spumoni") info if requested 1374 // Print spparms("spumoni") info if requested
1369 int typ = mattype.type (); 1375 int typ = mattype.type ();
1370 mattype.info (); 1376 mattype.info ();
1417 octave_idx_type nr = rows (); 1423 octave_idx_type nr = rows ();
1418 octave_idx_type nc = cols (); 1424 octave_idx_type nc = cols ();
1419 octave_idx_type nm = (nc < nr ? nc : nr); 1425 octave_idx_type nm = (nc < nr ? nc : nr);
1420 err = 0; 1426 err = 0;
1421 1427
1422 if (nr == 0 || nc == 0 || nr != b.rows ()) 1428 if (nr != b.rows ())
1423 (*current_liboctave_error_handler) 1429 (*current_liboctave_error_handler)
1424 ("matrix dimension mismatch solution of linear equations"); 1430 ("matrix dimension mismatch solution of linear equations");
1431 else if (nr == 0 || nc == 0 || b.cols () == 0)
1432 retval = SparseComplexMatrix (nc, b.cols ());
1425 else 1433 else
1426 { 1434 {
1427 // Print spparms("spumoni") info if requested 1435 // Print spparms("spumoni") info if requested
1428 int typ = mattype.type (); 1436 int typ = mattype.type ();
1429 mattype.info (); 1437 mattype.info ();
1506 octave_idx_type nr = rows (); 1514 octave_idx_type nr = rows ();
1507 octave_idx_type nc = cols (); 1515 octave_idx_type nc = cols ();
1508 octave_idx_type nm = (nc > nr ? nc : nr); 1516 octave_idx_type nm = (nc > nr ? nc : nr);
1509 err = 0; 1517 err = 0;
1510 1518
1511 if (nr == 0 || nc == 0 || nr != b.rows ()) 1519 if (nr != b.rows ())
1512 (*current_liboctave_error_handler) 1520 (*current_liboctave_error_handler)
1513 ("matrix dimension mismatch solution of linear equations"); 1521 ("matrix dimension mismatch solution of linear equations");
1522 else if (nr == 0 || nc == 0 || b.cols () == 0)
1523 retval = ComplexMatrix (nc, b.cols (), Complex (0.0, 0.0));
1514 else 1524 else
1515 { 1525 {
1516 // Print spparms("spumoni") info if requested 1526 // Print spparms("spumoni") info if requested
1517 int typ = mattype.type (); 1527 int typ = mattype.type ();
1518 mattype.info (); 1528 mattype.info ();
1740 octave_idx_type nr = rows (); 1750 octave_idx_type nr = rows ();
1741 octave_idx_type nc = cols (); 1751 octave_idx_type nc = cols ();
1742 octave_idx_type nm = (nc > nr ? nc : nr); 1752 octave_idx_type nm = (nc > nr ? nc : nr);
1743 err = 0; 1753 err = 0;
1744 1754
1745 if (nr == 0 || nc == 0 || nr != b.rows ()) 1755 if (nr != b.rows ())
1746 (*current_liboctave_error_handler) 1756 (*current_liboctave_error_handler)
1747 ("matrix dimension mismatch solution of linear equations"); 1757 ("matrix dimension mismatch solution of linear equations");
1758 else if (nr == 0 || nc == 0 || b.cols () == 0)
1759 retval = SparseComplexMatrix (nc, b.cols ());
1748 else 1760 else
1749 { 1761 {
1750 // Print spparms("spumoni") info if requested 1762 // Print spparms("spumoni") info if requested
1751 int typ = mattype.type (); 1763 int typ = mattype.type ();
1752 mattype.info (); 1764 mattype.info ();
2025 octave_idx_type nr = rows (); 2037 octave_idx_type nr = rows ();
2026 octave_idx_type nc = cols (); 2038 octave_idx_type nc = cols ();
2027 octave_idx_type nm = (nc > nr ? nc : nr); 2039 octave_idx_type nm = (nc > nr ? nc : nr);
2028 err = 0; 2040 err = 0;
2029 2041
2030 if (nr == 0 || nc == 0 || nr != b.rows ()) 2042 if (nr != b.rows ())
2031 (*current_liboctave_error_handler) 2043 (*current_liboctave_error_handler)
2032 ("matrix dimension mismatch solution of linear equations"); 2044 ("matrix dimension mismatch solution of linear equations");
2045 else if (nr == 0 || nc == 0 || b.cols () == 0)
2046 retval = ComplexMatrix (nc, b.cols (), Complex (0.0, 0.0));
2033 else 2047 else
2034 { 2048 {
2035 // Print spparms("spumoni") info if requested 2049 // Print spparms("spumoni") info if requested
2036 int typ = mattype.type (); 2050 int typ = mattype.type ();
2037 mattype.info (); 2051 mattype.info ();
2259 octave_idx_type nr = rows (); 2273 octave_idx_type nr = rows ();
2260 octave_idx_type nc = cols (); 2274 octave_idx_type nc = cols ();
2261 octave_idx_type nm = (nc > nr ? nc : nr); 2275 octave_idx_type nm = (nc > nr ? nc : nr);
2262 err = 0; 2276 err = 0;
2263 2277
2264 if (nr == 0 || nc == 0 || nr != b.rows ()) 2278 if (nr != b.rows ())
2265 (*current_liboctave_error_handler) 2279 (*current_liboctave_error_handler)
2266 ("matrix dimension mismatch solution of linear equations"); 2280 ("matrix dimension mismatch solution of linear equations");
2281 else if (nr == 0 || nc == 0 || b.cols () == 0)
2282 retval = SparseComplexMatrix (nc, b.cols ());
2267 else 2283 else
2268 { 2284 {
2269 // Print spparms("spumoni") info if requested 2285 // Print spparms("spumoni") info if requested
2270 int typ = mattype.type (); 2286 int typ = mattype.type ();
2271 mattype.info (); 2287 mattype.info ();
2545 octave_idx_type nr = rows (); 2561 octave_idx_type nr = rows ();
2546 octave_idx_type nc = cols (); 2562 octave_idx_type nc = cols ();
2547 octave_idx_type nm = (nc > nr ? nc : nr); 2563 octave_idx_type nm = (nc > nr ? nc : nr);
2548 err = 0; 2564 err = 0;
2549 2565
2550 if (nr == 0 || nc == 0 || nr != b.rows ()) 2566 if (nr != b.rows ())
2551 (*current_liboctave_error_handler) 2567 (*current_liboctave_error_handler)
2552 ("matrix dimension mismatch solution of linear equations"); 2568 ("matrix dimension mismatch solution of linear equations");
2569 else if (nr == 0 || nc == 0 || b.cols () == 0)
2570 retval = ComplexMatrix (nc, b.cols (), Complex (0.0, 0.0));
2553 else 2571 else
2554 { 2572 {
2555 // Print spparms("spumoni") info if requested 2573 // Print spparms("spumoni") info if requested
2556 int typ = mattype.type (); 2574 int typ = mattype.type ();
2557 mattype.info (); 2575 mattype.info ();
2800 octave_idx_type nc = cols (); 2818 octave_idx_type nc = cols ();
2801 octave_idx_type nm = (nc > nr ? nc : nr); 2819 octave_idx_type nm = (nc > nr ? nc : nr);
2802 2820
2803 err = 0; 2821 err = 0;
2804 2822
2805 if (nr == 0 || nc == 0 || nr != b.rows ()) 2823 if (nr != b.rows ())
2806 (*current_liboctave_error_handler) 2824 (*current_liboctave_error_handler)
2807 ("matrix dimension mismatch solution of linear equations"); 2825 ("matrix dimension mismatch solution of linear equations");
2826 else if (nr == 0 || nc == 0 || b.cols () == 0)
2827 retval = SparseComplexMatrix (nc, b.cols ());
2808 else 2828 else
2809 { 2829 {
2810 // Print spparms("spumoni") info if requested 2830 // Print spparms("spumoni") info if requested
2811 int typ = mattype.type (); 2831 int typ = mattype.type ();
2812 mattype.info (); 2832 mattype.info ();
3105 octave_idx_type nr = rows (); 3125 octave_idx_type nr = rows ();
3106 octave_idx_type nc = cols (); 3126 octave_idx_type nc = cols ();
3107 octave_idx_type nm = (nc > nr ? nc : nr); 3127 octave_idx_type nm = (nc > nr ? nc : nr);
3108 err = 0; 3128 err = 0;
3109 3129
3110 if (nr == 0 || nc == 0 || nr != b.rows ()) 3130 if (nr != b.rows ())
3111 (*current_liboctave_error_handler) 3131 (*current_liboctave_error_handler)
3112 ("matrix dimension mismatch solution of linear equations"); 3132 ("matrix dimension mismatch solution of linear equations");
3133 else if (nr == 0 || nc == 0 || b.cols () == 0)
3134 retval = ComplexMatrix (nc, b.cols (), Complex (0.0, 0.0));
3113 else 3135 else
3114 { 3136 {
3115 // Print spparms("spumoni") info if requested 3137 // Print spparms("spumoni") info if requested
3116 int typ = mattype.type (); 3138 int typ = mattype.type ();
3117 mattype.info (); 3139 mattype.info ();
3363 octave_idx_type nr = rows (); 3385 octave_idx_type nr = rows ();
3364 octave_idx_type nc = cols (); 3386 octave_idx_type nc = cols ();
3365 octave_idx_type nm = (nc > nr ? nc : nr); 3387 octave_idx_type nm = (nc > nr ? nc : nr);
3366 err = 0; 3388 err = 0;
3367 3389
3368 if (nr == 0 || nc == 0 || nr != b.rows ()) 3390 if (nr != b.rows ())
3369 (*current_liboctave_error_handler) 3391 (*current_liboctave_error_handler)
3370 ("matrix dimension mismatch solution of linear equations"); 3392 ("matrix dimension mismatch solution of linear equations");
3393 else if (nr == 0 || nc == 0 || b.cols () == 0)
3394 retval = SparseComplexMatrix (nc, b.cols ());
3371 else 3395 else
3372 { 3396 {
3373 // Print spparms("spumoni") info if requested 3397 // Print spparms("spumoni") info if requested
3374 int typ = mattype.type (); 3398 int typ = mattype.type ();
3375 mattype.info (); 3399 mattype.info ();
3667 3691
3668 octave_idx_type nr = rows (); 3692 octave_idx_type nr = rows ();
3669 octave_idx_type nc = cols (); 3693 octave_idx_type nc = cols ();
3670 err = 0; 3694 err = 0;
3671 3695
3672 if (nr == 0 || nc == 0 || nr != nc || nr != b.rows ()) 3696 if (nr != nc || nr != b.rows ())
3673 (*current_liboctave_error_handler) 3697 (*current_liboctave_error_handler)
3674 ("matrix dimension mismatch solution of linear equations"); 3698 ("matrix dimension mismatch solution of linear equations");
3699 else if (nr == 0 || b.cols () == 0)
3700 retval = ComplexMatrix (nc, b.cols (), Complex (0.0, 0.0));
3675 else if (calc_cond) 3701 else if (calc_cond)
3676 (*current_liboctave_error_handler) 3702 (*current_liboctave_error_handler)
3677 ("calculation of condition number not implemented"); 3703 ("calculation of condition number not implemented");
3678 else 3704 else
3679 { 3705 {
3822 3848
3823 octave_idx_type nr = rows (); 3849 octave_idx_type nr = rows ();
3824 octave_idx_type nc = cols (); 3850 octave_idx_type nc = cols ();
3825 err = 0; 3851 err = 0;
3826 3852
3827 if (nr == 0 || nc == 0 || nr != nc || nr != b.rows ()) 3853 if (nr != nc || nr != b.rows ())
3828 (*current_liboctave_error_handler) 3854 (*current_liboctave_error_handler)
3829 ("matrix dimension mismatch solution of linear equations"); 3855 ("matrix dimension mismatch solution of linear equations");
3856 else if (nr == 0 || b.cols () == 0)
3857 retval = SparseComplexMatrix (nc, b.cols ());
3830 else if (calc_cond) 3858 else if (calc_cond)
3831 (*current_liboctave_error_handler) 3859 (*current_liboctave_error_handler)
3832 ("calculation of condition number not implemented"); 3860 ("calculation of condition number not implemented");
3833 else 3861 else
3834 { 3862 {
3980 4008
3981 octave_idx_type nr = rows (); 4009 octave_idx_type nr = rows ();
3982 octave_idx_type nc = cols (); 4010 octave_idx_type nc = cols ();
3983 err = 0; 4011 err = 0;
3984 4012
3985 if (nr == 0 || nc == 0 || nr != nc || nr != b.rows ()) 4013 if (nr != nc || nr != b.rows ())
3986 (*current_liboctave_error_handler) 4014 (*current_liboctave_error_handler)
3987 ("matrix dimension mismatch solution of linear equations"); 4015 ("matrix dimension mismatch solution of linear equations");
4016 else if (nr == 0 || b.cols () == 0)
4017 retval = ComplexMatrix (nc, b.cols (), Complex (0.0, 0.0));
3988 else if (calc_cond) 4018 else if (calc_cond)
3989 (*current_liboctave_error_handler) 4019 (*current_liboctave_error_handler)
3990 ("calculation of condition number not implemented"); 4020 ("calculation of condition number not implemented");
3991 else 4021 else
3992 { 4022 {
4143 4173
4144 octave_idx_type nr = rows (); 4174 octave_idx_type nr = rows ();
4145 octave_idx_type nc = cols (); 4175 octave_idx_type nc = cols ();
4146 err = 0; 4176 err = 0;
4147 4177
4148 if (nr == 0 || nc == 0 || nr != nc || nr != b.rows ()) 4178 if (nr != nc || nr != b.rows ())
4149 (*current_liboctave_error_handler) 4179 (*current_liboctave_error_handler)
4150 ("matrix dimension mismatch solution of linear equations"); 4180 ("matrix dimension mismatch solution of linear equations");
4181 else if (nr == 0 || b.cols () == 0)
4182 retval = SparseComplexMatrix (nc, b.cols ());
4151 else if (calc_cond) 4183 else if (calc_cond)
4152 (*current_liboctave_error_handler) 4184 (*current_liboctave_error_handler)
4153 ("calculation of condition number not implemented"); 4185 ("calculation of condition number not implemented");
4154 else 4186 else
4155 { 4187 {
4312 4344
4313 octave_idx_type nr = rows (); 4345 octave_idx_type nr = rows ();
4314 octave_idx_type nc = cols (); 4346 octave_idx_type nc = cols ();
4315 err = 0; 4347 err = 0;
4316 4348
4317 if (nr == 0 || nc == 0 || nr != nc || nr != b.rows ()) 4349 if (nr != nc || nr != b.rows ())
4318 (*current_liboctave_error_handler) 4350 (*current_liboctave_error_handler)
4319 ("matrix dimension mismatch solution of linear equations"); 4351 ("matrix dimension mismatch solution of linear equations");
4352 else if (nr == 0 || b.cols () == 0)
4353 retval = ComplexMatrix (nc, b.cols (), Complex (0.0, 0.0));
4320 else 4354 else
4321 { 4355 {
4322 // Print spparms("spumoni") info if requested 4356 // Print spparms("spumoni") info if requested
4323 volatile int typ = mattype.type (); 4357 volatile int typ = mattype.type ();
4324 mattype.info (); 4358 mattype.info ();
4586 4620
4587 octave_idx_type nr = rows (); 4621 octave_idx_type nr = rows ();
4588 octave_idx_type nc = cols (); 4622 octave_idx_type nc = cols ();
4589 err = 0; 4623 err = 0;
4590 4624
4591 if (nr == 0 || nc == 0 || nr != nc || nr != b.rows ()) 4625 if (nr != nc || nr != b.rows ())
4592 (*current_liboctave_error_handler) 4626 (*current_liboctave_error_handler)
4593 ("matrix dimension mismatch solution of linear equations"); 4627 ("matrix dimension mismatch solution of linear equations");
4628 else if (nr == 0 || b.cols () == 0)
4629 retval = SparseComplexMatrix (nc, b.cols ());
4594 else 4630 else
4595 { 4631 {
4596 // Print spparms("spumoni") info if requested 4632 // Print spparms("spumoni") info if requested
4597 volatile int typ = mattype.type (); 4633 volatile int typ = mattype.type ();
4598 mattype.info (); 4634 mattype.info ();
4937 4973
4938 octave_idx_type nr = rows (); 4974 octave_idx_type nr = rows ();
4939 octave_idx_type nc = cols (); 4975 octave_idx_type nc = cols ();
4940 err = 0; 4976 err = 0;
4941 4977
4942 if (nr == 0 || nc == 0 || nr != nc || nr != b.rows ()) 4978 if (nr != nc || nr != b.rows ())
4943 (*current_liboctave_error_handler) 4979 (*current_liboctave_error_handler)
4944 ("matrix dimension mismatch solution of linear equations"); 4980 ("matrix dimension mismatch solution of linear equations");
4981 else if (nr == 0 || b.cols () == 0)
4982 retval = ComplexMatrix (nc, b.cols (), Complex (0.0, 0.0));
4945 else 4983 else
4946 { 4984 {
4947 // Print spparms("spumoni") info if requested 4985 // Print spparms("spumoni") info if requested
4948 volatile int typ = mattype.type (); 4986 volatile int typ = mattype.type ();
4949 mattype.info (); 4987 mattype.info ();
5214 5252
5215 octave_idx_type nr = rows (); 5253 octave_idx_type nr = rows ();
5216 octave_idx_type nc = cols (); 5254 octave_idx_type nc = cols ();
5217 err = 0; 5255 err = 0;
5218 5256
5219 if (nr == 0 || nc == 0 || nr != nc || nr != b.rows ()) 5257 if (nr != nc || nr != b.rows ())
5220 (*current_liboctave_error_handler) 5258 (*current_liboctave_error_handler)
5221 ("matrix dimension mismatch solution of linear equations"); 5259 ("matrix dimension mismatch solution of linear equations");
5260 else if (nr == 0 || b.cols () == 0)
5261 retval = SparseComplexMatrix (nc, b.cols ());
5222 else 5262 else
5223 { 5263 {
5224 // Print spparms("spumoni") info if requested 5264 // Print spparms("spumoni") info if requested
5225 volatile int typ = mattype.type (); 5265 volatile int typ = mattype.type ();
5226 mattype.info (); 5266 mattype.info ();
5690 5730
5691 octave_idx_type nr = rows (); 5731 octave_idx_type nr = rows ();
5692 octave_idx_type nc = cols (); 5732 octave_idx_type nc = cols ();
5693 err = 0; 5733 err = 0;
5694 5734
5695 if (nr == 0 || nc == 0 || nr != nc || nr != b.rows ()) 5735 if (nr != nc || nr != b.rows ())
5696 (*current_liboctave_error_handler) 5736 (*current_liboctave_error_handler)
5697 ("matrix dimension mismatch solution of linear equations"); 5737 ("matrix dimension mismatch solution of linear equations");
5738 else if (nr == 0 || b.cols () == 0)
5739 retval = ComplexMatrix (nc, b.cols (), Complex (0.0, 0.0));
5698 else 5740 else
5699 { 5741 {
5700 // Print spparms("spumoni") info if requested 5742 // Print spparms("spumoni") info if requested
5701 volatile int typ = mattype.type (); 5743 volatile int typ = mattype.type ();
5702 mattype.info (); 5744 mattype.info ();
5948 5990
5949 octave_idx_type nr = rows (); 5991 octave_idx_type nr = rows ();
5950 octave_idx_type nc = cols (); 5992 octave_idx_type nc = cols ();
5951 err = 0; 5993 err = 0;
5952 5994
5953 if (nr == 0 || nc == 0 || nr != nc || nr != b.rows ()) 5995 if (nr != nc || nr != b.rows ())
5954 (*current_liboctave_error_handler) 5996 (*current_liboctave_error_handler)
5955 ("matrix dimension mismatch solution of linear equations"); 5997 ("matrix dimension mismatch solution of linear equations");
5998 else if (nr == 0 || b.cols () == 0)
5999 retval = SparseComplexMatrix (nc, b.cols ());
5956 else 6000 else
5957 { 6001 {
5958 // Print spparms("spumoni") info if requested 6002 // Print spparms("spumoni") info if requested
5959 volatile int typ = mattype.type (); 6003 volatile int typ = mattype.type ();
5960 mattype.info (); 6004 mattype.info ();
6257 6301
6258 octave_idx_type nr = rows (); 6302 octave_idx_type nr = rows ();
6259 octave_idx_type nc = cols (); 6303 octave_idx_type nc = cols ();
6260 err = 0; 6304 err = 0;
6261 6305
6262 if (nr == 0 || nc == 0 || nr != nc || nr != b.rows ()) 6306 if (nr != nc || nr != b.rows ())
6263 (*current_liboctave_error_handler) 6307 (*current_liboctave_error_handler)
6264 ("matrix dimension mismatch solution of linear equations"); 6308 ("matrix dimension mismatch solution of linear equations");
6309 else if (nr == 0 || b.cols () == 0)
6310 retval = ComplexMatrix (nc, b.cols (), Complex (0.0, 0.0));
6265 else 6311 else
6266 { 6312 {
6267 // Print spparms("spumoni") info if requested 6313 // Print spparms("spumoni") info if requested
6268 volatile int typ = mattype.type (); 6314 volatile int typ = mattype.type ();
6269 mattype.info (); 6315 mattype.info ();
6497 6543
6498 octave_idx_type nr = rows (); 6544 octave_idx_type nr = rows ();
6499 octave_idx_type nc = cols (); 6545 octave_idx_type nc = cols ();
6500 err = 0; 6546 err = 0;
6501 6547
6502 if (nr == 0 || nc == 0 || nr != nc || nr != b.rows ()) 6548 if (nr != nc || nr != b.rows ())
6503 (*current_liboctave_error_handler) 6549 (*current_liboctave_error_handler)
6504 ("matrix dimension mismatch solution of linear equations"); 6550 ("matrix dimension mismatch solution of linear equations");
6551 else if (nr == 0 || b.cols () == 0)
6552 retval = SparseComplexMatrix (nc, b.cols ());
6505 else 6553 else
6506 { 6554 {
6507 // Print spparms("spumoni") info if requested 6555 // Print spparms("spumoni") info if requested
6508 volatile int typ = mattype.type (); 6556 volatile int typ = mattype.type ();
6509 mattype.info (); 6557 mattype.info ();