pub trait Function: Send + Sync {
// Required methods
fn n(&self) -> usize;
fn m(&self) -> usize;
fn eval(&self, x: DVector<ADouble>) -> DVector<ADouble>;
// Provided methods
fn eval_float(&self, x: DVector<f64>) -> DVector<f64> { ... }
fn chain(&self) -> Option<&FunctionChain> { ... }
fn tape(&self, x: &DVector<f64>) -> Box<dyn Tape> { ... }
}
Expand description
Abstraction of a function that can be examined by AD
Required Methods§
Provided Methods§
Sourcefn eval_float(&self, x: DVector<f64>) -> DVector<f64>
fn eval_float(&self, x: DVector<f64>) -> DVector<f64>
Evaluate the function with floating point values
Sourcefn chain(&self) -> Option<&FunctionChain>
fn chain(&self) -> Option<&FunctionChain>
Inner chain structure if it exists