Module descent::expr::dynam

source ·
Expand description

Dynamically constructed expressions.

These expressions offer the greatest flexibility in how they can be constructed at runtime. Forward and reverse automatic differentiation techniques have been implemented for calculating expression first and second derivatives. They are however much slower than the more direct fixed expression types (in fixed module) which allow for greater compiler optimisation of the derivative calculations.

Examples

See Expr for more details.

use descent::expr::{Var, Par};
use descent::expr::dynam::NumOps; // required to bring in powi usage
let x = Var(0);
let y = Var(1);
let p = Par(0);

let e = p * x - (5.0 * y.powi(2) + 4.0);

Structs

An expression that can be dynamically constructed.
Snapshot of a dynamically constructed expression Expr.
Sparsity and other information about an Expr for guiding AD process.
Workspace used for performing expression AD.

Traits

Trait for using numeric operators such as .powi(i32), .cos(), .sin() in dynamic expressions.

Type Definitions

Represents the sum of multiple dynamic expressions.