[−][src]Struct bacon_sci::polynomial::Polynomial
Polynomial on a ComplexField.
Implementations
impl<N: ComplexField> Polynomial<N>
[src]
pub fn new() -> Self
[src]
Returns the zero polynomial on a given field
pub fn with_tolerance(
tolerance: <N as ComplexField>::RealField
) -> Result<Self, String>
[src]
tolerance: <N as ComplexField>::RealField
) -> Result<Self, String>
pub fn with_capacity(capacity: usize) -> Self
[src]
Returns the zero polynomial on a given field with preallocated memory
pub fn from_slice(data: &[N]) -> Self
[src]
Create a polynomial from a slice, with the first element of the slice being the highest power
pub fn set_tolerance(
&mut self,
tolerance: <N as ComplexField>::RealField
) -> Result<(), String>
[src]
&mut self,
tolerance: <N as ComplexField>::RealField
) -> Result<(), String>
pub fn get_tolerance(&self) -> <N as ComplexField>::RealField
[src]
pub fn order(&self) -> usize
[src]
Get the order of the polynomial
pub fn get_coefficient(&self, ind: usize) -> N
[src]
Get the coefficient of a power
pub fn make_complex(
&self
) -> Polynomial<Complex<<N as ComplexField>::RealField>>
[src]
&self
) -> Polynomial<Complex<<N as ComplexField>::RealField>>
Make a polynomial complex
pub fn evaluate(&self, x: N) -> N
[src]
Evaluate a polynomial at a value
pub fn evaluate_derivative(&self, x: N) -> (N, N)
[src]
Evaluate a polynomial and its derivative at a value
pub fn set_coefficient(&mut self, power: u32, coefficient: N)
[src]
Set a coefficient of a power in the polynomial
pub fn purge_coefficient(&mut self, power: usize)
[src]
Remove the coefficient of a power in the polynomial
pub fn purge_leading(&mut self)
[src]
Remove all leading 0 coefficients
pub fn derivative(&self) -> Self
[src]
Get the derivative of the polynomial
pub fn antiderivative(&self, constant: N) -> Self
[src]
Get the antiderivative of the polynomial with specified constant
pub fn integrate(&self, lower: N, upper: N) -> N
[src]
Integrate this polynomial between to starting points
pub fn divide(&self, divisor: &Polynomial<N>) -> Result<(Self, Self), String>
[src]
Divide this polynomial by another, getting a quotient and remainder, using tol to check for 0
pub fn roots(
&self,
tol: <N as ComplexField>::RealField,
n_max: usize
) -> Result<VecDeque<Complex<<N as ComplexField>::RealField>>, String>
[src]
&self,
tol: <N as ComplexField>::RealField,
n_max: usize
) -> Result<VecDeque<Complex<<N as ComplexField>::RealField>>, String>
Get the n (possibly including repeats) of the polynomial given n using Laguerre's method
pub fn dft(&self, size: usize) -> Vec<Complex<<N as ComplexField>::RealField>>
[src]
Get the polynomial in point form evaluated at roots of unity at k points where k is the smallest power of 2 greater than or equal to size
pub fn idft(
vec: &[Complex<<N as ComplexField>::RealField>],
tol: <N as ComplexField>::RealField
) -> Self
[src]
vec: &[Complex<<N as ComplexField>::RealField>],
tol: <N as ComplexField>::RealField
) -> Self
Trait Implementations
impl<N: ComplexField> AbstractMagma<Additive> for Polynomial<N>
[src]
impl<N: ComplexField> Add<&'_ Polynomial<N>> for Polynomial<N>
[src]
type Output = Polynomial<N>
The resulting type after applying the +
operator.
pub fn add(self, rhs: &Polynomial<N>) -> Polynomial<N>
[src]
impl<N: ComplexField> Add<&'_ Polynomial<N>> for &Polynomial<N>
[src]
type Output = Polynomial<N>
The resulting type after applying the +
operator.
pub fn add(self, rhs: &Polynomial<N>) -> Polynomial<N>
[src]
impl<N: ComplexField> Add<N> for Polynomial<N>
[src]
type Output = Polynomial<N>
The resulting type after applying the +
operator.
pub fn add(self, rhs: N) -> Polynomial<N>
[src]
impl<N: ComplexField> Add<N> for &Polynomial<N>
[src]
type Output = Polynomial<N>
The resulting type after applying the +
operator.
pub fn add(self, rhs: N) -> Polynomial<N>
[src]
impl<N: ComplexField> Add<Polynomial<N>> for Polynomial<N>
[src]
type Output = Polynomial<N>
The resulting type after applying the +
operator.
pub fn add(self, rhs: Polynomial<N>) -> Polynomial<N>
[src]
impl<N: ComplexField> Add<Polynomial<N>> for &Polynomial<N>
[src]
type Output = Polynomial<N>
The resulting type after applying the +
operator.
pub fn add(self, rhs: Polynomial<N>) -> Polynomial<N>
[src]
impl<N: ComplexField> AddAssign<&'_ Polynomial<N>> for Polynomial<N>
[src]
pub fn add_assign(&mut self, rhs: &Polynomial<N>)
[src]
impl<N: ComplexField> AddAssign<N> for Polynomial<N>
[src]
pub fn add_assign(&mut self, rhs: N)
[src]
impl<N: ComplexField> AddAssign<Polynomial<N>> for Polynomial<N>
[src]
pub fn add_assign(&mut self, rhs: Polynomial<N>)
[src]
impl<N: Clone + ComplexField> Clone for Polynomial<N>
[src]
pub fn clone(&self) -> Polynomial<N>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<N: Debug + ComplexField> Debug for Polynomial<N>
[src]
impl<N: ComplexField> Default for Polynomial<N>
[src]
impl<N: ComplexField> Div<N> for Polynomial<N>
[src]
type Output = Polynomial<N>
The resulting type after applying the /
operator.
pub fn div(self, rhs: N) -> Polynomial<N>
[src]
impl<N: ComplexField> Div<N> for &Polynomial<N>
[src]
type Output = Polynomial<N>
The resulting type after applying the /
operator.
pub fn div(self, rhs: N) -> Polynomial<N>
[src]
impl<N: ComplexField> DivAssign<N> for Polynomial<N>
[src]
pub fn div_assign(&mut self, rhs: N)
[src]
impl<N: ComplexField> From<N> for Polynomial<N>
[src]
pub fn from(n: N) -> Polynomial<N>
[src]
impl<N: RealField> From<Polynomial<N>> for Polynomial<Complex<N>>
[src]
pub fn from(poly: Polynomial<N>) -> Polynomial<Complex<N>>
[src]
impl<N: ComplexField> FromIterator<N> for Polynomial<N>
[src]
pub fn from_iter<I: IntoIterator<Item = N>>(iter: I) -> Polynomial<N>
[src]
impl<N: ComplexField> Mul<&'_ Polynomial<N>> for Polynomial<N>
[src]
type Output = Polynomial<N>
The resulting type after applying the *
operator.
pub fn mul(self, rhs: &Polynomial<N>) -> Polynomial<N>
[src]
impl<N: ComplexField> Mul<&'_ Polynomial<N>> for &Polynomial<N>
[src]
type Output = Polynomial<N>
The resulting type after applying the *
operator.
pub fn mul(self, rhs: &Polynomial<N>) -> Polynomial<N>
[src]
impl<N: ComplexField> Mul<N> for Polynomial<N>
[src]
type Output = Polynomial<N>
The resulting type after applying the *
operator.
pub fn mul(self, rhs: N) -> Polynomial<N>
[src]
impl<N: ComplexField> Mul<N> for &Polynomial<N>
[src]
type Output = Polynomial<N>
The resulting type after applying the *
operator.
pub fn mul(self, rhs: N) -> Polynomial<N>
[src]
impl<N: ComplexField> Mul<Polynomial<N>> for Polynomial<N>
[src]
type Output = Polynomial<N>
The resulting type after applying the *
operator.
pub fn mul(self, rhs: Polynomial<N>) -> Polynomial<N>
[src]
impl<N: ComplexField> Mul<Polynomial<N>> for &Polynomial<N>
[src]
type Output = Polynomial<N>
The resulting type after applying the *
operator.
pub fn mul(self, rhs: Polynomial<N>) -> Polynomial<N>
[src]
impl<N: ComplexField> MulAssign<&'_ Polynomial<N>> for Polynomial<N>
[src]
pub fn mul_assign(&mut self, rhs: &Polynomial<N>)
[src]
impl<N: ComplexField> MulAssign<N> for Polynomial<N>
[src]
pub fn mul_assign(&mut self, rhs: N)
[src]
impl<N: ComplexField> MulAssign<Polynomial<N>> for Polynomial<N>
[src]
pub fn mul_assign(&mut self, rhs: Polynomial<N>)
[src]
impl<N: ComplexField> Neg for Polynomial<N>
[src]
type Output = Polynomial<N>
The resulting type after applying the -
operator.
pub fn neg(self) -> Polynomial<N>
[src]
impl<N: ComplexField> Neg for &Polynomial<N>
[src]
type Output = Polynomial<N>
The resulting type after applying the -
operator.
pub fn neg(self) -> Polynomial<N>
[src]
impl<N: ComplexField> Sub<&'_ Polynomial<N>> for Polynomial<N>
[src]
type Output = Polynomial<N>
The resulting type after applying the -
operator.
pub fn sub(self, rhs: &Polynomial<N>) -> Polynomial<N>
[src]
impl<N: ComplexField> Sub<&'_ Polynomial<N>> for &Polynomial<N>
[src]
type Output = Polynomial<N>
The resulting type after applying the -
operator.
pub fn sub(self, rhs: &Polynomial<N>) -> Polynomial<N>
[src]
impl<N: ComplexField> Sub<N> for Polynomial<N>
[src]
type Output = Polynomial<N>
The resulting type after applying the -
operator.
pub fn sub(self, rhs: N) -> Polynomial<N>
[src]
impl<N: ComplexField> Sub<N> for &Polynomial<N>
[src]
type Output = Polynomial<N>
The resulting type after applying the -
operator.
pub fn sub(self, rhs: N) -> Polynomial<N>
[src]
impl<N: ComplexField> Sub<Polynomial<N>> for Polynomial<N>
[src]
type Output = Polynomial<N>
The resulting type after applying the -
operator.
pub fn sub(self, rhs: Polynomial<N>) -> Polynomial<N>
[src]
impl<N: ComplexField> Sub<Polynomial<N>> for &Polynomial<N>
[src]
type Output = Polynomial<N>
The resulting type after applying the -
operator.
pub fn sub(self, rhs: Polynomial<N>) -> Polynomial<N>
[src]
impl<N: ComplexField> SubAssign<&'_ Polynomial<N>> for Polynomial<N>
[src]
pub fn sub_assign(&mut self, rhs: &Polynomial<N>)
[src]
impl<N: ComplexField> SubAssign<N> for Polynomial<N>
[src]
pub fn sub_assign(&mut self, rhs: N)
[src]
impl<N: ComplexField> SubAssign<Polynomial<N>> for Polynomial<N>
[src]
pub fn sub_assign(&mut self, rhs: Polynomial<N>)
[src]
impl<N: ComplexField> Zero for Polynomial<N>
[src]
Auto Trait Implementations
impl<N> RefUnwindSafe for Polynomial<N> where
N: RefUnwindSafe,
<N as ComplexField>::RealField: RefUnwindSafe,
[src]
N: RefUnwindSafe,
<N as ComplexField>::RealField: RefUnwindSafe,
impl<N> Send for Polynomial<N> where
<N as ComplexField>::RealField: Send,
[src]
<N as ComplexField>::RealField: Send,
impl<N> Sync for Polynomial<N> where
<N as ComplexField>::RealField: Sync,
[src]
<N as ComplexField>::RealField: Sync,
impl<N> Unpin for Polynomial<N> where
N: Unpin,
<N as ComplexField>::RealField: Unpin,
[src]
N: Unpin,
<N as ComplexField>::RealField: Unpin,
impl<N> UnwindSafe for Polynomial<N> where
N: UnwindSafe,
<N as ComplexField>::RealField: UnwindSafe,
[src]
N: UnwindSafe,
<N as ComplexField>::RealField: UnwindSafe,
Blanket Implementations
impl<T> AdditiveMagma for T where
T: AbstractMagma<Additive>,
[src]
T: AbstractMagma<Additive>,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, Right> ClosedAdd<Right> for T where
T: Add<Right, Output = T> + AddAssign<Right>,
[src]
T: Add<Right, Output = T> + AddAssign<Right>,
impl<T, Right> ClosedAdd<Right> for T where
T: Add<Right, Output = T> + AddAssign<Right>,
T: Add<Right, Output = T> + AddAssign<Right>,
impl<T, Right> ClosedDiv<Right> for T where
T: Div<Right, Output = T> + DivAssign<Right>,
[src]
T: Div<Right, Output = T> + DivAssign<Right>,
impl<T, Right> ClosedDiv<Right> for T where
T: Div<Right, Output = T> + DivAssign<Right>,
T: Div<Right, Output = T> + DivAssign<Right>,
impl<T, Right> ClosedMul<Right> for T where
T: Mul<Right, Output = T> + MulAssign<Right>,
[src]
T: Mul<Right, Output = T> + MulAssign<Right>,
impl<T, Right> ClosedMul<Right> for T where
T: Mul<Right, Output = T> + MulAssign<Right>,
T: Mul<Right, Output = T> + MulAssign<Right>,
impl<T> ClosedNeg for T where
T: Neg<Output = T>,
[src]
T: Neg<Output = T>,
impl<T> ClosedNeg for T where
T: Neg<Output = T>,
T: Neg<Output = T>,
impl<T, Right> ClosedSub<Right> for T where
T: Sub<Right, Output = T> + SubAssign<Right>,
[src]
T: Sub<Right, Output = T> + SubAssign<Right>,
impl<T, Right> ClosedSub<Right> for T where
T: Sub<Right, Output = T> + SubAssign<Right>,
T: Sub<Right, Output = T> + SubAssign<Right>,
impl<T> From<!> for T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
[src]
pub fn is_in_subset(&self) -> bool
[src]
pub unsafe fn to_subset_unchecked(&self) -> SS
[src]
pub fn from_subset(element: &SS) -> SP
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
pub fn is_in_subset(&self) -> bool
pub fn to_subset_unchecked(&self) -> SS
pub fn from_subset(element: &SS) -> SP
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,