14.2.1.4 ZZ_p_class Objects

class ZZ_p_class
The ZZ_p class is used to represent integers modulo $ p$ . The modulus $ p$ may be any positive integer, not necessarily prime.

Objects of the class ZZ_p are represented as a ZZ in the range $ 0, \ldots, p-1$ .

An executing program maintains a "current modulus", which is set to p with ntl_ZZ_p.init(p). The current modulus should be initialized before any ZZ_p objects are created.

The modulus may be changed, and a mechanism is provided for saving and restoring a modulus (see classes ZZ_pBak and ZZ_pContext below).

Instances of class ZZ_p_class also have the following special methods:

__add__,$  $ __cmp__,$  $ __invert__,$  $ __mul__,$  $ __neg__,$  $ __pow__,$  $ __radd__,$  $ __repr__,$  $ __rmul__,$  $ __rpow__,$  $ __rsub__,$  $ __sub__

See About this document... for information on suggesting changes.