[GAP Forum] Overloading functions
Alexander Konovalov
alexk at mcs.st-andrews.ac.uk
Mon Nov 19 12:53:35 GMT 2012
On 11 May 2012, at 11:49, Marek Mitros wrote:
> 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.
Dear Marek, dear Forum,
I've seen that this old message in the Forum was not answered by anyone.
In case this question still makes sense, then is is possible for you just
to install a method for ComplexConjugate for octonions?
ComplexConjugate is an attribute, and the GAP library already has several
methods for ComplexConjugate installed for different kinds of objects -
you may find examples in the files from the 'lib' directory.
Hope this helps,
Alexander
More information about the Forum
mailing list