DerivationResult

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

Represents result of simpleAutoDiff call.

Parameters

T

the non-nullable type of value.

value

the value of result.

Constructors

Link copied to clipboard
fun <T : Any> DerivationResult(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.

Properties

Link copied to clipboard
val context: Field<T>

The field over T.

Link copied to clipboard
val value: T

Extensions

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

Computes the gradient for variables in given order.

Sources

Link copied to clipboard