DoubledGrid

org.appliedtopology.tda4j.DoubledGrid
object DoubledGrid

Iteration over the doubled grid of a cubical grid (KMM encoding: coordinate 2a is the point a, 2a + 1 the interval [a, a + 1]), one prefix (the coordinates of every axis but the last) at a time, so a caller can walk the last axis in a tight loop and skip the prefixes that hold none of the cells it wants.

Attributes

Experimental
true
Source
GridRanks.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

inline def foreachPrefix(shape: Array[Int], ascending: Boolean)(inline body: Array[Int] => Unit): Unit

Calls body with the doubled coordinates of axes 0 .. d - 2 (a live array: read it, never keep it), for every such prefix in ascending lexicographic order if ascending, else descending. For d = 1 there is one, empty, prefix.

Calls body with the doubled coordinates of axes 0 .. d - 2 (a live array: read it, never keep it), for every such prefix in ascending lexicographic order if ascending, else descending. For d = 1 there is one, empty, prefix.

Attributes

Source
GridRanks.scala