DerivationResult

class DerivationResult<T : Any>(val value: T, derivativeValues: Map<String, T>, val context: Field<T>)(source)

Represents result of simpleAutoDiff call.

Parameters

T

the non-nullable type of value.

value

the value of result.

Constructors

Link copied to clipboard
constructor(value: T, derivativeValues: Map<String, T>, context: Field<T>)

Functions

Link copied to clipboard
fun derivative(variable: Symbol): T

Returns derivative of variable or returns Ring.zero in context.

Link copied to clipboard
fun div(): T

Computes the divergence.

Link copied to clipboard
fun <T : Any> DerivationResult<T>.grad(vararg variables: Symbol): Point<T>

Computes the gradient for variables in given order.

Properties

Link copied to clipboard

The field over T.

Link copied to clipboard
val value: T