This week, I finished up the PR to add static_assert to the container-traits. I also simplified the Tensor implementation PR and submitted it for review/merge.
The bulk of my work now has to do with implementing a version of the Coiterate over the Tensor classes now, instead of over single levels.
Now, merge lattice takes in a tuple of Tensors:
Constructor: we can compile-time check that the tensor shapes align? I don’t know how to do this, so probably a future PR.
The algorithm must initialize a coiterator over levels for the index into the level given to the merge lattice. It will advance, dereference and compare elements until this coiterator is done. Then it will advance the coiterator above.
Expression: (A_ij + B_ij) @ C_j = D_i
Tensors: (A, B, C)
Indices: [(0, 1), (0, 1), (1)]
How would the iterator function? Initialize iter1 = Coiterate(A_i*, B_i*, true). Initialize iter2 = Coiterate (A_*j, B_*j, C_j).
If iter2 != end:
Reset iter2; // what would this mean? Iter2 now must take in the new IK and PK from iter1 to know where to start
Basically, what sort of objects do I need to handle in the iterator of MergeLattice class? Should I store a tuple of ``Coiterate`` classes for each tuple of levels from the Tensors?
Am I thinking about this correctly?