algebramix_doc 0.3
roots_helper< CC, UU, SS > Struct Template Reference

#include <fft_naive.hpp>

List of all members.

Classes

Public Types

Static Public Member Functions


Detailed Description

template<typename CC, typename UU, typename SS>
struct mmx::roots_helper< CC, UU, SS >

Definition at line 24 of file fft_naive.hpp.


Member Typedef Documentation

typedef CC C

Definition at line 25 of file fft_naive.hpp.

typedef SS S

Definition at line 27 of file fft_naive.hpp.

typedef UU U

Definition at line 26 of file fft_naive.hpp.


Member Function Documentation

static U* create_roots ( nat  n) [inline, static]

Definition at line 30 of file fft_naive.hpp.

References mmx::bit_mirror().

                       {
    nat k= primitive_root_max_order<C> (2); (void) k;
    VERIFY (k == 0 || n <= k, "maximum order exceeded");
    VERIFY (n >= 2, "size must be at least two");
    U* roots= mmx_new<U> (n);
    for (nat i=0; i<n; i+=2) {
      U temp = primitive_root<C> (n, bit_mirror (i, n));
      roots[i] = temp;
      roots[i+1]= primitive_root<U> (n, i==0? 0: n - bit_mirror (i, n));
    }
    return roots; }
static void destroy_roots ( U u,
nat  n 
) [inline, static]

Definition at line 43 of file fft_naive.hpp.

                              {
    mmx_delete<U> (u, n); }
static void dfft_cross ( C c1,
C c2,
const U u 
) [inline, static]

Definition at line 53 of file fft_naive.hpp.

Referenced by roots_helper< CC, UU, SS >::dtft_cross().

                                        {
    C temp= (*u) * (*c2);
    *c2   = (*c1) - temp;
    *c1   = (*c1) + temp; }
static void dtft_cross ( C c1,
C c2,
const U u 
) [inline, static]

Definition at line 72 of file fft_naive.hpp.

References roots_helper< CC, UU, SS >::dfft_cross(), and mmx::invert().

                                        {
    static S h= invert (S (2));
    dfft_cross (c1, c2, u);
    *c1 *= h;
    *c2 *= h; }
static void dtft_cross ( C c1,
C c2 
) [inline, static]

Definition at line 65 of file fft_naive.hpp.

References roots_helper< CC, UU, SS >::fft_cross(), and mmx::invert().

                            {
    static S h= invert (S (2));
    fft_cross (c1, c2);
    *c1 *= h;
    *c2 *= h; }
static void fft_cross ( C c1,
C c2 
) [inline, static]

Definition at line 47 of file fft_naive.hpp.

Referenced by roots_helper< CC, UU, SS >::dtft_cross().

                           {
    C temp= (*c2);
    *c2   = (*c1) - temp;
    *c1   = (*c1) + temp; }
static void ifft_cross ( C c1,
C c2,
const U u 
) [inline, static]

Definition at line 59 of file fft_naive.hpp.

                                        {
    C temp= *c2;
    *c2   = (*u ) * ((*c1) - temp);
    *c1   = (*c1) + temp; }
static void itft_flip ( C c1,
C c2,
const U u 
) [inline, static]

Definition at line 79 of file fft_naive.hpp.

References mmx::invert().

                                       {
    static S h= invert (S(2));
    C temp= (*u) * (*c2);
    *c1  += (*c1) - temp;
    *c2   = h * ((*c1) - temp); }
static void itft_flip ( C c1,
C c2 
) [inline, static]

Definition at line 86 of file fft_naive.hpp.

References mmx::invert().

                           {
    static S h= invert (S(2));
    *c1  += (*c1) - (*c2);
    *c2   = h * ((*c1) - (*c2)); }

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