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