comparison liboctave/CRowVector.cc @ 1677:ef7f804cb722

[project @ 1995-12-28 20:20:29 by jwe]
author jwe
date Thu, 28 Dec 1995 20:22:03 +0000
parents 23aa282707e8
children 1ef83ee34815
comparison
equal deleted inserted replaced
1676:628c9dcd081d 1677:ef7f804cb722
434 (*current_liboctave_error_handler) 434 (*current_liboctave_error_handler)
435 ("nonconformant vector multiplication attempted"); 435 ("nonconformant vector multiplication attempted");
436 return ComplexRowVector (); 436 return ComplexRowVector ();
437 } 437 }
438 438
439 if (len == 0 || a.cols () == 0) 439 if (len == 0)
440 return ComplexRowVector (0); 440 return ComplexRowVector (a.cols (), 0.0);
441 441
442 // Transpose A to form A'*x == (x'*A)' 442 // Transpose A to form A'*x == (x'*A)'
443 443
444 int a_nr = a.rows (); 444 int a_nr = a.rows ();
445 int a_nc = a.cols (); 445 int a_nc = a.cols ();
446 446
447 int ld = a_nr; 447 int ld = a_nr;
448 448
449 Complex *y = new Complex [len]; 449 Complex *y = new Complex [a_nc];
450 450
451 F77_FCN (zgemv, ZGEMV) ("T", a_nc, a_nr, 1.0, a.data (), ld, 451 F77_FCN (zgemv, ZGEMV) ("T", a_nc, a_nr, 1.0, a.data (), ld,
452 v.data (), 1, 0.0, y, 1, 1L); 452 v.data (), 1, 0.0, y, 1, 1L);
453 453
454 return ComplexRowVector (y, len); 454 return ComplexRowVector (y, a_nc);
455 } 455 }
456 456
457 ComplexRowVector 457 ComplexRowVector
458 operator * (const RowVector& v, const ComplexMatrix& a) 458 operator * (const RowVector& v, const ComplexMatrix& a)
459 { 459 {