Trait kmedoids::safeadd::SafeAdd[][src]

pub trait SafeAdd {
    fn safe_add(self, o: Self) -> Self;
fn safe_inc(&mut self, o: Self); }

Add without overflow, for both integer and float types.

This is pre-generated for standard numerical types such as i64 and f64.

You only need to touch this if you want to extend this to additional numerical types.

Required methods

fn safe_add(self, o: Self) -> Self[src]

The return a + b addition operation

fn safe_inc(&mut self, o: Self)[src]

The a += b increment operation

Loading content...

Implementations on Foreign Types

impl SafeAdd for isize[src]

impl SafeAdd for usize[src]

impl SafeAdd for i8[src]

impl SafeAdd for u8[src]

impl SafeAdd for i16[src]

impl SafeAdd for u16[src]

impl SafeAdd for i32[src]

impl SafeAdd for u32[src]

impl SafeAdd for i64[src]

impl SafeAdd for u64[src]

impl SafeAdd for f32[src]

impl SafeAdd for f64[src]

Loading content...

Implementors

Loading content...