pub struct Linear { /* private fields */ }Expand description
Linear function structure
Implementations§
Source§impl Linear
impl Linear
Sourcepub fn new(k: f64, b: f64, limit_a: f64, limit_b: f64) -> Linear
pub fn new(k: f64, b: f64, limit_a: f64, limit_b: f64) -> Linear
To create an object of function you need to use “new” method. After passing all the coefficients of the function, you need to pass the limits on which this function will exist
Sourcepub fn set_limits(&mut self, limit_a: f64, limit_b: f64)
pub fn set_limits(&mut self, limit_a: f64, limit_b: f64)
Function “set_limits” is used to change the limits on which your function will exist
Trait Implementations§
Source§impl Function for Linear
impl Function for Linear
fn newton(&self, limits: &Limits) -> Result<f64, &'static str>
fn solve(&self) -> Option<Vec<f64>>
fn derivative_solve(&self) -> Option<Vec<f64>>
fn f(&self, x: &f64) -> f64
fn derivative_f(&self, _x: &f64) -> f64
fn limits(&self) -> Limits
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
Auto Trait Implementations§
impl Freeze for Linear
impl RefUnwindSafe for Linear
impl Send for Linear
impl Sync for Linear
impl Unpin for Linear
impl UnwindSafe for Linear
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more