Motivated by the famous 3n + 1 conjecture, we call a mapping from Z to Z residue-class-wise affine if there is a positive integer m such that it is affine on residue classes (mod m). This article describes a collection of algorithms and methods for computation in permutation groups and monoids formed by residue-class-wise affine mappings.