Struct nekolib::math::Interpolation
source · pub struct Interpolation { /* private fields */ }
Expand description
Lagrange 補間。
与えられた に対して () なる 次多項式 を考える。 この に対して を返す。
Idea
todo!()
Complexity
前処理に 時間、 を求めるのに 時間。
Examples
use nekolib::math::Interpolation;
let f = Interpolation::with(vec![0, 1, 3], 998244353);
assert_eq!(f.interpolate(0), 0);
assert_eq!(f.interpolate(3), 6);
assert_eq!(f.interpolate(4), 10);
assert_eq!(f.interpolate(100000000), 722404071);
See also
Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Interpolation
impl Send for Interpolation
impl Sync for Interpolation
impl Unpin for Interpolation
impl UnwindSafe for Interpolation
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