EMAN2
Static Public Member Functions | Static Private Member Functions | Static Private Attributes
EMAN::Interp Class Reference

Interp defines the interpolation function used to generate a e^-x^4 function in real space. More...

#include <interp.h>

List of all members.

Static Public Member Functions

static float get_hyperg (int i)
static float hyperg (float v)
static float * get_gimx ()

Static Private Member Functions

static void init_gimx ()

Static Private Attributes

static float HYPERGEOM []
static float * gimx = 0

Detailed Description

Interp defines the interpolation function used to generate a e^-x^4 function in real space.

Used for Fourier interpolation

Definition at line 47 of file interp.h.


Member Function Documentation

static float* EMAN::Interp::get_gimx ( ) [inline, static]

Definition at line 66 of file interp.h.

References gimx, and init_gimx().

                {
                        if (!gimx) {
                                init_gimx();
                        }
                        return gimx;
                }
static float EMAN::Interp::get_hyperg ( int  i) [inline, static]

Definition at line 50 of file interp.h.

References HYPERGEOM.

                {
                        return HYPERGEOM[i];
                }
static float EMAN::Interp::hyperg ( float  v) [inline, static]

Definition at line 55 of file interp.h.

References HYPERGEOM.

Referenced by EMAN::FourierInserter3DMode7::insert_pixel().

                {
                        if (v < 0 || v > 4.998f) {
                                return 0;
                        }
                        float r = v / 0.001f;
                        int a = (int) floor(r);
                        r -= a;
                        return (float)(-(HYPERGEOM[a] * (1.0 - r) + HYPERGEOM[a + 1] * r));
                }
void Interp::init_gimx ( ) [static, private]

Definition at line 1715 of file interp.cpp.

References gimx, and EMAN::Util::hypot3().

Referenced by get_gimx().

{
        const int size = 100;
        gimx = new float[size * size * size];
        const float g = (float) (10.4 / (M_PI * M_PI)); // magic number here

        for (int k = 0; k < size; k++) {
                for (int j = 0; j < size; j++) {
                        for (int i = 0; i < size; i++) {
                                float r = Util::hypot3(i / 39.0f, j / 39.0f, k / 39.0f);
                                gimx[i + j * size + k * size * size] = exp(-r / g);
                        }
                }
        }
}

Member Data Documentation

float * Interp::gimx = 0 [static, private]

Definition at line 79 of file interp.h.

Referenced by get_gimx(), and init_gimx().

float Interp::HYPERGEOM [static, private]

Definition at line 78 of file interp.h.

Referenced by get_hyperg(), and hyperg().


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