koblas

F64DenseVector

@Serializable
@SerialName(value = "F64DenseVector")
class F64DenseVector : F64VectorView(source)

Types

Link copied to clipboard
object Companion

Factories for dense vectors.

Properties

data

size

open override val size: Int(source)

Number of entries, counting the unstored zeros of a sparse vector.

Functions

equals

open operator override fun equals(other: Any?): Boolean(source)

get

open operator override fun get(i: Int): Double(source)

The entry at index (i). Throws IndexOutOfBoundsException outside 0 until size, whatever the storage.

hashCode

open override fun hashCode(): Int(source)

set

operator fun set(i: Int, v: Double)(source)

Writes (v) at index (i).

toDoubleArray

open override fun toDoubleArray(): DoubleArray(source)

Materialise into a fresh dense DoubleArray, independent of the internal storage.

toString

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

Sum of absolute values (BLAS dasum). Sparse vectors sum over stored entries only.

Link copied to clipboard

y = y + alpha * x. A sparse x touches only the positions it stores.

Link copied to clipboard

aT * b. Any sparse operand goes through F64SparseKernels, walking the stored entries only.

Link copied to clipboard
inline fun F64VectorLike.forEachStored(block: (i: Int, v: Double) -> Unit)

Visit each stored entry as (index, value), in ascending index order for any storage. A F64SparseVector may present numerical zeros as stored, and any other F64VectorLike has every index visited.

Link copied to clipboard

Index of the entry with maximal absolute value (BLAS idamax), -1 for a zero-length vector. Ties resolve to the lowest index, and a vector with no stored entries returns 0.

Link copied to clipboard

a - b, allocating. axpy with alpha = -1.0 accumulates into an existing operand.

Link copied to clipboard

Euclidean norm (BLAS dnrm2). Rescales when the sum of squares would overflow or underflow, so any finite input gives the correct norm.

Link copied to clipboard

a + b, allocating. axpy accumulates into an existing operand.

Link copied to clipboard

v = alpha * v.

Link copied to clipboard

alpha * x, allocating. scale multiplies in place.

Link copied to clipboard

-x, allocating.