3 Dec
2002
3 Dec
'02
7:50 p.m.
Hi! On Tue, Dec 03, 2002 at 03:25:00PM +0100, smilauer@volny.cz wrote:
I would like to use symbols to represent matrices. Obvious solution (replacing symbols via some_ex.sub(some_symbol==some_matrix) does not work for multiplication of matrices. Other ways to do it?
1) Subclass symbol (see GiNaC tutorial, section 6.3.) and override return_type() to return 'return_types::noncommutative' and return_type_tinfo() to return 'TINFO_matrix'. These new symbols will then have the same commutativity properties as matrices. 2) Use dummy 1x1 numeric or symbolic matrices instead of symbols, and subs() the entrire matrices. Bye, Christian -- / Coding on PowerPC and proud of it \/ http://www.uni-mainz.de/~bauec002/