kumulant

Ref

@Serializable
@SerialName(value = "Ref")
data class Ref(val name: String) : ScalarExpr(source)

Named scalar reference. Bind it explicitly before evaluating or materializing a statistical recipe.

Constructors

Ref

constructor(name: String)(source)

Properties

name

Name looked up in the enclosing binding scope.

Functions

eval

open override fun eval(x: Double, y: Double = 0.0, v: DoubleArray = EMPTY_VECTOR, primary: Result? = null): Double(source)

Evaluate this expression against the per-update inputs. See the class KDoc for the input-environment convention.

Link copied to clipboard

Absolute value of this expression.

Link copied to clipboard

Bind every reference eagerly, preserving the tree's grouping and retaining the scope on the wire.

Link copied to clipboard
operator fun ScalarExpr.div(rhs: ScalarExpr): ScalarExpr

Build Div of two expressions.

operator fun ScalarExpr.div(rhs: Double): ScalarExpr

Divide this expression by a literal rhs.

Link copied to clipboard
infix fun ScalarExpr.eq(rhs: ScalarExpr): BoolExpr

Exact equality (no tolerance).

infix fun ScalarExpr.eq(rhs: Double): BoolExpr

Exact equality against a literal (no tolerance).

Link copied to clipboard
fun ScalarExpr.eval(x: Double = 0.0, y: Double = 0.0, v: Vector, primary: Result? = null): Double

Evaluate this scalar expression against a borrowed KoBLAS vector without materialising it.

Link copied to clipboard

e raised to this expression. Overflows to +Infinity well before Double runs out of range.

Link copied to clipboard
infix fun ScalarExpr.ge(rhs: ScalarExpr): BoolExpr

Greater-or-equal comparison.

infix fun ScalarExpr.ge(rhs: Double): BoolExpr

Greater-or-equal against a literal.

Link copied to clipboard
infix fun ScalarExpr.gt(rhs: ScalarExpr): BoolExpr

Strictly-greater-than comparison.

infix fun ScalarExpr.gt(rhs: Double): BoolExpr

Strictly-greater-than against a literal.

Link copied to clipboard

True when this expression falls within [min, max], both ends inclusive.

Link copied to clipboard

True when this expression evaluates to a finite number: not NaN, and not an infinity.

Link copied to clipboard

True when this expression evaluates to NaN.

Link copied to clipboard
infix fun ScalarExpr.le(rhs: ScalarExpr): BoolExpr

Less-or-equal comparison.

infix fun ScalarExpr.le(rhs: Double): BoolExpr

Less-or-equal against a literal.

Link copied to clipboard

Natural logarithm of this expression. ln(0) is -Infinity and a negative input gives NaN.

Link copied to clipboard
infix fun ScalarExpr.lt(rhs: ScalarExpr): BoolExpr

Strictly-less-than comparison.

infix fun ScalarExpr.lt(rhs: Double): BoolExpr

Strictly-less-than against a literal.

Link copied to clipboard

The larger of this expression and other.

The larger of this expression and a constant other.

Link copied to clipboard

The smaller of this expression and other.

The smaller of this expression and a constant other.

Link copied to clipboard

Build Sub of two expressions.

operator fun ScalarExpr.minus(rhs: Double): ScalarExpr

Subtract a literal rhs from this expression.

Link copied to clipboard
infix fun ScalarExpr.ne(rhs: ScalarExpr): BoolExpr

Exact inequality, the negation of eq under IEEE 754: true when either side is NaN, and false for 0.0 against -0.0. It builds !(this eq rhs), which encodes with the portable not and eq.

infix fun ScalarExpr.ne(rhs: Double): BoolExpr

Exact inequality against a literal; see ne.

Link copied to clipboard
operator fun ScalarExpr.plus(rhs: ScalarExpr): ScalarExpr

Build Add of two expressions.

operator fun ScalarExpr.plus(rhs: Double): ScalarExpr

Add a literal rhs to this expression.

Link copied to clipboard

This expression raised to exponent.

This expression raised to a constant exponent.

fun ScalarExpr.pow(exponent: Int): ScalarExpr

This expression raised to an integer exponent, which binary64 represents exactly.

Link copied to clipboard

Square root of this expression. A negative input gives NaN.

Link copied to clipboard

Build Mul of two expressions.

operator fun ScalarExpr.times(rhs: Double): ScalarExpr

Multiply this expression by a literal rhs.

Link copied to clipboard

Unary minus: wraps in Neg.