[GAP Forum] Reading group elements from CSV file

Dmitrii (Dima) Pasechnik dima at ntu.edu.sg
Tue Aug 13 14:10:53 BST 2013


On 13 August 2013 08:59, Ha T. Lam <hatlam at gmail.com> wrote:
> Dear GAP forum,
>
> I saved the output of some computation as a csv file consisting of group
> elements, like so:
>
> a,b,c
> g2,g1^2,g1^-1*g2*g3^-2
>
> Now I want to read these elements back and use them as group elements for
> the group g:=DihedralGroup(8). I used ReadCSV(filename). First I realized
> that group elements need to be referred to as g.1, g.2, etc. An easy search
> and replace with my text editor took care of that, so now my csv file looks
> like:
>
> a,b,c
> g.2,g.1^2,g.1^-1*g.2*g.3^-2
>
> But what I get back is actually a list of records consisting of strings,
> not actually group elements. How do I evaluate these strings so that GAP
> knows that I'm referring to the group elements instead?

There is the EvalString function that lets you evaluate GAP expressions which
are built up as strings.

Hope this helps,
Dmitrii

>
> Thank you for your help.
>
> Ha T. Lam
> _______________________________________________
> Forum mailing list
> Forum at mail.gap-system.org
> http://mail.gap-system.org/mailman/listinfo/forum

CONFIDENTIALITY:This email is intended solely for the person(s) named and may be confidential and/or privileged.If you are not the intended recipient,please delete it,notify us and do not copy,use,or disclose its content.

Towards A Sustainable Earth:Print Only When Necessary.Thank you.



More information about the Forum mailing list