[][src]Struct series::series::Series

pub struct Series<Var, C: Coeff> { /* fields omitted */ }

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]

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]

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]

type Output = Series<Var, C>

The resulting type after applying the + operator.

impl<Var: Clone, C: Coeff + Clone, Rhs> Add<Rhs> for Series<Var, C> where
    Series<Var, C>: AddAssign<Rhs>, 
[src]

type Output = Series<Var, C>

The resulting type after applying the + operator.

impl<'a, Var: PartialEq + Debug, C: Coeff + Clone> AddAssign<&'a Series<Var, C>> for Series<Var, C> where
    C: AddAssign<&'c C>, 
[src]

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]

impl<Var, C: Coeff> AddAssign<Series<Var, C>> for Series<Var, C> where
    C: AddAssign<&'c C>,
    Var: PartialEq + Debug
[src]

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]

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]

type Output = Series<Var, C>

The resulting type after applying the / operator.

impl<Var, C: Coeff, T> Div<T> for Series<Var, C> where
    Series<Var, C>: DivAssign<T>, 
[src]

type Output = Series<Var, C>

The resulting type after applying the / operator.

impl<'a, Var, C: Coeff> DivAssign<&'a C> for Series<Var, C> where
    C: DivAssign<&'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]

fn div_assign(&mut self, other: &'a Series<Var, C>)[src]

Sets s = s / t for two series s,t

Example

use series::Series;
let mut s = Series::new("x", -3, vec!(1.,0.,-3.));
s /= &s.clone();
let res = Series::new("x", 0, vec!(1.,0.,0.));
assert_eq!(res, s);

Panics

Panics if the series have different expansion variables.

impl<Var, C: Coeff> DivAssign<C> for Series<Var, C> where
    Series<Var, C>: DivAssign<&'a 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]

fn div_assign(&mut self, other: Series<Var, C>)[src]

Sets s = s / t for two series s,t

Example

use series::Series;
let mut s = Series::new("x", -3, vec!(1.,0.,-3.));
s /= s.clone();
let res = Series::new("x", 0, vec!(1.,0.,0.));
assert_eq!(res, s);

Panics

Panics if the series have different expansion variables.

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]

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]

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]

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]

impl<'a, Var: Clone, C: Coeff + Clone> From<SeriesSlice<'a, Var, C>> for Series<Var, C>[src]

impl<Var: Hash, C: Hash + Coeff> Hash for Series<Var, C>[src]

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]

type Output = Self

fn ln(self) -> Self[src]

Computes the logarithm of a series

Panics

Panics if the series has no (non-zero) coefficients

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]

type Output = Series<Var, C>

fn ln(self) -> Self::Output[src]

Computes the logarithm of a series

Panics

Panics if the series has no (non-zero) coefficients

impl<'a, Var, C: Coeff> Mul<&'a C> for Series<Var, C> where
    C: MulAssign<&'c C>, 
[src]

type Output = Series<Var, C>

The resulting type after applying the * operator.

impl<'a, Var, C: Coeff> Mul<&'a Series<Var, C>> for Series<Var, C> where
    Series<Var, C>: MulAssign<SeriesSlice<'a, Var, C>>, 
[src]

type Output = Series<Var, C>

The resulting type after applying the * operator.

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]

type Output = Series<Var, C>

The resulting type after applying the * operator.

impl<Var, C: Coeff> Mul<C> for Series<Var, C> where
    C: MulAssign<&'c C>, 
[src]

type Output = Series<Var, C>

The resulting type after applying the * operator.

impl<Var, C: Coeff> Mul<Series<Var, C>> for Series<Var, C> where
    Series<Var, C>: MulAssign
[src]

type Output = Series<Var, C>

The resulting type after applying the * operator.

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]

type Output = Series<Var, C>

The resulting type after applying the * operator.

impl<'a, Var, C: Coeff> Mul<SeriesSlice<'a, Var, C>> for Series<Var, C> where
    Series<Var, C>: MulAssign<SeriesSlice<'a, Var, C>>, 
[src]

type Output = Series<Var, C>

The resulting type after applying the * operator.

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]

type Output = Series<Var, C>

The resulting type after applying the * operator.

impl<'a, Var, C: Coeff> MulAssign<&'a C> for Series<Var, C> where
    C: MulAssign<&'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]

fn mul_assign(&mut self, other: &'a Series<Var, C>)[src]

Set s = s * t for two series s,t

Example

use series::Series;
let mut s = Series::new("x", -3, vec!(1.,0.,-3.));
s *= &s.clone();
let res = Series::new("x", -6, vec!(1.,0.,-6.));
assert_eq!(res, s);

Panics

Panics if the series have different expansion variables.

impl<Var, C: Coeff> MulAssign<C> for Series<Var, C> where
    Series<Var, C>: MulAssign<&'a C>, 
[src]

impl<Var, C: Coeff> MulAssign<Series<Var, C>> for Series<Var, C> where
    Series<Var, C>: MulAssign<&'a Series<Var, C>>, 
[src]

fn mul_assign(&mut self, other: Series<Var, C>)[src]

Set s = s * t for two series s,t

Example

use series::Series;
let mut s = Series::new("x", -3, vec!(1.,0.,-3.));
s *= &s.clone();
let res = Series::new("x", -6, vec!(1.,0.,-6.));
assert_eq!(res, s);

Panics

Panics if the series have different expansion variables.

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]

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]

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]

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]

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]

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]

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]

type Output = <<<Series<Var, C> as Ln>::Output as Mul<T>>::Output as Exp>::Output

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]

type Output = <<Series<Var, C> as Mul<T>>::Output as Exp>::Output

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]

type Output = Series<Var, C>

The resulting type after applying the - operator.

impl<Var, C: Coeff, T> Sub<T> for Series<Var, C> where
    Series<Var, C>: SubAssign<T>, 
[src]

type Output = Series<Var, C>

The resulting type after applying the - operator.

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]

fn sub_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 res = Series::new("x", 0, vec!());
s -= &s.clone();
assert_eq!(res, s);

Panics

Panics if the series have different expansion variables.

impl<Var, C: Coeff + Clone> SubAssign<C> for Series<Var, C> where
    C: Neg<Output = C> + SubAssign<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]

fn sub_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 res = Series::new("x", 0, vec!());
s -= s.clone();
assert_eq!(res, s);

Panics

Panics if the series have different expansion variables.

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]

Auto Trait Implementations

impl<Var, C> RefUnwindSafe for Series<Var, C> where
    C: RefUnwindSafe,
    Var: RefUnwindSafe

impl<Var, C> Send for Series<Var, C> where
    C: Send,
    Var: Send

impl<Var, C> Sync for Series<Var, C> where
    C: Sync,
    Var: Sync

impl<Var, C> Unpin for Series<Var, C> where
    C: Unpin,
    Var: Unpin

impl<Var, C> UnwindSafe for Series<Var, C> where
    C: UnwindSafe,
    Var: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

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?

impl<T, Rhs> NumAssignOps<Rhs> for T where
    T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>, 
[src]

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]

impl<T, Base> RefNum<Base> for T where
    T: NumOps<Base, Base> + for<'r> NumOps<&'r Base, Base>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.