pub struct Add {}Expand description
Operation to add two or more inputs together
Implementations§
Source§impl Add
impl Add
Sourcepub fn new<T>() -> Node<T>
pub fn new<T>() -> Node<T>
Generate a new add operation
§Example
use sac_base::operations::math::add::Add;
let mut add = Add::new();
let mut vec = Vec::new();
vec.push(&[1.0, 3.0, 4.0][..]);
vec.push(&[2.0][..]);
vec.push(&[3.0][..]);
// Sums up the three given inputs.
add.process((vec, 3));
assert_eq!(add.poll(), &[6.0, 3.0, 4.0][..]);Auto Trait Implementations§
impl Freeze for Add
impl RefUnwindSafe for Add
impl Send for Add
impl Sync for Add
impl Unpin for Add
impl UnsafeUnpin for Add
impl UnwindSafe for Add
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more