Trait accurate::traits::DotWithAccumulator [] [src]

pub trait DotWithAccumulator<F> {
    fn dot_with_accumulator<Acc>(self) -> F
    where
        Acc: DotAccumulator<F>,
        F: Zero
; }

Calculates the dot product of the items of an iterator

Examples

use accurate::traits::*;
use accurate::dot::Dot2;

let xy = vec![(1.0, 1.0), (2.0, 2.0), (3.0, 3.0)];
let d = xy.dot_with_accumulator::<Dot2<_>>();
assert_eq!(14.0f64, d);

Required Methods

Calculates the dot product of the items of an iterator

Implementors