Typeclass for indexable types supporting range enumeration.
$$\text{Ix}(\alpha)$$ provides operations for enumerating and indexing over bounded ranges $[lo, hi]$.
Corresponds to Haskell's Data.Ix.Ix.
Enumerate all indices in the range $[lo, hi]$. $$\text{range}(lo, hi) = [lo, lo+1, \ldots, hi]$$
The number of indices in the range. $$\text{rangeSize}(lo, hi) = |\text{range}(lo, hi)|$$
Test whether an index is within the given bounds. $$\text{inRange}((lo, hi), i) \iff lo \leq i \leq hi$$
Instances
@[implicit_reducible]
Equations
- One or more equations did not get rendered due to their size.
@[implicit_reducible]
Equations
- One or more equations did not get rendered due to their size.
@[implicit_reducible]
Equations
- One or more equations did not get rendered due to their size.
@[implicit_reducible]
Equations
- One or more equations did not get rendered due to their size.