MCPcopy Create free account
hub / github.com/Axect/Peroxide / zip_with

Method zip_with

src/complex/vector.rs:58–66  ·  view source on GitHub ↗
(&self, f: F, other: &Self)

Source from the content-addressed store, hash-verified

56 }
57
58 fn zip_with<F>(&self, f: F, other: &Self) -> Self
59 where
60 F: Fn(Self::Scalar, Self::Scalar) -> Self::Scalar,
61 {
62 self.iter()
63 .zip(other.iter())
64 .map(|(&x, &y)| f(x, y))
65 .collect()
66 }
67
68 fn reduce<F, T>(&self, init: T, f: F) -> Self::Scalar
69 where

Callers 3

add_vecMethod · 0.45
sub_vecMethod · 0.45
dotMethod · 0.45

Calls 2

iterMethod · 0.80
fFunction · 0.50

Tested by

no test coverage detected