add `wigner9j` symbols
Hi!
I've taken a rough pass at minimally implementing the 9j symbols based on L. Wei (1998) with binomials optimized according to the methods in Johansson & Forssen (2015), per the README's TODO. I'm new to package-quality Julia, but tried to use mostly similar patterns to the older code - for readability and minimal impact on that existing code.
Based on a bit of profiling, the computation runs reasonably quickly, is exact, and tests well against the decomposition in terms of sums of products of 6j symbols. There's likely still some performance to be gained.
I'd be happy to take any feedback/make any edits! :) Sorry for any trouble due to inexperience packaging.
Thanks for this and my apologies for the late response. I was on holidays in the second half of August. At a first glance, this looks of great quality. I have to admit that I will have to quickly read up on 9j symbols before doing a proper review; I have no experience with them (or not knowingly at least; I decompose everything in 6js, maybe without realising that what I am doing are 9j calculations).
Awesome, thanks for the feedback! I've gone through and tweaked functionality/performance things as recommended, and replied to comments wrt. more stylistic things (if you confirm preferences for them I'm also happy to make those changes definitive too!). I'll need to loop back later in the week to take a look at improving the caching scheme/checks though - I'm out of bulk time to spare today :)
Ok I see, none of the symmetry transformations can actually change what is living on a given row or column, except for interchanging rows and columns. I guess you can still have that:
j1 <= everything (bring smallest element to the upper left corner) row 1 is sorted such that j1 <= j2 <= j3 (by permuting column 2 and 3 if necessary) column 1 is sorted such that j1 <= j4 <= j7 (by permuting row 2 and 3 if necessary) j2 <= j4 (by transposing if necessary)
I think that fixes all the symmetry transformations when all the j's are different, but still leaves the degenerate cases which require further attention.
I might try to take a stab at this.