Math

interface Math

Mathematical methods interface.

Functions

Link copied to clipboard
abstract fun <T : Number, D : Dimension> argMax(a: MultiArray<T, D>): Int

Returns flat index of maximum element in an ndarray.

abstract fun <T : Number, D : Dimension, O : Dimension> argMax(a: MultiArray<T, D>, axis: Int): NDArray<Int, O>

Returns an ndarray of indices of maximum elements in an ndarray a over a given axis.

Link copied to clipboard
abstract fun <T : Number> argMaxD2(a: MultiArray<T, D2>, axis: Int): NDArray<Int, D1>

Returns an ndarray of indices of maximum elements in a two-dimensional ndarray a over a given axis.

Link copied to clipboard
abstract fun <T : Number> argMaxD3(a: MultiArray<T, D3>, axis: Int): NDArray<Int, D2>

Returns an ndarray of indices of maximum elements in a three-dimensional ndarray a over a given axis.

Link copied to clipboard
abstract fun <T : Number> argMaxD4(a: MultiArray<T, D4>, axis: Int): NDArray<Int, D3>

Returns an ndarray of indices of maximum elements in a four-dimensional ndarray a over a given axis.

Link copied to clipboard
abstract fun <T : Number> argMaxDN(a: MultiArray<T, DN>, axis: Int): NDArray<Int, D4>

Returns an ndarray of indices of maximum elements in an n-dimensional ndarray a over a given axis.

Link copied to clipboard
abstract fun <T : Number, D : Dimension> argMin(a: MultiArray<T, D>): Int

Returns flat index of minimum element in an ndarray.

abstract fun <T : Number, D : Dimension, O : Dimension> argMin(a: MultiArray<T, D>, axis: Int): NDArray<Int, O>

Returns an ndarray of indices of minimum elements in an ndarray a over a given axis.

Link copied to clipboard
abstract fun <T : Number> argMinD2(a: MultiArray<T, D2>, axis: Int): NDArray<Int, D1>

Returns an ndarray of indices of minimum elements in a two-dimensional ndarray a over a given axis.

Link copied to clipboard
abstract fun <T : Number> argMinD3(a: MultiArray<T, D3>, axis: Int): NDArray<Int, D2>

Returns an ndarray of indices of minimum elements in a three-dimensional ndarray a over a given axis.

Link copied to clipboard
abstract fun <T : Number> argMinD4(a: MultiArray<T, D4>, axis: Int): NDArray<Int, D3>

Returns an ndarray of indices of minimum elements in a four-dimensional ndarray a over a given axis.

Link copied to clipboard
abstract fun <T : Number> argMinDN(a: MultiArray<T, DN>, axis: Int): NDArray<Int, D4>

Returns an ndarray of indices of minimum elements in an n-dimensional ndarray a over a given axis.

Link copied to clipboard
abstract fun <T : Number, D : Dimension> cumSum(a: MultiArray<T, D>): D1Array<T>

Returns cumulative sum of all elements in the given ndarray.

abstract fun <T : Number, D : Dimension> cumSum(a: MultiArray<T, D>, axis: Int): NDArray<T, D>

Returns cumulative sum of all elements in the given ndarray along the given axis.

Link copied to clipboard
abstract fun <T : Number, D : Dimension> max(a: MultiArray<T, D>): T

Returns maximum element of the given ndarray.

abstract fun <T : Number, D : Dimension, O : Dimension> max(a: MultiArray<T, D>, axis: Int): NDArray<T, O>

Returns maximum of an ndarray a along a given axis.

Link copied to clipboard
abstract fun <T : Number> maxD2(a: MultiArray<T, D2>, axis: Int): NDArray<T, D1>

Returns maximum of a two-dimensional ndarray a along a given axis.

Link copied to clipboard
abstract fun <T : Number> maxD3(a: MultiArray<T, D3>, axis: Int): NDArray<T, D2>

Returns maximum of a three-dimensional ndarray a along a given axis.

Link copied to clipboard
abstract fun <T : Number> maxD4(a: MultiArray<T, D4>, axis: Int): NDArray<T, D3>

Returns maximum of a four-dimensional ndarray a along a given axis.

Link copied to clipboard
abstract fun <T : Number> maxDN(a: MultiArray<T, DN>, axis: Int): NDArray<T, D4>

Returns maximum of an n-dimensional ndarray a along a given axis.

Link copied to clipboard
abstract fun <T : Number, D : Dimension> min(a: MultiArray<T, D>): T

Returns minimum element of the given ndarray.

abstract fun <T : Number, D : Dimension, O : Dimension> min(a: MultiArray<T, D>, axis: Int): NDArray<T, O>

Returns minimum of an ndarray a along a given axis.

Link copied to clipboard
abstract fun <T : Number> minD2(a: MultiArray<T, D2>, axis: Int): NDArray<T, D1>

Returns minimum of a two-dimensional ndarray a along a given axis.

Link copied to clipboard
abstract fun <T : Number> minD3(a: MultiArray<T, D3>, axis: Int): NDArray<T, D2>

Returns minimum of a three-dimensional ndarray a along a given axis.

Link copied to clipboard
abstract fun <T : Number> minD4(a: MultiArray<T, D4>, axis: Int): NDArray<T, D3>

Returns minimum of a four-dimensional ndarray a along a given axis.

Link copied to clipboard
abstract fun <T : Number> minDN(a: MultiArray<T, DN>, axis: Int): NDArray<T, D4>

