pub trait NotAssign {
fn not_assign(&mut self);
}
Expand description
Replaces a number with its bitwise negation.
Required Methods§
fn not_assign(&mut self)
Implementations on Foreign Types§
source§impl NotAssign for bool
impl NotAssign for bool
source§fn not_assign(&mut self)
fn not_assign(&mut self)
Replaces a bool
by its opposite.
$b \gets \lnot b$.
Worst-case complexity
Constant time and additional memory.
Examples
use malachite_base::num::logic::traits::NotAssign;
let mut b = false;
b.not_assign();
assert_eq!(b, true);
let mut b = true;
b.not_assign();
assert_eq!(b, false);
source§impl NotAssign for u8
impl NotAssign for u8
source§fn not_assign(&mut self)
fn not_assign(&mut self)
Replaces a number with its bitwise negation.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
source§impl NotAssign for u16
impl NotAssign for u16
source§fn not_assign(&mut self)
fn not_assign(&mut self)
Replaces a number with its bitwise negation.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
source§impl NotAssign for u32
impl NotAssign for u32
source§fn not_assign(&mut self)
fn not_assign(&mut self)
Replaces a number with its bitwise negation.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
source§impl NotAssign for u64
impl NotAssign for u64
source§fn not_assign(&mut self)
fn not_assign(&mut self)
Replaces a number with its bitwise negation.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
source§impl NotAssign for u128
impl NotAssign for u128
source§fn not_assign(&mut self)
fn not_assign(&mut self)
Replaces a number with its bitwise negation.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
source§impl NotAssign for usize
impl NotAssign for usize
source§fn not_assign(&mut self)
fn not_assign(&mut self)
Replaces a number with its bitwise negation.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
source§impl NotAssign for i8
impl NotAssign for i8
source§fn not_assign(&mut self)
fn not_assign(&mut self)
Replaces a number with its bitwise negation.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
source§impl NotAssign for i16
impl NotAssign for i16
source§fn not_assign(&mut self)
fn not_assign(&mut self)
Replaces a number with its bitwise negation.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
source§impl NotAssign for i32
impl NotAssign for i32
source§fn not_assign(&mut self)
fn not_assign(&mut self)
Replaces a number with its bitwise negation.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
source§impl NotAssign for i64
impl NotAssign for i64
source§fn not_assign(&mut self)
fn not_assign(&mut self)
Replaces a number with its bitwise negation.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
source§impl NotAssign for i128
impl NotAssign for i128
source§fn not_assign(&mut self)
fn not_assign(&mut self)
Replaces a number with its bitwise negation.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
source§impl NotAssign for isize
impl NotAssign for isize
source§fn not_assign(&mut self)
fn not_assign(&mut self)
Replaces a number with its bitwise negation.
Worst-case complexity
Constant time and additional memory.
Examples
See here.