cartesian

package cartesian
Memory-efficient Cartesian products on heterogeneous collections.

Concerns

  • cartesian: Memory-efficient Cartesian products on heterogeneous collections.
    • cartesian: Memory-efficient Cartesian products on heterogeneous collections.

cartesian::cartesian

module cartesian

Memory-efficient Cartesian products on heterogeneous collections.

This module is a proof-of-concept to propose memory-efficient views on collections.

This is a specific alternative to combinations, that focuses only highly efficient Cartesian products between collections of different types.

Collection[Int] X Collection[String] -> Collection[(Int,String)]

However, in Nit, there in no native tuple type. So we need a first building block, a pair.

Introduces
  • Pair: A simple read-only pair of two elements e and f.
  • Cartesian: A view of a Cartesian-product collection over two collections.
  • CartesianIterator: An iterator over a Cartesian-product collection.