algebramix_doc 0.3
primitive_root_helper_modular_int< I, V, W > Struct Template Reference

#include <fft_roots.hpp>

List of all members.

Public Types

Static Public Member Functions


Detailed Description

template<typename I, typename V, typename W>
struct mmx::primitive_root_helper_modular_int< I, V, W >

Definition at line 114 of file fft_roots.hpp.


Member Typedef Documentation

typedef modular<modulus<I,V>,W> C

Definition at line 115 of file fft_roots.hpp.


Member Function Documentation

static nat max_order ( nat  b) [inline, static]

Definition at line 118 of file fft_roots.hpp.

                    {
    I m, p= * C::get_modulus ();
    return primitive_root_max_order_int (b, p, m);
  }
static C op ( nat  n,
nat  i 
) [inline, static]

Definition at line 124 of file fft_roots.hpp.

                    {
    nat b, k;
    if (n == next_power_of_two (n)) b = 2;
    else if (n == next_power_of_three (n)) b = 3;
    else ERROR ("only radices 2 and 3 are implemented");
    I m, p= * C::get_modulus ();
    C v= primitive_root_max_int (b, p, k, m);
    VERIFY (n <= k, "maximal order exceeded");
    // v is now a primitive root of maximal order k
    return binpow (v, i * (k / n));
  }

The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Friends Defines