arrays

vecxt.arrays
object arrays

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
arrays.type

Members list

Value members

Concrete fields

final val spb: VectorSpecies[Byte]
final val spbl: Int
final val spd: VectorSpecies[Double]
final val spdl: Int
final val spi: VectorSpecies[Integer]
final val spil: Int

Extensions

Extensions

extension (vec: Array[Boolean])
inline def &&(thatIdx: Array[Boolean]): Array[Boolean]
inline def all: Boolean
inline def any: Boolean
inline def trues: Int
inline def ||(thatIdx: Array[Boolean]): Array[Boolean]
extension (vec: Array[Int])
inline def !:=(num: Int): Array[Boolean]
inline def +(vec2: Array[Int])(using inline boundsCheck: BoundsCheck): Array[Int]
inline def +=(vec2: Array[Int])(using inline boundsCheck: BoundsCheck): Unit
inline def -(vec2: Array[Int])(using inline boundsCheck: BoundsCheck): Array[Int]
inline def -=(vec2: Array[Int])(using inline boundsCheck: BoundsCheck): Unit
inline def <(num: Int): Array[Boolean]
inline def <=(num: Int): Array[Boolean]
inline def =:=(num: Int): Array[Boolean]
inline def >(num: Int): Array[Boolean]
inline def >=(num: Int): Array[Boolean]
inline def dot(vec2: Array[Int])(using inline boundsCheck: BoundsCheck): Int
inline def gt(num: Int): Array[Boolean]
inline def gte(num: Int): Array[Boolean]
inline def increments: Array[Int]
inline def logicalIdx(inline op: Comparison, num: Int): Array[Boolean]
inline def lt(num: Int): Array[Boolean]
inline def lte(num: Int): Array[Boolean]
inline def sum: Int
extension [A](vec: Array[A])(using ClassTag[A])
inline def apply(index: Array[Boolean])(using inline boundsCheck: BoundsCheck): Array[A]
extension (vec: Array[Double])
inline def !:=(num: Double): Array[Boolean]
inline def *(d: Array[Double])(using inline boundsCheck: BoundsCheck): Array[Double]
inline def *(d: Double): Array[Double]
inline def *=(d: Double): Array[Double]
inline def +(d: Double): Array[Double]
inline def +(vec2: Array[Double])(using inline boundsCheck: BoundsCheck): Array[Double]
inline def +:+(d: Double): Array[Double]
inline def +:+=(d: Double): Unit
inline def +=(d: Double): Unit
inline def +=(vec2: Array[Double])(using inline boundsCheck: BoundsCheck): Unit
inline def -(vec2: Array[Double])(using inline boundsCheck: BoundsCheck): Array[Double]
inline def -(d: Double): Array[Double]
inline def -!: Unit
inline def -=(vec2: Array[Double])(using inline boundsCheck: BoundsCheck): Unit
inline def -=(d: Double): Unit
inline def /(d: Array[Double])(using inline boundsCheck: BoundsCheck): Array[Double]
inline def /(d: Double): Array[Double]
inline def /=(d: Double): Array[Double]
inline def <(num: Double): Array[Boolean]
inline def <=(num: Double): Array[Boolean]
inline def =:=(num: Double): Array[Boolean]
inline def >(num: Double): Array[Boolean]
inline def >=(num: Double): Array[Boolean]
inline def abs: Array[Double]
inline def abs!: Unit
inline def acos: Array[Double]
inline def acos!: Unit
inline def add(d: Array[Double])(using inline boundsCheck: BoundsCheck): Array[Double]
inline def asin: Array[Double]
inline def asin!: Unit
inline def atan: Array[Double]
inline def atan!: Unit
inline def cbrt: Array[Double]
inline def cbrt!: Unit
inline def corr(thatVector: Array[Double])(using inline boundsCheck: BoundsCheck): Double
inline def cos: Array[Double]
inline def cos!: Unit
inline def cosh: Array[Double]
inline def cosh!: Unit
def covariance(thatVector: Array[Double]): Double
inline def cumsum: Array[Double]
inline def cumsum!: Unit
inline def dot(v1: Array[Double])(using inline boundsCheck: BoundsCheck): Double
inline def elementRanks: Array[Double]
inline def exp: Array[Double]
inline def exp!: Unit
inline def expm1: Array[Double]
inline def expm1!: Unit
inline def increments: Array[Double]
inline def log: Array[Double]
inline def log!: Unit
inline def log10: Array[Double]
inline def log10!: Unit
inline def log1p: Array[Double]
inline def log1p!: Unit
inline def logSumExp: Double

The formula for the logarithm of the sum of exponentials is:

The formula for the logarithm of the sum of exponentials is:

logSumExp(x) = log(sum(exp(x_i))) for i = 1 to n

This is computed in a numerically stable way by subtracting the maximum value in the array before taking the exponentials:

logSumExp(x) = max(x) + log(sum(exp(x_i - max(x)))) for i = 1 to n

Attributes

inline def logicalIdx(inline op: Comparison, num: Double): Array[Boolean]
inline def max: Double
inline def mean: Double
inline def min: Double
inline def multInPlace(d: Double): Array[Double]
inline def norm: Double
inline def outer(other: Array[Double])(using ClassTag[Double]): Matrix[Double]
inline def pearsonCorrelationCoefficient(thatVector: Array[Double])(using inline boundsCheck: BoundsCheck): Double
inline def product: Double
inline def productExceptSelf: Array[Double]

Given an array nums of n integers where n > 1, returns an array output such that output[i] is equal to the product of all the elements of nums except nums[i].

Given an array nums of n integers where n > 1, returns an array output such that output[i] is equal to the product of all the elements of nums except nums[i].

This method does not use division and runs in O(n) time complexity.

Value parameters

nums

An array of integers.

Attributes

Returns

An array where each element is the product of all the elements of nums except the element at the same index.

inline def sin: Array[Double]
inline def sin!: Unit
inline def sinh: Array[Double]
inline def sinh!: Unit
inline def spearmansRankCorrelation(thatVector: Array[Double])(using inline boundsCheck: BoundsCheck): Double
inline def sqrt: Array[Double]
inline def sqrt!: Unit
inline def stdDev: Double
inline def sum: Double
inline def unary_-: Array[Double]
def variance: Double
extension (vec: Array[Array[Double]])
inline def horizontalSum: Array[Double]