Adding another infix operator?(programing)

Christian Bauer cbauer at thep.physik.uni-mainz.de
Thu Mar 21 17:35:17 CET 2002


Hi!

On Wed, Mar 20, 2002 at 01:49:50PM -0800, Mark Stankus wrote:
> Is it possible/easy/hard to add a "**" infix operator to ginac?

Impossible because you can't define new operators in C++ (only overload
existing ones). Besides, noncommutativity in GiNaC is a property of the
objects, and the ordinary '*' operator is used for both commutative and
noncommutative products (that's handled automatically). Symbols are
commutative by default, but you can subclass your own, noncommutative
symbols.

For more information, see the GiNaC tutorial, section "Non-commutative
objects".

Bye,
Christian

-- 
  / Coding on PowerPC and proud of it
\/ http://www.uni-mainz.de/~bauec002/



More information about the GiNaC-list mailing list