gorgonia/tensor

`*FlatIterator` Support For ColMajor

chewxy opened this issue · 0 comments

The *FlatIterator type implements Iterator, which is an interface for stateful iterators. It also supports reverse iteration (by means of the .SetReverse() method).

Currently, the *FlatIterator type supports the following operations

- Row Major Vector Col Major Vector Row Major N-DImensional Col Major N-Dimensional
Forward Next()
Backward Next()
Forward NextValidity()
Backward NextValidity()
Forward NextValid()
Backward NextValid()
Forward NextInvalid()
Backward NextInvalid()

A major internal method that underpins all of these are .ndNext() and .ndPrevious(). The corresponding col-major version are .colMajorNDnext() and .colMajorNDPrevious().

.colMajorNDPrevious() is not implemented. It can be found at Line 402 of iterator.go