NFFT Logo 3.2.3
Data Structures | Functions
taylor_nfft.c File Reference

Testing the nfft againt a Taylor expansion based version. More...

#include "config.h"
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>
#include "nfft3util.h"
#include "nfft3.h"
#include "infft.h"

Go to the source code of this file.

Data Structures

struct  taylor_plan

Functions

static void taylor_init (taylor_plan *ths, int N, int M, int n, int m)
 Initialisation of a transform plan.
static void taylor_precompute (taylor_plan *ths)
 Precomputation of weights and indices in Taylor expansion.
static void taylor_finalize (taylor_plan *ths)
 Destroys a transform plan.
static void taylor_trafo (taylor_plan *ths)
 Executes a Taylor-NFFT, see equation (1.1) in [Guide], computes fast and approximate by means of a Taylor expansion for j=0,...,M-1 f[j] = sum_{k in I_N^d} f_hat[k] * exp(-2 (pi) k x[j])
static void taylor_time_accuracy (int N, int M, int n, int m, int n_taylor, int m_taylor, unsigned test_accuracy)
 Compares NDFT, NFFT, and Taylor-NFFT.
int main (int argc, char **argv)

Detailed Description

Testing the nfft againt a Taylor expansion based version.

Author:
Stefan Kunis

References: Time and memory requirements of the Nonequispaced FFT

Definition in file taylor_nfft.c.


Function Documentation

static void taylor_init ( taylor_plan ths,
int  N,
int  M,
int  n,
int  m 
)
static

Initialisation of a transform plan.

  • ths The pointer to a taylor plan
  • N The multi bandwidth
  • M The number of nodes
  • n The fft length
  • m The order of the Taylor expansion
Author:
Stefan Kunis

Definition at line 64 of file taylor_nfft.c.

References taylor_plan::deltax0, taylor_plan::idx0, and nfft_malloc().

Referenced by taylor_time_accuracy().

static void taylor_precompute ( taylor_plan ths)
static

Precomputation of weights and indices in Taylor expansion.

  • ths The pointer to a taylor plan
Author:
Stefan Kunis

Definition at line 83 of file taylor_nfft.c.

References taylor_plan::deltax0, taylor_plan::idx0, nfft_plan::M_total, nfft_plan::n, and nfft_plan::x.

Referenced by taylor_time_accuracy().

static void taylor_finalize ( taylor_plan ths)
static

Destroys a transform plan.

  • ths The pointer to a taylor plan
Author:
Stefan Kunis, Daniel Potts

Definition at line 105 of file taylor_nfft.c.

References taylor_plan::deltax0, taylor_plan::idx0, and nfft_free().

Referenced by taylor_time_accuracy().

static void taylor_trafo ( taylor_plan ths)
static

Executes a Taylor-NFFT, see equation (1.1) in [Guide], computes fast and approximate by means of a Taylor expansion for j=0,...,M-1 f[j] = sum_{k in I_N^d} f_hat[k] * exp(-2 (pi) k x[j])

  • ths The pointer to a taylor plan
Author:
Stefan Kunis

Definition at line 123 of file taylor_nfft.c.

References taylor_plan::deltax0, nfft_plan::f, nfft_plan::f_hat, nfft_plan::g1, nfft_plan::g2, taylor_plan::idx0, nfft_plan::m, nfft_plan::N_total, nfft_plan::n_total, and PI.

Referenced by taylor_time_accuracy().

static void taylor_time_accuracy ( int  N,
int  M,
int  n,
int  m,
int  n_taylor,
int  m_taylor,
unsigned  test_accuracy 
)
static

Compares NDFT, NFFT, and Taylor-NFFT.

  • N The bandwidth
  • N The number of nodes
  • n The FFT-size for the NFFT
  • m The cut-off for window function
  • n_taylor The FFT-size for the Taylor-NFFT
  • m_taylor The order of the Taylor approximation
  • test_accuracy Flag for NDFT computation
Author:
Stefan Kunis

Definition at line 179 of file taylor_nfft.c.

References nfft_plan::f, nfft_plan::f_hat, nfft_plan::M_total, nfft_plan::N_total, nfft_plan::nfft_flags, nfft_free(), nfft_malloc(), NFFT_SWAP_complex, nfft_trafo(), nfft_vrand_shifted_unit_double(), nfft_vrand_unit_complex(), taylor_plan::p, taylor_finalize(), taylor_init(), taylor_precompute(), taylor_trafo(), and nfft_plan::x.


Generated on Tue Apr 30 2013 by Doxygen 1.8.1