JsNativeDoubleArrays

vecxt.JsNativeDoubleArrays

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Extensions

Extensions

extension (d: Double)
inline def *(arr: DoubleArray): Float64Array
inline def +(arr: DoubleArray): Float64Array
inline def -(arr: DoubleArray): Float64Array
inline def /(arr: DoubleArray): Float64Array
extension (m: Matrix[Double])
inline def *:*(bmat: Matrix[Boolean])(using inline boundsCheck: BoundsCheck): Matrix[Double]
inline def +=(n: Double): Unit
inline def <(d: Double): Matrix[Boolean]
inline def <=(d: Double): Matrix[Boolean]
inline def >(d: Double): Matrix[Boolean]
inline def >=(d: Double): Matrix[Boolean]
extension (vec: DoubleArray)
inline def *(d: DoubleArray)(using inline boundsCheck: BoundsCheck): DoubleArray
inline def -: DoubleArray
inline def -!: Unit
inline def /(d: DoubleArray)(using inline boundsCheck: BoundsCheck): DoubleArray
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 argmax: Int
inline def argmin: Int
inline def asin: DoubleArray
inline def asin!: Unit
inline def cbrt: DoubleArray
inline def cbrt!: Unit
inline def clamp(min: Double, max: Double): DoubleArray
inline def clamp!(min: Double, max: Double): Unit
inline def clampMax(max: Double): DoubleArray
inline def clampMax!(max: Double): Unit
inline def clampMin(min: Double): DoubleArray
inline def clampMin!(min: Double): Unit
inline def cos: DoubleArray
inline def cos!: Unit
inline def exp: DoubleArray
inline def exp!: Unit
inline def fma(multiply: Double, add: Double): DoubleArray
inline def fma!(multiply: Double, add: Double): Unit
inline def log: DoubleArray
inline def log!: 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: (Double, Double) => Boolean, inline num: Double): Array[Boolean]
inline def maxClamp(max: Double): DoubleArray
inline def minClamp(min: Double): DoubleArray
inline def outer(other: DoubleArray)(using ClassTag[Double]): Matrix[Double]
inline def productExceptSelf: DoubleArray
inline def productSIMD: Double
inline def sin: DoubleArray
inline def sin!: Unit
inline def sqrt: DoubleArray
inline def sqrt!: Unit
inline def sumSIMD: Double
inline def tan: DoubleArray
inline def tan!: Unit
extension (vec: IntArray)
inline def +(other: IntArray)(using inline boundsCheck: BoundsCheck): IntArray
inline def -(other: IntArray)(using inline boundsCheck: BoundsCheck): IntArray
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(other: IntArray)(using inline boundsCheck: BoundsCheck): Int
inline def increments: IntArray
inline def logicalIdx(inline op: (Int, Int) => Boolean, inline num: Int): Array[Boolean]