Axis

interface Axis

The coordinates of the nodes of a grid along one dimension, strictly ascending.

Inheritors

Types

Link copied to clipboard
data class Cell(val lower: Int, val upper: Int, val weight: Double)

The cell of an axis enclosing a coordinate: the lower and upper indices of the axis values around it, and the weight of the coordinate between them, 0 at lower and 1 at upper. A coordinate on a value, or outside the axis, has lower equal to upper and weight 0.

Properties

Link copied to clipboard

The interval from the first to the last coordinate.

Link copied to clipboard
abstract val size: Int

The number of coordinates.

Functions

Link copied to clipboard
abstract fun enclosingCellOf(coordinate: Double): Axis.Cell

The Cell enclosing coordinate.

Link copied to clipboard
abstract operator override fun equals(other: Any?): Boolean

Two axes are equal when they have the same coordinates, in the same order.

Link copied to clipboard
abstract operator fun get(index: Int): Double

The coordinate at index.

Link copied to clipboard
abstract override fun hashCode(): Int

The DoubleArray.contentHashCode of the coordinates, consistently with equals.

Link copied to clipboard
abstract fun toDoubleArray(): DoubleArray

A copy of the coordinates.