modulus_inv_integer_naive< V > Struct Template Reference

#include <modular_integer.hpp>

List of all members.

Static Public Member Functions


Detailed Description

template<typename V>
struct mmx::modulus_inv_integer_naive< V >

Definition at line 114 of file modular_integer.hpp.


Member Function Documentation

static void inv_mod ( C dest,
const C s,
const M &  m 
) [inline, static]

Definition at line 133 of file modular_integer.hpp.

00133                                             {
00134     dest = s;
00135     inv_mod (dest, m); }

static void inv_mod ( C a,
const M &  m 
) [inline, static]

Definition at line 121 of file modular_integer.hpp.

Referenced by modulus_inv_integer_naive< modulus_mul_naive< modulus_add_integer_naive< modulus_reduction_naive< modulus_normalization_integer_naive > > > >::inv_mod().

00121                              {
00122     if (m.p == 0) {
00123       if (a == 1 || a == -1)
00124         return;
00125       else
00126         ERROR ("inv_mod: argument is not invertible");  
00127     }
00128     a = invert_modulo (a, m.p);
00129     if (a == 0 && m.p != 1)
00130       ERROR ("inv_mod: argument is not invertible"); }

static bool is_invertible_mod ( const C s,
const M &  m 
) [inline, static]

Definition at line 117 of file modular_integer.hpp.

00117                                              {
00118     return abs (gcd (s, m.p)) == 1; }


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

Generated on 6 Dec 2012 for numerix by  doxygen 1.6.1