modulus_encoding_int_naive< V > Struct Template Reference

#include <modular_int.hpp>

List of all members.

Static Public Member Functions


Detailed Description

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

Definition at line 491 of file modular_int.hpp.


Member Function Documentation

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

Definition at line 505 of file modular_int.hpp.

00505                                                {
00506     (void) m;
00507     dest = s; }

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

Definition at line 493 of file modular_int.hpp.

00493                                                {
00494     typedef typename unsigned_of_helper<C>::type uC;
00495     if (sign (s) < 0) {
00496       uC tmp = - ((uC) s);
00497       V::reduce_mod (tmp, m);
00498       dest = (C) (((uC) m.p) - tmp);
00499     }
00500     else
00501       dest = s;
00502       V::reduce_mod (dest, m);
00503   }


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

Generated on 6 Dec 2012 for numerix by  doxygen 1.6.1