15 namespace TrackFindingCDC {
20 inline int modulo(
int numerator,
int denominator)
22 return ((numerator % denominator) + denominator) % denominator;
32 inline int moduloFast(
int numerator,
int denominator)
34 while (numerator < 0) numerator += denominator;
35 while (numerator >= denominator) numerator -= denominator;
44 inline int symmetricModulo(
int numerator,
int denominator)
46 return modulo(numerator + denominator / 2, denominator) - denominator / 2;
57 inline int symmetricModuloFast(
int numerator,
int denominator)
59 return moduloFast(numerator + denominator / 2, denominator) - denominator / 2;
64 inline bool isEven(
const AInt& x)
71 inline bool isOdd(
const AInt& x)
Abstract base class for different kinds of events.