Modify ↓
Ticket #3397 (closed Feature Requests: duplicate)
provide overloads for operator* for matrix/vector multiplies
Reported by: | guwi17 | Owned by: | david.bellot |
---|---|---|---|
Milestone: | To Be Determined | Component: | uBLAS |
Version: | Boost 1.40.0 | Severity: | Not Applicable |
Keywords: | Cc: |
Description
Since many people a familiar with using operator* we should add the corresponding overloads to uBLAS. A good reference is the syntax used by MATLAB. The final syntax should be
matrix<double> A; vector<double> x; vector<double> y; cout << 2.0 * y << endl; cout << y * 2 << endl; cout << A * 2 << endl; cout << 2 * A << endl; cout << A * y << endl; cout << trans(y) * A << endl; cout << A * A << endl;
Similar to trans() we should provide herm() for complex matrices.
the syntax for inner and outer products could be
vector<double> x,a,b; x = trans(a) * b; // inner prod x = a * trans(b); // outer prod
the syntax for products with higher precision should be
prec(A*b); prec(trans(a) * b);
a *= operator should also be provided
b *= A; A *= B;
which could be mapped to the correspondy axpy_prod() call.
further tasks:
- find a solution for the product of three matrices which is currently only possible by stating an explicit temporary matrix.
Attachments
Change History
comment:4 Changed 7 years ago by david.bellot
- Owner changed from guwi17 to david.bellot
- Status changed from new to assigned
I will explore eigen solution to the problem of 3 matrices
Note: See
TracTickets for help on using
tickets.