ImmutableAxis

class ImmutableAxis(coordinates: DoubleArray) : Axis

The coordinates of the nodes of a grid along one dimension, strictly ascending. The coordinates are copied, so later changes to the array do not affect the axis.

Throws

if coordinates is empty, or not strictly ascending, or contains NaN.

Constructors

Link copied to clipboard
constructor(coordinates: DoubleArray)

Properties

Link copied to clipboard

The interval from the first to the last coordinate.

Link copied to clipboard
open override val size: Int

The number of coordinates.

Functions

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

The Cell enclosing coordinate.

Link copied to clipboard
open 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
open operator override fun get(index: Int): Double

The coordinate at index.

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

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

Link copied to clipboard
open override fun toDoubleArray(): DoubleArray

A copy of the coordinates.

Link copied to clipboard
open override fun toString(): String