I’m trying to find an elegant way to bin data into every bisector of a hypercube that is generalizable to any number of dimensions.
For example with just 3 dims,
In[75]:= exdat = Tuples[{0.5, 1.5}, 3]
Out[75]= {{0.5, 0.5, 0.5}, {0.5, 0.5, 1.5}, {0.5, 1.5, 0.5}, {0.5, 1.5, 1.5}, {1.5, 0.5, 0.5}, {1.5, 0.5, 1.5},
{1.5, 1.5, 0.5}, {1.5, 1.5, 1.5}}
the correct answer would be
{{{0.5, 0.5, 0.5}}, {{0.5, 0.5, 1.5}}, {{0.5, 1.5, 0.5}}, {{0.5, 1.5, 1.5}}, {{1.5, 0.5, 0.5}}, {{1.5, 0.5, 1.5}},
{{1.5, 1.5, 0.5}}, {{1.5, 1.5, 1.5}}}
(one list per sector, splitting each dimension at 1.0)
Is there a form of BinLists that does this?
*Computational expense note: Immediately, I’m working in 8 dimensions
and have ~100k elements to bin. It may be smart to not store empty lists
and instead label the lists that are nonempty.