Module refinery.units.blockwise.neg
Expand source code Browse git
from __future__ import annotations
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=1)-
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.fmaskAncestors
Subclasses
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
UnaryOperation:FilterEverythingRequiresassemblebytestreamchunkchunk_into_bytescodecconsolefilterfinishhandlesis_quietis_reversiblelabelledleniencylog_alwayslog_debuglog_detachlog_faillog_infolog_levellog_warnloggernamenozzleoptional_dependenciesprocessprocess_blockreadread1required_dependenciesrestreverserunsourcesuperinitunchunk