#3397 closed Feature Requests (duplicate)
provide overloads for operator* for matrix/vector multiplies
Reported by: | Gunter | 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 (0)
Change History (6)
comment:1 Changed 8 years ago by
Type: | Bugs → Feature Requests |
---|
comment:2 Changed 8 years ago by
comment:3 Changed 8 years ago by
comment:4 Changed 8 years ago by
Owner: | changed from Gunter to David Bellot |
---|---|
Status: | new → assigned |
I will explore eigen solution to the problem of 3 matrices
comment:5 Changed 7 years ago by
Resolution: | → duplicate |
---|---|
Status: | assigned → closed |
a new ticket 4442 with a simple implementation has been opened and a patch proposed.
comment:6 Changed 4 years ago by
When is this functionality expected to merged into a boost release please?
(In [56045]) see #3397
vector_expression.hpp: added enable_if to expression scalar * vector and vector * scalar
matrix_expression.hpp: added enable_if to expression scalar * matrix and matrix * scalar