Returns minimum of an n-dimensional ndarray a along a given axis.

Link copied to clipboard
abstract fun <T : Number, D : Dimension> sum(a: MultiArray<T, D>): T

Returns sum of all elements in the given ndarray.

abstract fun <T : Number, D : Dimension, O : Dimension> sum(a: MultiArray<T, D>, axis: Int): NDArray<T, O>

Returns an ndarray of sum all elements over a given axis.

Link copied to clipboard
abstract fun <T : Number> sumD2(a: MultiArray<T, D2>, axis: Int): NDArray<T, D1>

Returns an ndarray of sum all elements in a two-dimensional ndarray a over a given axis.

Link copied to clipboard
abstract fun <T : Number> sumD3(a: MultiArray<T, D3>, axis: Int): NDArray<T, D2>

Returns an ndarray of sum all elements in a three-dimensional ndarray a over a given axis.

Link copied to clipboard
abstract fun <T : Number> sumD4(a: MultiArray<T, D4>, axis: Int): NDArray<T, D3>

Returns an ndarray of sum all elements in a four-dimensional ndarray a over a given axis.

Link copied to clipboard
abstract fun <T : Number> sumDN(a: MultiArray<T, DN>, axis: Int): NDArray<T, D4>

Returns an ndarray of sum all elements in a n-dimensional ndarray a over a given axis.

Properties

Link copied to clipboard
abstract val mathEx: MathEx

instance of MathEx

Extensions

Link copied to clipboard
@JvmName(name = "cos")
fun <T : Number, D : Dimension> Math.cos(a: MultiArray<T, D>): NDArray<Double, D>

Returns a ndarray of Double from the given ndarray to each element of which a cos function has been applied.

@JvmName(name = "cosFloat")
fun <D : Dimension> Math.cos(a: MultiArray<Float, D>): NDArray<Float, D>

Returns a ndarray of Float from the given ndarray to each element of which a cos function has been applied.

@JvmName(name = "cosComplexFloat")
fun <D : Dimension> Math.cos(a: MultiArray<ComplexFloat, D>): NDArray<ComplexFloat, D>

Returns a ndarray of ComplexFloat from the given ndarray to each element of which a cos function has been applied.

@JvmName(name = "cosComplexDouble")
fun <D : Dimension> Math.cos(a: MultiArray<ComplexDouble, D>): NDArray<ComplexDouble, D>

Returns a ndarray of ComplexDouble from the given ndarray to each element of which a cos function has been applied.

Link copied to clipboard
@JvmName(name = "exp")
fun <T : Number, D : Dimension> Math.exp(a: MultiArray<T, D>): NDArray<Double, D>

Returns a ndarray of Double from the given ndarray to each element of which an exp function has been applied.

@JvmName(name = "expFloat")
fun <D : Dimension> Math.exp(a: MultiArray<Float, D>): NDArray<Float, D>

Returns a ndarray of Float from the given ndarray to each element of which an exp function has been applied.

@JvmName(name = "expComplexFloat")
fun <D : Dimension> Math.exp(a: MultiArray<ComplexFloat, D>): NDArray<ComplexFloat, D>

Returns a ndarray of ComplexFloat from the given ndarray to each element of which an exp function has been applied.

@JvmName(name = "expComplexDouble")
fun <D : Dimension> Math.exp(a: MultiArray<ComplexDouble, D>): NDArray<ComplexDouble, D>

Returns a ndarray of ComplexDouble from the given ndarray to each element of which an exp function has been applied.

Link copied to clipboard
@JvmName(name = "log")
fun <T : Number, D : Dimension> Math.log(a: MultiArray<T, D>): NDArray<Double, D>

Returns a ndarray of Double from the given ndarray to each element of which a log function has been applied.

@JvmName(name = "logFloat")
fun <D : Dimension> Math.log(a: MultiArray<Float, D>): NDArray<Float, D>

Returns a ndarray of Float from the given ndarray to each element of which a log function has been applied.

@JvmName(name = "logComplexFloat")
fun <D : Dimension> Math.log(a: MultiArray<ComplexFloat, D>): NDArray<ComplexFloat, D>

Returns a ndarray of ComplexFloat from the given ndarray to each element of which a log function has been applied.

@JvmName(name = "logComplexDouble")
fun <D : Dimension> Math.log(a: MultiArray<ComplexDouble, D>): NDArray<ComplexDouble, D>

Returns a ndarray of ComplexDouble from the given ndarray to each element of which a log function has been applied.

Link copied to clipboard
@JvmName(name = "sin")
fun <T : Number, D : Dimension> Math.sin(a: MultiArray<T, D>): NDArray<Double, D>

Returns an ndarray of Double from the given ndarray to each element of which a sin function has been applied.

@JvmName(name = "sinFloat")
fun <D : Dimension> Math.sin(a: MultiArray<Float, D>): NDArray<Float, D>

Returns an ndarray of Float from the given ndarray to each element of which a sin function has been applied.

@JvmName(name = "sinComplexFloat")
fun <D : Dimension> Math.sin(a: MultiArray<ComplexFloat, D>): NDArray<ComplexFloat, D>

Returns an ndarray of ComplexFloat from the given ndarray to each element of which a sin function has been applied.

@JvmName(name = "sinComplexDouble")
fun <D : Dimension> Math.sin(a: MultiArray<ComplexDouble, D>): NDArray<ComplexDouble, D>

Returns an ndarray of ComplexDouble from the given ndarray to each element of which a sin function has been applied.