[GAP Forum] Overloading functions

Marek Mitros marek at mitros.org
Fri May 11 11:49:06 BST 2012


Hi,

I tried to define ComplexConjugate function for octonions - see below.
In this <conj> is my function for conjugating the octonion.

gap> ComplexConjugate:=function(o) return conj(o); end;
Variable: 'ComplexConjugate' is read only

I would like to use <ReflectionMat> function which use
<ComplexConjugate>. Is there way in GAP to overload standard
<ComplexConjugate> function, so it works also for my octonions ?

The workaround would be to copy function from lib/matrix.gi and modify
but it is less convenient.

Regards,
Marek



More information about the Forum mailing list