ENH: Allow for arbitarily large cluster sizes
This MR removes the constraint of only allowing up to 4-body clusters. I verified that the accompanying test fails with the old method.
The idea is to have a running vector, which we increment 1-by-1, as to generate all permutations of the decoration numbers. I also think that the decoration numbers shouldn't be constructed using push_back
, but for now, I wanted to keep it simple - but using push-back is going to generate a bunch of copying, until the final 2d array is created. But it works for now, and I don't think it's a very performance critical part of the code.
I find it a little difficult to directly test the c++ code, do we have any better protocol for doing that? It's at least something we could think about for the future.
What do you think, @davidkleiven @jinchang ?
Edit: I think I solved the issue of memory, just by pre-allocating enough space in the deco
vector, since we know how many elements it's going to get.