30 Jun
2009
30 Jun
'09
10:43 p.m.
Hi! ahabrard wrote:
Another problem with matrix of non commutative symbols, consider the following code: matrix m(2,2); m = x, y, y, x; cout << m.inverse() << endl;
Ginac stops with the following message: "Terminate called after throwing an instance of 'std::logic_error' what(): add::eval(): sum of non-commutative objects has non-zero numeric term Abort trap"
Anyone knows the reason ?
Internally, the .inverse() method is performing matrix elimination. With non-commutative elements, it would have to keep track of the order of terms but it doesn't really know how to do that. If you know how to do such things, you should consider writing a patch. Cheers -richy. -- Richard B. Kreckel <http://www.ginac.de/~kreckel/>