[−][src]Struct series::series::Series
Laurent series in a single variable up to some power
Implementations
impl<Var, C: Coeff> Series<Var, C>
[src]
pub fn new(var: Var, min_pow: isize, coeffs: Vec<C>) -> Series<Var, C>
[src]
Create a new series
Example
This creates a series in the variable "x", starting at "x"^-1 with coefficients 1, 2, 3. In other words, the series x^-1 + 2 + 3*x + O(x^2).
let s = series::Series::new("x", -1, vec!(1,2,3));
pub fn with_cutoff(
var: Var,
min_pow: isize,
cutoff_pow: isize,
coeffs: Vec<C>
) -> Series<Var, C>
[src]
var: Var,
min_pow: isize,
cutoff_pow: isize,
coeffs: Vec<C>
) -> Series<Var, C>
Create a new series with a given cutoff power
Example
This creates a series in the variable "x", starting at "x"^-1 with coefficients 1, 2, 3. and vanishing coefficients up to "x"^5 .In other words, the series x^-1 + 2 + 3*x + O(x^5).
let s = series::Series::with_cutoff("x", -1, 5, vec!(1,2,3));
Panics
Panics if the cutoff power is lower than the starting power
pub fn var(&self) -> &Var
[src]
Get the expansion variable
Example
let s = series::Series::new("x", -1, vec!(1,2,3)); assert_eq!(s.var(), &"x");
pub fn coeff(&self, pow: isize) -> Option<&C>
[src]
Get the series coefficient of the expansion variable to the given power.
Returns None if the requested power is above the highest known power. Coefficients below the leading power are zero.
Example
let s = series::Series::new("x", -1, vec!(1,2,3)); assert_eq!(s.coeff(-5), Some(&0)); assert_eq!(s.coeff(-2), Some(&0)); assert_eq!(s.coeff(-1), Some(&1)); assert_eq!(s.coeff(0), Some(&2)); assert_eq!(s.coeff(1), Some(&3)); assert_eq!(s.coeff(2), None); assert_eq!(s.coeff(5), None);
pub fn min_pow(&self) -> isize
[src]
Get the leading power of the series expansion variable
Example
let s = series::Series::new("x", -1, vec!(1,2,3)); assert_eq!(s.min_pow(), -1);
pub fn cutoff_pow(&self) -> isize
[src]
Get the power of the expansion variable where the series is truncated.
Example
let s = series::Series::new("x", -1, vec!(1,2,3)); assert_eq!(s.cutoff_pow(), 2);
pub fn iter(&self) -> Iter<C>
[src]
Iterator over the series powers and coefficients.
Example
let s = series::Series::new("x", -1, vec!(1,2,3)); let mut iter = s.iter(); assert_eq!(iter.next(), Some((-1, &1))); assert_eq!(iter.next(), Some((0, &2))); assert_eq!(iter.next(), Some((1, &3))); assert_eq!(iter.next(), None);
impl<Var, C: Coeff> Series<Var, C>
[src]
pub fn powi(self, exp: i32) -> Self where
C: DivAssign<&'a C>,
&'a C: Mul<Output = C>,
C: Clone + SubAssign + Ln<Output = C> + Div<Output = C> + Mul<Output = C>,
Series<Var, C>: Mul<C, Output = Self> + Exp<Output = Self> + MulInverse<Output = Self>,
[src]
C: DivAssign<&'a C>,
&'a C: Mul<Output = C>,
C: Clone + SubAssign + Ln<Output = C> + Div<Output = C> + Mul<Output = C>,
Series<Var, C>: Mul<C, Output = Self> + Exp<Output = Self> + MulInverse<Output = Self>,
Calculate series to some integer power
In contrast to the more general pow
method this does not require
the variable type to be convertible to the coefficient type and gives
an overall nicer output
Example
let s = series::Series::new("x", -1, vec![1.,3.,7.]); let s_to_minus_5 = series::Series::new("x", 5, vec![1.,-15.,100.]); assert_eq!(s.powi(-5), s_to_minus_5);
Trait Implementations
impl<'a, Var: Clone, C: Coeff + Clone, Rhs> Add<Rhs> for &'a Series<Var, C> where
Series<Var, C>: AddAssign<Rhs>,
[src]
Series<Var, C>: AddAssign<Rhs>,
type Output = Series<Var, C>
The resulting type after applying the +
operator.
fn add(self, other: Rhs) -> Self::Output
[src]
impl<Var: Clone, C: Coeff + Clone, Rhs> Add<Rhs> for Series<Var, C> where
Series<Var, C>: AddAssign<Rhs>,
[src]
Series<Var, C>: AddAssign<Rhs>,
type Output = Series<Var, C>
The resulting type after applying the +
operator.
fn add(self, other: Rhs) -> Self::Output
[src]
impl<'a, Var: PartialEq + Debug, C: Coeff + Clone> AddAssign<&'a Series<Var, C>> for Series<Var, C> where
C: AddAssign<&'c C>,
[src]
C: AddAssign<&'c C>,
fn add_assign(&mut self, other: &'a Series<Var, C>)
[src]
Set s = s + t for two series s and t
Example
use series::Series; let mut s = Series::new("x", -3, vec!(1.,0.,-3.)); let t = Series::new("x", -1, vec!(3., 4., 5.)); let res = Series::new("x", -3, vec!(1.,0.,0.)); s += &t; assert_eq!(res, s);
Panics
Panics if the series have different expansion variables.
impl<Var, C: Coeff + Clone> AddAssign<C> for Series<Var, C> where
C: AddAssign<C>,
[src]
C: AddAssign<C>,
fn add_assign(&mut self, rhs: C)
[src]
impl<Var, C: Coeff> AddAssign<Series<Var, C>> for Series<Var, C> where
C: AddAssign<&'c C>,
Var: PartialEq + Debug,
[src]
C: AddAssign<&'c C>,
Var: PartialEq + Debug,
fn add_assign(&mut self, other: Series<Var, C>)
[src]
Set s = s + t for two series s and t
Example
use series::Series; let mut s = Series::new("x", -3, vec!(1.,0.,-3.)); let t = Series::new("x", -1, vec!(3., 4., 5.)); let res = Series::new("x", -3, vec!(1.,0.,0.)); s += t; assert_eq!(res, s);
Panics
Panics if the series have different expansion variables.
impl<'a, Var: PartialEq + Debug, C: Coeff + Clone> AddAssign<SeriesSlice<'a, Var, C>> for Series<Var, C> where
C: AddAssign<&'c C>,
[src]
C: AddAssign<&'c C>,
fn add_assign(&mut self, other: SeriesSlice<'a, Var, C>)
[src]
impl<'a, Var: 'a, C: 'a + Coeff> AsSlice<'a, Range<isize>> for Series<Var, C>
[src]
type Output = SeriesSlice<'a, Var, C>
fn as_slice(&'a self, r: Range<isize>) -> Self::Output
[src]
A slice of the series truncated to the given range of powers.
Panics
Panics if the lower bound is smaller than the leading power or the upper bound is at least as big as the cut-off power.
Example
use series::AsSlice; let s = series::Series::new("x", -1, vec!(1,2,3,4)); let t = s.as_slice(0..2); assert_eq!(t.min_pow(), 0); assert_eq!(t.cutoff_pow(), 2); assert_eq!(t[0], s[0]); assert_eq!(t[1], s[1]); assert!(std::panic::catch_unwind(|| t[2]).is_err());
impl<'a, Var: 'a, C: 'a + Coeff> AsSlice<'a, RangeFrom<isize>> for Series<Var, C>
[src]
type Output = SeriesSlice<'a, Var, C>
fn as_slice(&'a self, r: RangeFrom<isize>) -> Self::Output
[src]
A slice of the series truncated to the given range of powers.
Panics
Panics if the lower bound is smaller than the leading power.
Example
use series::AsSlice; let s = series::Series::new("x", -1, vec!(1,2,3,4)); let t = s.as_slice(0..); assert_eq!(t.min_pow(), 0); assert_eq!(t.cutoff_pow(), s.cutoff_pow()); assert!(std::panic::catch_unwind(|| t[-1]).is_err()); assert_eq!(t[0], s[0]); assert_eq!(t[1], s[1]); assert_eq!(t[2], s[2]);
impl<'a, Var: 'a, C: 'a + Coeff> AsSlice<'a, RangeFull> for Series<Var, C>
[src]
type Output = SeriesSlice<'a, Var, C>
fn as_slice(&'a self, r: RangeFull) -> Self::Output
[src]
A slice containing the complete series.
Example
use series::AsSlice; let s = series::Series::new("x", -1, vec!(1,2,3,4)); let t = s.as_slice(..); assert_eq!(t.min_pow(), s.min_pow()); assert_eq!(t.cutoff_pow(), s.cutoff_pow()); assert_eq!(t[-1], s[-1]); assert_eq!(t[0], s[0]); assert_eq!(t[1], s[1]); assert_eq!(t[2], s[2]);
impl<'a, Var: 'a, C: 'a + Coeff> AsSlice<'a, RangeInclusive<isize>> for Series<Var, C>
[src]
type Output = SeriesSlice<'a, Var, C>
fn as_slice(&'a self, r: RangeInclusive<isize>) -> Self::Output
[src]
A slice of the series truncated to the given range of powers.
Panics
Panics if the lower bound is smaller than the leading power or the upper bound is at least as big as the cut-off power.
Example
use series::AsSlice; let s = series::Series::new("x", -1, vec!(1,2,3,4)); let t = s.as_slice(0..=1); assert_eq!(t.min_pow(), 0); assert_eq!(t.cutoff_pow(), 2); assert_eq!(t[0], s[0]); assert_eq!(t[1], s[1]); assert!(std::panic::catch_unwind(|| t[2]).is_err());
impl<'a, Var: 'a, C: 'a + Coeff> AsSlice<'a, RangeTo<isize>> for Series<Var, C>
[src]
type Output = SeriesSlice<'a, Var, C>
fn as_slice(&'a self, r: RangeTo<isize>) -> Self::Output
[src]
A slice of the series truncated to the given range of powers.
Panics
Panics if the upper bound is at least as big as the cut-off power.
Example
use series::AsSlice; let s = series::Series::new("x", -1, vec!(1,2,3,4)); let t = s.as_slice(..2); assert_eq!(t.min_pow(), s.min_pow()); assert_eq!(t.cutoff_pow(), 2); assert_eq!(t[0], s[0]); assert_eq!(t[1], s[1]); assert!(std::panic::catch_unwind(|| t[2]).is_err());
impl<'a, Var: 'a, C: 'a + Coeff> AsSlice<'a, RangeToInclusive<isize>> for Series<Var, C>
[src]
type Output = SeriesSlice<'a, Var, C>
fn as_slice(&'a self, r: RangeToInclusive<isize>) -> Self::Output
[src]
A slice of the series truncated to the given range of powers.
Panics
Panics if the upper bound is at least as big as the cut-off power.
Example
use series::AsSlice; let s = series::Series::new("x", -1, vec!(1,2,3,4)); let t = s.as_slice(..=1); assert_eq!(t.min_pow(), s.min_pow()); assert_eq!(t.cutoff_pow(), 2); assert_eq!(t[0], s[0]); assert_eq!(t[1], s[1]); assert!(std::panic::catch_unwind(|| t[2]).is_err());
impl<Var: Clone, C: Clone + Coeff> Clone for Series<Var, C>
[src]
impl<Var: Debug, C: Debug + Coeff> Debug for Series<Var, C>
[src]
impl<Var: Display, C: Coeff + Display> Display for Series<Var, C>
[src]
impl<'a, Var, C: Coeff, T> Div<T> for &'a Series<Var, C> where
Series<Var, C>: Clone + DivAssign<T>,
[src]
Series<Var, C>: Clone + DivAssign<T>,
type Output = Series<Var, C>
The resulting type after applying the /
operator.
fn div(self, other: T) -> Self::Output
[src]
impl<Var, C: Coeff, T> Div<T> for Series<Var, C> where
Series<Var, C>: DivAssign<T>,
[src]
Series<Var, C>: DivAssign<T>,
type Output = Series<Var, C>
The resulting type after applying the /
operator.
fn div(self, other: T) -> Self::Output
[src]
impl<'a, Var, C: Coeff> DivAssign<&'a C> for Series<Var, C> where
C: DivAssign<&'a C>,
[src]
C: DivAssign<&'a C>,
fn div_assign(&mut self, rhs: &'a C)
[src]
impl<'a, Var: Clone, C: Coeff + SubAssign> DivAssign<&'a Series<Var, C>> for Series<Var, C> where
Series<Var, C>: MulAssign,
&'b C: Div<Output = C> + Mul<Output = C>,
&'c Series<Var, C>: MulInverse<Output = Series<Var, C>>,
[src]
Series<Var, C>: MulAssign,
&'b C: Div<Output = C> + Mul<Output = C>,
&'c Series<Var, C>: MulInverse<Output = Series<Var, C>>,
fn div_assign(&mut self, other: &'a Series<Var, C>)
[src]
impl<Var, C: Coeff> DivAssign<C> for Series<Var, C> where
Series<Var, C>: DivAssign<&'a C>,
[src]
Series<Var, C>: DivAssign<&'a C>,
fn div_assign(&mut self, rhs: C)
[src]
impl<'a, Var: Clone, C: Coeff + SubAssign> DivAssign<Series<Var, C>> for Series<Var, C> where
Series<Var, C>: MulAssign + MulInverse<Output = Series<Var, C>>,
&'b C: Div<Output = C> + Mul<Output = C>,
[src]
Series<Var, C>: MulAssign + MulInverse<Output = Series<Var, C>>,
&'b C: Div<Output = C> + Mul<Output = C>,
fn div_assign(&mut self, other: Series<Var, C>)
[src]
impl<'a, Var: Clone, C: Coeff + SubAssign> DivAssign<SeriesSlice<'a, Var, C>> for Series<Var, C> where
Series<Var, C>: MulAssign,
&'b C: Div<Output = C> + Mul<Output = C>,
&'c Series<Var, C>: MulInverse<Output = Series<Var, C>>,
[src]
Series<Var, C>: MulAssign,
&'b C: Div<Output = C> + Mul<Output = C>,
&'c Series<Var, C>: MulInverse<Output = Series<Var, C>>,
fn div_assign(&mut self, other: SeriesSlice<'a, Var, C>)
[src]
impl<Var: Eq, C: Eq + Coeff> Eq for Series<Var, C>
[src]
impl<Var, C: Coeff> Exp for Series<Var, C> where
&'a C: Mul<Output = C>,
C: MulAssign<&'a C>,
C: Clone + Div<Output = C> + Mul<Output = C> + AddAssign + Exp<Output = C>,
[src]
&'a C: Mul<Output = C>,
C: MulAssign<&'a C>,
C: Clone + Div<Output = C> + Mul<Output = C> + AddAssign + Exp<Output = C>,
type Output = Self
fn exp(self) -> Self::Output
[src]
Computes the exponential of a series
Panics
Panics if the series contains negative powers of the expansion variable
impl<'a, Var, C: Coeff> Exp for &'a Series<Var, C> where
&'b C: Mul<Output = C>,
C: MulAssign<&'b C>,
Var: Clone,
C: Clone + Div<Output = C> + Mul<Output = C> + AddAssign + Exp<Output = C>,
[src]
&'b C: Mul<Output = C>,
C: MulAssign<&'b C>,
Var: Clone,
C: Clone + Div<Output = C> + Mul<Output = C> + AddAssign + Exp<Output = C>,
type Output = Series<Var, C>
fn exp(self) -> Self::Output
[src]
Computes the exponential of a series
Panics
Panics if the series contains negative powers of the expansion variable
impl<Var, C: Coeff> From<Series<Var, C>> for SeriesParts<Var, C>
[src]
impl<Var, C: Coeff> From<Series<Var, C>> for Polynomial<Var, C>
[src]
impl<Var, C: Coeff> From<SeriesParts<Var, C>> for Series<Var, C>
[src]
fn from(parts: SeriesParts<Var, C>) -> Self
[src]
impl<'a, Var: Clone, C: Coeff + Clone> From<SeriesSlice<'a, Var, C>> for Series<Var, C>
[src]
fn from(s: SeriesSlice<'a, Var, C>) -> Self
[src]
impl<Var: Hash, C: Hash + Coeff> Hash for Series<Var, C>
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<Var, C: Coeff> Index<isize> for Series<Var, C>
[src]
type Output = C
The returned type after indexing.
fn index(&self, index: isize) -> &Self::Output
[src]
Get the series coefficient of the expansion variable to the given power.
Panics
Panics if the index is smaller than the leading power or at least as big as the cut-off power.
Example
use series::AsSlice; let s = series::Series::new("x", -1, vec!(1,2,3)); assert_eq!(s[-1], 1); assert_eq!(s[0], 2); assert_eq!(s[1], 3); assert!(std::panic::catch_unwind(|| s[-2]).is_err()); assert!(std::panic::catch_unwind(|| s[2]).is_err());
impl<Var, C: Coeff> IntoIterator for Series<Var, C>
[src]
type Item = (isize, C)
The type of the elements being iterated over.
type IntoIter = IntoIter<C>
Which kind of iterator are we turning this into?
fn into_iter(self) -> IntoIter<C>
[src]
Consuming iterator over the series coefficients.
Example
let s = series::Series::new("x", -1, vec!(1,2,3)); let mut iter = s.into_iter(); assert_eq!(iter.next(), Some((-1, 1))); assert_eq!(iter.next(), Some((0, 2))); assert_eq!(iter.next(), Some((1, 3))); assert_eq!(iter.next(), None);
impl<Var, C: Coeff> Ln for Series<Var, C> where
C: DivAssign<&'a C>,
&'a C: Mul<Output = C>,
C: Clone + SubAssign + Add<Output = C> + Mul<Output = C> + Div<Output = C> + Ln<Output = C> + From<Var>,
Var: Clone,
[src]
C: DivAssign<&'a C>,
&'a C: Mul<Output = C>,
C: Clone + SubAssign + Add<Output = C> + Mul<Output = C> + Div<Output = C> + Ln<Output = C> + From<Var>,
Var: Clone,
impl<'a, Var, C: Coeff> Ln for &'a Series<Var, C> where
C: Div<&'b C, Output = C>,
&'b C: Mul<Output = C> + Ln<Output = C>,
C: Clone + SubAssign + Add<Output = C> + Mul<Output = C> + Div<Output = C> + From<Var>,
Var: Clone,
[src]
C: Div<&'b C, Output = C>,
&'b C: Mul<Output = C> + Ln<Output = C>,
C: Clone + SubAssign + Add<Output = C> + Mul<Output = C> + Div<Output = C> + From<Var>,
Var: Clone,
impl<'a, Var, C: Coeff> Mul<&'a C> for Series<Var, C> where
C: MulAssign<&'c C>,
[src]
C: MulAssign<&'c C>,
type Output = Series<Var, C>
The resulting type after applying the *
operator.
fn mul(self, other: &'a C) -> Self::Output
[src]
impl<'a, Var, C: Coeff> Mul<&'a Series<Var, C>> for Series<Var, C> where
Series<Var, C>: MulAssign<SeriesSlice<'a, Var, C>>,
[src]
Series<Var, C>: MulAssign<SeriesSlice<'a, Var, C>>,
type Output = Series<Var, C>
The resulting type after applying the *
operator.
fn mul(self, other: &'a Series<Var, C>) -> Self::Output
[src]
impl<'a, 'b, Var, C: Coeff> Mul<&'b Series<Var, C>> for SeriesSlice<'a, Var, C> where
C: Clone,
Var: Clone,
Series<Var, C>: Mul<SeriesSlice<'c, Var, C>, Output = Series<Var, C>>,
[src]
C: Clone,
Var: Clone,
Series<Var, C>: Mul<SeriesSlice<'c, Var, C>, Output = Series<Var, C>>,
type Output = Series<Var, C>
The resulting type after applying the *
operator.
fn mul(self, other: &'b Series<Var, C>) -> Self::Output
[src]
impl<Var, C: Coeff> Mul<C> for Series<Var, C> where
C: MulAssign<&'c C>,
[src]
C: MulAssign<&'c C>,
type Output = Series<Var, C>
The resulting type after applying the *
operator.
fn mul(self, other: C) -> Self::Output
[src]
impl<Var, C: Coeff> Mul<Series<Var, C>> for Series<Var, C> where
Series<Var, C>: MulAssign,
[src]
Series<Var, C>: MulAssign,
type Output = Series<Var, C>
The resulting type after applying the *
operator.
fn mul(self, other: Series<Var, C>) -> Self::Output
[src]
impl<'a, Var, C: Coeff> Mul<Series<Var, C>> for SeriesSlice<'a, Var, C> where
Var: Clone,
C: Clone,
Series<Var, C>: MulAssign<Series<Var, C>>,
[src]
Var: Clone,
C: Clone,
Series<Var, C>: MulAssign<Series<Var, C>>,
type Output = Series<Var, C>
The resulting type after applying the *
operator.
fn mul(self, other: Series<Var, C>) -> Self::Output
[src]
impl<'a, Var, C: Coeff> Mul<SeriesSlice<'a, Var, C>> for Series<Var, C> where
Series<Var, C>: MulAssign<SeriesSlice<'a, Var, C>>,
[src]
Series<Var, C>: MulAssign<SeriesSlice<'a, Var, C>>,
type Output = Series<Var, C>
The resulting type after applying the *
operator.
fn mul(self, other: SeriesSlice<'a, Var, C>) -> Self::Output
[src]
impl<'a, Var, C: Coeff, T> Mul<T> for &'a Series<Var, C> where
SeriesSlice<'a, Var, C>: Mul<T, Output = Series<Var, C>>,
[src]
SeriesSlice<'a, Var, C>: Mul<T, Output = Series<Var, C>>,
type Output = Series<Var, C>
The resulting type after applying the *
operator.
fn mul(self, other: T) -> Self::Output
[src]
impl<'a, Var, C: Coeff> MulAssign<&'a C> for Series<Var, C> where
C: MulAssign<&'a C>,
[src]
C: MulAssign<&'a C>,
fn mul_assign(&mut self, rhs: &'a C)
[src]
impl<'a, Var: PartialEq + Debug, C: Coeff + Clone + AddAssign> MulAssign<&'a Series<Var, C>> for Series<Var, C> where
&'b C: Mul<Output = C>,
C: MulAssign<&'a C>,
[src]
&'b C: Mul<Output = C>,
C: MulAssign<&'a C>,
fn mul_assign(&mut self, other: &'a Series<Var, C>)
[src]
impl<Var, C: Coeff> MulAssign<C> for Series<Var, C> where
Series<Var, C>: MulAssign<&'a C>,
[src]
Series<Var, C>: MulAssign<&'a C>,
fn mul_assign(&mut self, rhs: C)
[src]
impl<Var, C: Coeff> MulAssign<Series<Var, C>> for Series<Var, C> where
Series<Var, C>: MulAssign<&'a Series<Var, C>>,
[src]
Series<Var, C>: MulAssign<&'a Series<Var, C>>,
fn mul_assign(&mut self, other: Series<Var, C>)
[src]
impl<'a, Var, C> MulAssign<SeriesSlice<'a, Var, C>> for Series<Var, C> where
Var: PartialEq + Debug,
&'b C: Mul<Output = C>,
C: MulAssign<&'a C> + Coeff + Clone + AddAssign,
[src]
Var: PartialEq + Debug,
&'b C: Mul<Output = C>,
C: MulAssign<&'a C> + Coeff + Clone + AddAssign,
fn mul_assign(&mut self, other: SeriesSlice<'a, Var, C>)
[src]
impl<'a, Var: Clone, C: Coeff + SubAssign> MulInverse for &'a Series<Var, C> where
Var: Clone,
C: Coeff + SubAssign,
&'c C: Div<Output = C> + Mul<Output = C>,
[src]
Var: Clone,
C: Coeff + SubAssign,
&'c C: Div<Output = C> + Mul<Output = C>,
type Output = Series<Var, C>
fn mul_inverse(self) -> Self::Output
[src]
Compute 1/s for a series s
Example
use series::MulInverse; let s = series::Series::new("x", -1, vec!(1.,2.,3.)); let s_inv = (&s).mul_inverse(); let one = series::Series::new("x", 0, vec!(1.,0.,0.)); assert_eq!(s * s_inv, one);
impl<Var: Clone, C: Coeff + SubAssign> MulInverse for Series<Var, C> where
&'a Series<Var, C>: MulInverse<Output = Series<Var, C>>,
[src]
&'a Series<Var, C>: MulInverse<Output = Series<Var, C>>,
type Output = Series<Var, C>
fn mul_inverse(self) -> Self::Output
[src]
Compute 1/s for a series s
Example
use series::MulInverse; let s = series::Series::new("x", -1, vec!(1.,2.,3.)); let s_inv = s.clone().mul_inverse(); let one = series::Series::new("x", 0, vec!(1.,0.,0.)); assert_eq!(s * s_inv, one);
impl<Var, C: Coeff + Neg<Output = C>> Neg for Series<Var, C>
[src]
type Output = Series<Var, C>
The resulting type after applying the -
operator.
fn neg(self) -> Self::Output
[src]
Compute -s for a series s
Example
let s = series::Series::new("x", -3, vec!(1.,0.,-3.)); let minus_s = series::Series::new("x", -3, vec!(-1.,0.,3.)); assert_eq!(-s, minus_s);
impl<'a, Var: Clone, C: Coeff> Neg for &'a Series<Var, C> where
&'c C: Neg<Output = C>,
[src]
&'c C: Neg<Output = C>,
type Output = Series<Var, C>
The resulting type after applying the -
operator.
fn neg(self) -> Self::Output
[src]
Compute -s for a series s
Example
let s = series::Series::new("x", -3, vec!(1.,0.,-3.)); let minus_s = series::Series::new("x", -3, vec!(-1.,0.,3.)); assert_eq!(-&s, minus_s);
impl<Var: Ord, C: Ord + Coeff> Ord for Series<Var, C>
[src]
fn cmp(&self, other: &Series<Var, C>) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<Var: PartialEq, C: PartialEq + Coeff> PartialEq<Series<Var, C>> for Series<Var, C>
[src]
impl<Var: PartialOrd, C: PartialOrd + Coeff> PartialOrd<Series<Var, C>> for Series<Var, C>
[src]
fn partial_cmp(&self, other: &Series<Var, C>) -> Option<Ordering>
[src]
fn lt(&self, other: &Series<Var, C>) -> bool
[src]
fn le(&self, other: &Series<Var, C>) -> bool
[src]
fn gt(&self, other: &Series<Var, C>) -> bool
[src]
fn ge(&self, other: &Series<Var, C>) -> bool
[src]
impl<Var, C: Coeff, T> Pow<T> for Series<Var, C> where
Series<Var, C>: Ln,
<Series<Var, C> as Ln>::Output: Mul<T>,
<<Series<Var, C> as Ln>::Output as Mul<T>>::Output: Exp,
[src]
Series<Var, C>: Ln,
<Series<Var, C> as Ln>::Output: Mul<T>,
<<Series<Var, C> as Ln>::Output as Mul<T>>::Output: Exp,
type Output = <<<Series<Var, C> as Ln>::Output as Mul<T>>::Output as Exp>::Output
fn pow(self, exponent: T) -> Self::Output
[src]
impl<'a, Var, C: Coeff, T> Pow<T> for &'a Series<Var, C> where
SeriesSlice<'b, Var, C>: Ln<Output = Series<Var, C>>,
Series<Var, C>: Mul<T>,
<Series<Var, C> as Mul<T>>::Output: Exp,
[src]
SeriesSlice<'b, Var, C>: Ln<Output = Series<Var, C>>,
Series<Var, C>: Mul<T>,
<Series<Var, C> as Mul<T>>::Output: Exp,
type Output = <<Series<Var, C> as Mul<T>>::Output as Exp>::Output
fn pow(self, exponent: T) -> Self::Output
[src]
impl<Var, C: Coeff> StructuralEq for Series<Var, C>
[src]
impl<Var, C: Coeff> StructuralPartialEq for Series<Var, C>
[src]
impl<'a, Var, C: Coeff, T> Sub<T> for &'a Series<Var, C> where
Series<Var, C>: Clone + SubAssign<T>,
[src]
Series<Var, C>: Clone + SubAssign<T>,
type Output = Series<Var, C>
The resulting type after applying the -
operator.
fn sub(self, other: T) -> Self::Output
[src]
impl<Var, C: Coeff, T> Sub<T> for Series<Var, C> where
Series<Var, C>: SubAssign<T>,
[src]
Series<Var, C>: SubAssign<T>,
type Output = Series<Var, C>
The resulting type after applying the -
operator.
fn sub(self, other: T) -> Self::Output
[src]
impl<'a, Var, C: Coeff> SubAssign<&'a Series<Var, C>> for Series<Var, C> where
&'c Series<Var, C>: Neg<Output = Series<Var, C>>,
Series<Var, C>: AddAssign<Series<Var, C>>,
[src]
&'c Series<Var, C>: Neg<Output = Series<Var, C>>,
Series<Var, C>: AddAssign<Series<Var, C>>,
fn sub_assign(&mut self, other: &'a Series<Var, C>)
[src]
impl<Var, C: Coeff + Clone> SubAssign<C> for Series<Var, C> where
C: Neg<Output = C> + SubAssign<C>,
[src]
C: Neg<Output = C> + SubAssign<C>,
fn sub_assign(&mut self, rhs: C)
[src]
impl<Var, C: Coeff> SubAssign<Series<Var, C>> for Series<Var, C> where
Series<Var, C>: AddAssign + Neg<Output = Series<Var, C>>,
[src]
Series<Var, C>: AddAssign + Neg<Output = Series<Var, C>>,
fn sub_assign(&mut self, other: Series<Var, C>)
[src]
impl<'a, Var, C: Coeff> SubAssign<SeriesSlice<'a, Var, C>> for Series<Var, C> where
SeriesSlice<'c, Var, C>: Neg<Output = Series<Var, C>>,
Series<Var, C>: AddAssign<Series<Var, C>>,
[src]
SeriesSlice<'c, Var, C>: Neg<Output = Series<Var, C>>,
Series<Var, C>: AddAssign<Series<Var, C>>,
fn sub_assign(&mut self, other: SeriesSlice<'a, Var, C>)
[src]
Auto Trait Implementations
impl<Var, C> RefUnwindSafe for Series<Var, C> where
C: RefUnwindSafe,
Var: RefUnwindSafe,
C: RefUnwindSafe,
Var: RefUnwindSafe,
impl<Var, C> Send for Series<Var, C> where
C: Send,
Var: Send,
C: Send,
Var: Send,
impl<Var, C> Sync for Series<Var, C> where
C: Sync,
Var: Sync,
C: Sync,
Var: Sync,
impl<Var, C> Unpin for Series<Var, C> where
C: Unpin,
Var: Unpin,
C: Unpin,
Var: Unpin,
impl<Var, C> UnwindSafe for Series<Var, C> where
C: UnwindSafe,
Var: UnwindSafe,
C: UnwindSafe,
Var: UnwindSafe,
Blanket Implementations
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,
fn borrow_mut(&mut self) -> &mut 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<I> IntoIterator for I where
I: Iterator,
[src]
I: Iterator,
type Item = <I as Iterator>::Item
The type of the elements being iterated over.
type IntoIter = I
Which kind of iterator are we turning this into?
fn into_iter(self) -> I
[src]
impl<T, Rhs> NumAssignOps<Rhs> for T where
T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>,
[src]
T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>,
impl<T, Rhs, Output> NumOps<Rhs, Output> for T where
T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,
[src]
T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,
impl<T, Base> RefNum<Base> for T where
T: NumOps<Base, Base> + for<'r> NumOps<&'r Base, Base>,
[src]
T: NumOps<Base, Base> + for<'r> NumOps<&'r Base, Base>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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.
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>,