Struct accurate::sum::Sum2
[−]
[src]
pub struct Sum2<F> { /* fields omitted */ }
SumK
with two cascaded accumulators
Examples
use accurate::traits::*; use accurate::sum::Sum2; let s = Sum2::zero() + 1.0 + 2.0 + 3.0; assert_eq!(6.0f64, s.sum());
References
Based on Ogita, Rump and Oishi 05
Trait Implementations
impl<F: Copy> Copy for Sum2<F>
[src]
impl<F: Clone> Clone for Sum2<F>
[src]
fn clone(&self) -> Sum2<F>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<F: Debug> Debug for Sum2<F>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<F> SumAccumulator<F> for Sum2<F> where
F: Float + TwoSum + AddAssign,
[src]
F: Float + TwoSum + AddAssign,
fn sum(self) -> F
[src]
The sum of all terms accumulated so far
fn zero() -> Self where
F: Zero,
[src]
F: Zero,
Initial value for an accumulator
fn absorb<I>(self, it: I) -> Self where
I: IntoIterator<Item = F>,
[src]
I: IntoIterator<Item = F>,
Absorb the items of an iterator into the accumulator Read more
impl<F> Add<F> for Sum2<F> where
Sum2<F>: AddAssign<F>,
[src]
Sum2<F>: AddAssign<F>,
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: F) -> Self::Output
[src]
Performs the +
operation.
impl<F> From<F> for Sum2<F> where
F: Float,
[src]
F: Float,
impl<F> Add for Sum2<F> where
F: Float + TwoSum,
[src]
F: Float + TwoSum,
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: Self) -> Self::Output
[src]
Performs the +
operation.
impl<F> Send for Sum2<F> where
F: Send,
[src]
F: Send,
impl<F> AddAssign<F> for Sum2<F> where
F: Float + TwoSum + AddAssign,
[src]
F: Float + TwoSum + AddAssign,
fn add_assign(&mut self, rhs: F)
[src]
Performs the +=
operation.