Function

Trait Function 

Source
pub trait Function {
Show 13 methods // Required methods fn f(&self, x: &f64) -> f64; fn derivative_f(&self, x: &f64) -> f64; fn solve(&self) -> Option<Vec<f64>>; fn derivative_solve(&self) -> Option<Vec<f64>>; fn newton(&self, limits: &Limits) -> Result<f64, &'static str>; fn limits(&self) -> Limits; // Provided methods fn trapezoid(&self, limits: &Limits) -> f64 { ... } fn simpson(&self, limits: &Limits) -> f64 { ... } fn derivative_points(&self, limits: &Limits) -> Vec<f64> { ... } fn function_points(&self, limits: &Limits) -> Vec<f64> { ... } fn evenness(&self) -> &str { ... } fn calculate_point(&self, x: &f64) -> f64 { ... } fn calculate_derivative_point(&self, x: &f64) -> f64 { ... }
}
Expand description

Funtion’s Trait. You can use it for creating your own function structure

Required Methods§

Source

fn f(&self, x: &f64) -> f64

Source

fn derivative_f(&self, x: &f64) -> f64

Source

fn solve(&self) -> Option<Vec<f64>>

Source

fn derivative_solve(&self) -> Option<Vec<f64>>

Source

fn newton(&self, limits: &Limits) -> Result<f64, &'static str>

Source

fn limits(&self) -> Limits

Provided Methods§

Source

fn trapezoid(&self, limits: &Limits) -> f64

Source

fn simpson(&self, limits: &Limits) -> f64

Source

fn derivative_points(&self, limits: &Limits) -> Vec<f64>

Source

fn function_points(&self, limits: &Limits) -> Vec<f64>

Source

fn evenness(&self) -> &str

Source

fn calculate_point(&self, x: &f64) -> f64

Source

fn calculate_derivative_point(&self, x: &f64) -> f64

Implementors§