jyr <jyr2...@googlemail.com> writes:

> The thought has occured to me that one could use the index functions
> for the 3j, 6j, and Gaunt coefficients for a much simpler storage
> scheme in python by using the index as a key for a dictionary of
> stored symbols. I could then extend the above published routines with
> an optional 'remember' keyword that would store them from one call to
> the next.
> However, I am not sure how much memory dictionaries consume in python
> and whether this is efficient. At the end of the day for any realistic
> calculation you are usually talking about millions of them.

In my experience doing extremely large-scale computations using 10^10 or
more 6j symbols, it is faster to evaluate a 6j symbol than to look it up
in a hash table.  On the other hand, if you repeatedly need sequences of
6j symbols with one argument varying, it does pay off to store arrays of
6j symbols in a hash table with the key being the 5 fixed arguments.
That is all in C using floating point, so it may be worthwhile using
a hash table if you want exact rational results.

By the way, I have a C library, written with Igor Khavkine, that
computes 3j, 6j, 10j and other networks using your choice of exact
rational or floating point arithmetic.  It also does the q-deformed
calculations, either for fixed complex q (returning a complex) or for
symbolic q (returning an exact rational function of q).  It is
optimized for speed and even has a python interface.

The bad news is that it is complicated to build, not well-documented,
and not really in a state for others to use.

So it would be great if Jens' library could be included in sage!

Dan

PS: I'm currently working on using sage to evaluate 3j and 6j symbols
for SU(n) for n > 2 (the above being the n=2 case).  I'll report to the
list if I come up with something appropriate for inclusion in sage.


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

Reply via email to