Both gap4 packages (braid and mapclass) don't deal with braid groups
themselves, but with the orbits of a certain actions of them (and more
general groups). I mean, they don't implement the usual stuff one
would expect in a braid group: normal forms, burau representation, lcm
and gcd, conjugation problem...

Chevie does have some of this (at least it has something similar to a
left normal form, which is the basis for the rest). It can compute the
left normal form faster than my python code, but it has some
drawbacks: it runs on gap3, which is not even listed as an
experimental package (there are some .spkg available in some trac
ticket though), and also, the comunication with it is done through a
pexpect interface, which has a noticeable overhead.

With all that in mind, i considered cbraid as a good option, since it
is very fast, and small. Other option would be to try to optimize my
python code, but i think it will be always be slow. Maybe cythonizing
some parts of it would make it faster, but i have noted that
cythonizing code only leads to speedups when made very carefully.

On 7 jun, 14:02, Dima Pasechnik <dimp...@gmail.com> wrote:
> On Thursday, 7 June 2012 13:50:59 UTC+2, Volker Braun wrote:
>
> > Is cbraid really the best/fastest implementation of braid groups out
> > there? How does it compare to what GAP can do?
>
> Indeed, there is (nonstandard) GAP package "braid", packaged in
> gap_packages spkg, and
> as far as I am told by one of its authors, Sergey Shpectorov, their package
> mapclasshttp://web.mat.bham.ac.uk/S.Shpectorov/mapclass/
> can do all of what "braid" can, and more.
>
> Just from glancing at it, the author doesn't use many C++ features. Not
>
> > necessarily a minus. It implements bubble sort, really? Also seems to be
> > very hard to maintain, many nested loops with undocumented one-letter
> > variables.
>
> > On Thursday, June 7, 2012 12:28:08 PM UTC+1, mmarco wrote:
>
> >> I have been working on an implementation of braid groups for sage
> >>  (together with free and finitely presented groups). So far i have a
> >>  preliminary version (see ticket #12339). It is still not feature
> >>  complete and also very slow compared to cbraid[1], for example, but
> >> it
> >>  is usable.
>
> >> In order to speed it up, i want to interface cbraid directly. But i
> >>  have no experience at all with c++ or python interfaces to external
> >>  libraries. Please can someone help me with it? For example, i would
> >>  need to write a function that takes an integer n and a list of
> >>  integers l (that represents a braid of n strands), and uses cbraid
> >> to
> >>  compute the left normal form. I have tried to do it directly with
> >>  ctypes, but i only got error messages.
>
> >> Thanks in advance.
>
> >> [1]http://code.google.com/p/cbraid/

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to