Module refinery.units.blockwise.neg
Expand source code Browse git
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from refinery.units.blockwise import UnaryOperation
class neg(UnaryOperation):
"""
Each block of the input data is negated bitwise. This is sometimes
also called the bitwise complement or inverse.
"""
def operate(self, a): return ~a
def inplace(self, a): a ^= self.fmask
Classes
class neg (bigendian=False, blocksize=None)
-
Each block of the input data is negated bitwise. This is sometimes also called the bitwise complement or inverse.
Expand source code Browse git
class neg(UnaryOperation): """ Each block of the input data is negated bitwise. This is sometimes also called the bitwise complement or inverse. """ def operate(self, a): return ~a def inplace(self, a): a ^= self.fmask
Ancestors
Class variables
var required_dependencies
var optional_dependencies
Methods
def operate(self, a)
-
Expand source code Browse git
def operate(self, a): return ~a
def inplace(self, a)
-
Expand source code Browse git
def inplace(self, a): a ^= self.fmask
Inherited members