I want to generate $n$ by $n$ binary arrays, and then reduce the output from those arrays by performing a number of permutations and eliminating duplicates. The problem is that the number of arrays increases as $2^{n^2}$, so storing every tuple in memory and comparing each permutation is impractical for $n>4$.
A working solution when $n<4$ is given here: Reduce the output from tuples by including symmetry?.
My questions is: how can I generate $n$ by $n$ binary arrays and eliminate duplicates (as defined by certain permutations) in a memory efficient manner?
For instance, is it possible to generate a few tuples at a time, run the permutations, check for duplicates, and then continue generating the remaining tuples?
P.S. I asked a different version of this question here: Constructing and Reducing Tuples in a Memory Efficient Manner, and have been unable to implement the solution given here: Memory efficient generation and selection of tuples.