modulus< C, modulus_int_preinverse< m > > Class Template Reference

#include <modular_int.hpp>

List of all members.

Public Types

Public Member Functions

Public Attributes


Detailed Description

template<typename C, nat m>
class mmx::modulus< C, modulus_int_preinverse< m > >

Definition at line 942 of file modular_int.hpp.


Member Typedef Documentation

typedef C base

Definition at line 951 of file modular_int.hpp.

Definition at line 953 of file modular_int.hpp.

Definition at line 952 of file modular_int.hpp.


Constructor & Destructor Documentation

modulus (  )  [inline]

Definition at line 957 of file modular_int.hpp.

References modulus< C, V >::p, and s.

00957                     : p (0) {
00958     r = variant::dyn_r (p);
00959     s = variant::dyn_s (p, r);
00960     t = variant::dyn_t (p, r);
00961     q = variant::dyn_q (p, r, s, t);
00962     h = p >> 1;
00963   }

modulus ( const X &  x  )  [inline]

Definition at line 966 of file modular_int.hpp.

References ASSERT, mmx::C, modulus< C, V >::p, and s.

00966                               {
00967     p = (C) x;
00968     ASSERT (variant::normalize (p), "modulus: bad value");
00969     r = variant::dyn_r (p);
00970     s = variant::dyn_s (p, r);
00971     t = variant::dyn_t (p, r);
00972     q = variant::dyn_q (p, r, s, t);
00973     h = p >> 1;
00974   }

modulus ( const fixed_value< X, _p > &  x  )  [inline]

Definition at line 977 of file modular_int.hpp.

References ASSERT, mmx::C, modulus< C, V >::p, and s.

00977                                                {
00978     typedef typename variant::template auxiliaries_helper<C, _p> A;
00979     C loc_p = _p;
00980     ASSERT (variant::normalize (loc_p), "modulus: bad value");
00981     p = A::up;
00982     q = A::q ();
00983     r = A::r;
00984     s = A::s;
00985     t = A::t;
00986     h = p >> 1; }

modulus ( const self_type x  )  [inline]

Definition at line 988 of file modular_int.hpp.

References s.

00988                                       : p (x.p), q (x.q),
00989                                         r (x.r), s (x.s),
00990                                         t (x.t), h (x.h) {}


Member Function Documentation

bool operator!= ( const self_type a  )  const [inline]

Definition at line 1005 of file modular_int.hpp.

References modulus< C, modulus_int_preinverse< m > >::p, and modulus< C, V >::p.

01005                                                      {
01006     return p != a.p; }

C operator* (  )  const [inline]

Definition at line 955 of file modular_int.hpp.

References modulus< C, V >::p.

00955 { return p; }

self_type& operator= ( const self_type x  )  [inline]
bool operator== ( const self_type a  )  const [inline]

Definition at line 1002 of file modular_int.hpp.

References modulus< C, modulus_int_preinverse< m > >::p, and modulus< C, V >::p.

01002                                                      {
01003     return p == a.p; }


Member Data Documentation

C h
C p
C q
nat r
nat s
nat t

The documentation for this class was generated from the following file:

Generated on 6 Dec 2012 for numerix by  doxygen 1.6.1