FlatCubicalGridStream

org.appliedtopology.tda4j.FlatCubicalGridStream
See theFlatCubicalGridStream companion object
open class FlatCubicalGridStream(shape: IndexedSeq[Int], pixels: Array[Double], parallelFiltrationValue: Boolean = ..., nanMask: Boolean = ...) extends CubicalGridStream

A grid whose top-cell values are already one flat row-major array, as CubicalImage.fromFlatArray builds it: the engines read the array itself instead of calling topCellValue once per pixel.

Attributes

Companion
object
Experimental
true
Source
CubicalStream.scala
Graph
Supertypes
trait StratifiedCellStream[Cube, Double]
trait CellStream[Cube, Double]
trait IterableOnce[Cube]
trait Filtration[Cube, Double]
trait Filterable[Double]
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

def homologyDegreeLimit: Option[Int]

Some(k) for a complex cut off to compute homology in degrees 0..k (what VietorisRips(points, maxDimension = k) returns, holding cells up to dimension k + 1): its higher degrees are not the homology of the full complex. None (the default) for a complete complex.

Some(k) for a complex cut off to compute homology in degrees 0..k (what VietorisRips(points, maxDimension = k) returns, holding cells up to dimension k + 1): its higher degrees are not the homology of the full complex. None (the default) for a complete complex.

Attributes

Inherited from:
StratifiedCellStream
Source
SimplexStream.scala
override def iterateDimension: PartialFunction[Int, Iterator[Cube]]

The cubes of dimension d (0 <= d <= ambientDim) in the complex (masked ones left out), oldest first. Each call builds and sorts the whole dimension.

The cubes of dimension d (0 <= d <= ambientDim) in the complex (masked ones left out), oldest first. Each call builds and sorts the whole dimension.

Attributes

Definition Classes
Inherited from:
CubicalGridStream
Source
CubicalStream.scala
override def iterator: Iterator[Cube]

All the cells, dimension by dimension. Stops at the first undefined dimension (takeWhile, never filter, which would search forever past the last one).

All the cells, dimension by dimension. Stops at the first undefined dimension (takeWhile, never filter, which would search forever past the last one).

Attributes

Definition Classes
StratifiedCellStream -> IterableOnce
Inherited from:
StratifiedCellStream
Source
SimplexStream.scala
def knownSize: Int

The number of elements in this collection, if it can be cheaply computed, -1 otherwise. Cheaply usually means: Not requiring a collection traversal.

The number of elements in this collection, if it can be cheaply computed, -1 otherwise. Cheaply usually means: Not requiring a collection traversal.

Attributes

Inherited from:
IterableOnce
Source
IterableOnce.scala
def onBoundary(c: Cube): Boolean

Whether c lies on the boundary of the grid, the rectangle or box the pixels fill: along some axis it is the point at the first or the last lattice coordinate (a pixel never is). A face of a boundary cube is a boundary cube, so these cubes form the subcomplex that Relative.ofBoundary divides out.

Whether c lies on the boundary of the grid, the rectangle or box the pixels fill: along some axis it is the point at the first or the last lattice coordinate (a pixel never is). A face of a boundary cube is a boundary cube, so these cubes form the subcomplex that Relative.ofBoundary divides out.

Attributes

Inherited from:
CubicalGridStream
Source
CubicalStream.scala
def stepper[S <: Stepper[_]](implicit shape: StepperShape[Cube, S]): S

Returns a scala.collection.Stepper for the elements of this collection.

Returns a scala.collection.Stepper for the elements of this collection.

The Stepper enables creating a Java stream to operate on the collection, see scala.jdk.StreamConverters. For collections holding primitive values, the Stepper can be used as an iterator which doesn't box the elements.

The implicit scala.collection.StepperShape parameter defines the resulting Stepper type according to the element type of this collection.

  • For collections of Int, Short, Byte or Char, an scala.collection.IntStepper is returned
  • For collections of Double or Float, a scala.collection.DoubleStepper is returned
  • For collections of Long a scala.collection.LongStepper is returned
  • For any other element type, an scala.collection.AnyStepper is returned

Note that this method is overridden in subclasses and the return type is refined to S with EfficientSplit, for example scala.collection.IndexedSeqOps.stepper. For Steppers marked with scala.collection.Stepper.EfficientSplit, the converters in scala.jdk.StreamConverters allow creating parallel streams, whereas bare Steppers can be converted only to sequential streams.

Attributes

Inherited from:
IterableOnce
Source
IterableOnce.scala
def topValues: IndexedSeq[Double]

Every top cell's value in row-major order (the last axis fastest), read from topCellValue once (in parallel when parallelFiltrationValue): the pixels of the image, as CubicalImage.fromFlatArray takes them. A read-only view of topCellValues, which is not copied.

Every top cell's value in row-major order (the last axis fastest), read from topCellValue once (in parallel when parallelFiltrationValue): the pixels of the image, as CubicalImage.fromFlatArray takes them. A read-only view of topCellValues, which is not copied.

Attributes

Inherited from:
CubicalGridStream
Source
CubicalStream.scala
def totalCellCount: Long

Total cell count of the full grid complex, by the "sum over subsets of a product = product of (in-choice + out-choice)" identity: for a fixed set of non-degenerate axes there are shape(i) choices along a non-degenerate axis and shape(i)+1 along a degenerate one, and summing that product over every subset of non-degenerate axes collapses to prod_i (shape(i) + (shape(i)+1)). O(ambientDim), no enumeration needed.

Total cell count of the full grid complex, by the "sum over subsets of a product = product of (in-choice + out-choice)" identity: for a fixed set of non-degenerate axes there are shape(i) choices along a non-degenerate axis and shape(i)+1 along a degenerate one, and summing that product over every subset of non-degenerate axes collapses to prod_i (shape(i) + (shape(i)+1)). O(ambientDim), no enumeration needed.

Attributes

Inherited from:
CubicalGridStream
Source
CubicalStream.scala

Inherited fields

val ambientDim: Int

Attributes

Inherited from:
CubicalGridStream
Source
CubicalStream.scala
override val filtrationOrdering: Ordering[Cube]

FiltrationOrdering.canonical with cubeOrdering as tie-break. Ties are common here: a face shares its value with at least one coface.

FiltrationOrdering.canonical with cubeOrdering as tie-break. Ties are common here: a face shares its value with at least one coface.

Attributes

Inherited from:
CubicalGridStream
Source
CubicalStream.scala
override val filtrationValue: PartialFunction[Cube, Double]

Attributes

Inherited from:
CubicalGridStream
Source
CubicalStream.scala
val largest: Double

Attributes

Inherited from:
DoubleFiltration
Source
SimplexStream.scala
val smallest: Double

Attributes

Inherited from:
DoubleFiltration
Source
SimplexStream.scala
val topCellValue: IndexedSeq[Int] => Double

Attributes

Inherited from:
CubicalGridStream
Source
CubicalStream.scala