This was so helpful! I'm a self-learner and apparently still very amateur
at writing Sage codes, since I have no Phyton background.
There's a lot to learn. :)
Thank you very much sir!
Best Regards,
Mehmet Akif Yetim
30 Haziran 2016 Perşembe 21:28:43 UTC+3 tarihinde Dima Pasechnik yazdı:
>
>
>
> this is very sub-optimal; you should not call M2 in the loop, unless
> absolutely necessary.
> Also, Python has quite powerful string manipulation routines and
> functional programming operations.
> Here is the code that does the same as above, and much faster:
>
> macaulay2('loadPackage "Graphs"')
> G = Graph({1:[2], 2:[1,3], 3:[2,4], 4:[3]})
> macaulay2('H = graph({'+','.join(map(lambda (x,y,_):
> '{'+str(x)+','+str(y)+'}', G.edges()))+'})')
>
>
>
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.