I needed to do a lot of mixed vector/matrix expressions, such as
- Code: Select all
double s = v1 * M * v2; // e.g., physics matrix element
TMatrixD M = v1' * v2 // outer product of v1 and v2
The attached files implement these functions, along with vector/matrix AreCompatible functions.
Enjoy,
Peter