NFFT Logo 3.1.3 API Reference

NFCT/NFST - Nonequispaced fast (co)sine transform

Direct and fast computation of the discrete nonequispaced (co)sine transform. More...

Data Structures

struct  nfct_plan
 Structure for a transform plan. More...
struct  nfst_plan
 Structure for a transform plan. More...

Functions

void nfct_init_1d (nfct_plan *ths_plan, int N0, int M_total)
 Creates a 1-dimensional transform plan.
void nfct_init_2d (nfct_plan *ths_plan, int N0, int N1, int M_total)
 Creates a 3-dimensional transform plan.
void nfct_init_3d (nfct_plan *ths_plan, int N0, int N1, int N2, int M_total)
 Creates a 3-dimensional transform plan.
void nfct_init (nfct_plan *ths_plan, int d, int *N, int M_total)
 Creates a d-dimensional transform plan.
void nfct_init_guru (nfct_plan *ths_plan, int d, int *N, int M_total, int *n, int m, unsigned nfct_flags, unsigned fftw_flags)
 Creates a d-dimensional transform plan.
void nfct_precompute_psi (nfct_plan *ths_plan)
 precomputes the values psi if the PRE_PSI is set the application program has to call this routine after setting the nodes this_plan->x
void nfct_trafo (nfct_plan *ths_plan)
 executes a NFCT (approximate,fast), computes for $j=0,...,M\_total-1$ $f_j^C(x_j) = \sum_{k \in I_0^{N,d}} \hat{f}_k^C * cos(2 \pi k x_j)$
void ndct_trafo (nfct_plan *ths_plan)
 executes a NDCT (exact,slow), computes for $j=0,...,M\_total-1$ $f_j^C(x_j) = \sum_{k \in I_0^{N,d}} \hat{f}_k^C * cos(2 \pi k x_j)$
void nfct_adjoint (nfct_plan *ths_plan)
 executes a transposed NFCT (approximate,fast), computes for $k \in I_0^{N,d}$ $h^C(k) = \sum_{j \in I_0^{(M\_total,1)}} f_j^C * cos(2 \pi k x_j)$
void ndct_adjoint (nfct_plan *ths_plan)
 executes a direct transposed NDCT (exact,slow), computes for $k \in I_0^{N,d}$ $h^C(k) = \sum_{j \in I_0^{(M\_total,1)}} f_j^C * cos(2 \pi k x_j)$
void nfct_finalize (nfct_plan *ths_plan)
 Destroys a plan.
double nfct_phi_hut (nfct_plan *ths_plan, int k, int d)
 do some adjustments (N,n) then compute PHI_HUT
double nfct_phi (nfct_plan *ths_plan, double x, int d)
 do some adjustments (N,n) then compute PHI
int nfct_fftw_2N (int n)
 returns 2(n-1), fftw related issue
int nfct_fftw_2N_rev (int n)
 returns 0.5n+1, fftw related issue
void nfst_init_1d (nfst_plan *ths_plan, int N0, int M_total)
 Creates a 1-dimensional transform plan.
void nfst_init_2d (nfst_plan *ths_plan, int N0, int N1, int M_total)
 Creates a 3-dimensional transform plan.
void nfst_init_3d (nfst_plan *ths_plan, int N0, int N1, int N2, int M_total)
 Creates a 3-dimensional transform plan.
void nfst_init (nfst_plan *ths_plan, int d, int *N, int M_total)
 Creates a d-dimensional transform plan.
void nfst_init_m (nfst_plan *ths_plan, int d, int *N, int M_total, int m)
 Creates a d-dimensional transform plan with pcific m.
void nfst_init_guru (nfst_plan *ths_plan, int d, int *N, int M_total, int *n, int m, unsigned nfst_flags, unsigned fftw_flags)
 Creates a d-dimensional transform plan.
void nfst_precompute_psi (nfst_plan *ths_plan)
 precomputes the values psi if the PRE_PSI is set the application program has to call this routine after setting the nodes this_plan->x
void nfst_trafo (nfst_plan *ths_plan)
 executes a NFST (approximate,fast), computes for $j=0,...,M\_total-1$ $f_j^S(x_j) = \sum_{k \in I_1^{N,d}} \hat{f}_k^S * sin(2 \pi k x_j)$
void ndst_trafo (nfst_plan *ths_plan)
 executes a NDST (exact,slow), computes for $j=0,...,M\_total-1$ $f_j^S(x_j) = \sum_{k \in I_1^{N,d}} \hat{f}_k^S * sin(2 \pi k x_j)$
void nfst_adjoint (nfst_plan *ths_plan)
 executes a transposed NFST (approximate,fast), computes for $k \in I_1^{N,d}$ $h^S(k) = \sum_{j \in I_0^{M\_total,1}} f_j^S * cos(2 \pi k x_j)$
void ndst_adjoint (nfst_plan *ths_plan)
 executes a direct transposed NDST (exact,slow), computes for $k \in I_1^{N,d}$ $h^S(k) = \sum_{j \in I_0^{M\_total,1}} f_j^S * cos(2 \pi k x_j)$
void nfst_finalize (nfst_plan *ths_plan)
 Destroys a plan.
void nfst_full_psi (nfst_plan *ths_plan, double eps)
 more memory usage, a bit faster
double nfst_phi_hut (nfst_plan *ths_plan, int k, int d)
 do some adjustments (N,n) then compute PHI_HUT
double nfst_phi (nfst_plan *ths_plan, double x, int d)
 do some adjustments (N,n) then compute PHI
int nfst_fftw_2N (int n)
 returns 2(n+1), fftw related issue
int nfst_fftw_2N_rev (int n)
 returns 0.5n-1, fftw related issue

Detailed Description

Direct and fast computation of the discrete nonequispaced (co)sine transform.


Function Documentation

void nfct_init_1d ( nfct_plan ths_plan,
int  N0,
int  M_total 
)

Creates a 1-dimensional transform plan.

  • ths_plan The plan for the transform
  • N0 The bandwidth $N$
  • M_total The number of nodes $x$
Author:
Steffen Klatt

Definition at line 1016 of file nfct.c.

References nfct_init().

void nfct_init_2d ( nfct_plan ths_plan,
int  N0,
int  N1,
int  M_total 
)

Creates a 3-dimensional transform plan.

  • ths_plan The plan for the transform
  • N0 The bandwidth of dimension 1
  • N1 The bandwidth of dimension 2
  • M_total The number of nodes $x$
Author:
Steffen Klatt

Definition at line 1024 of file nfct.c.

References nfct_init().

void nfct_init_3d ( nfct_plan ths_plan,
int  N0,
int  N1,
int  N2,
int  M_total 
)

Creates a 3-dimensional transform plan.

  • ths_plan The plan for the transform
  • N0 The bandwidth of dimension 1
  • N1 The bandwidth of dimension 2
  • N2 The bandwidth of dimension 3
  • M_total The number of nodes $x$
Author:
Steffen Klatt

Definition at line 1033 of file nfct.c.

References nfct_init().

void nfct_init ( nfct_plan ths_plan,
int  d,
int *  N,
int  M_total 
)

Creates a d-dimensional transform plan.

  • ths_plan The plan for the transform
  • d the dimension
  • N The bandwidths
  • M_total The number of nodes $x$
Author:
Steffen Klatt

Definition at line 951 of file nfct.c.

References nfct_plan::d, nfct_plan::fftw_flags, nfct_plan::M_total, nfct_plan::n, nfct_plan::N, nfct_fftw_2N(), nfct_plan::nfct_flags, nfft_malloc(), and nfft_next_power_of_2().

Referenced by nfct_init_1d(), nfct_init_2d(), and nfct_init_3d().

void nfct_init_guru ( nfct_plan ths_plan,
int  d,
int *  N,
int  M_total,
int *  n,
int  m,
unsigned  nfct_flags,
unsigned  fftw_flags 
)

Creates a d-dimensional transform plan.

  • ths_plan The plan for the transform
  • d the dimension
  • N The bandwidths
  • M_total The number of nodes $x$
  • n The oversampled bandwidths
  • m The cut-off parameter
  • nfct_flags The flags known to nfct
  • fftw_flags The flags known to fftw
Author:
Steffen Klatt

Definition at line 988 of file nfct.c.

References nfct_plan::d, nfct_plan::fftw_flags, nfct_plan::m, nfct_plan::M_total, nfct_plan::n, nfct_plan::N, nfct_plan::nfct_flags, and nfft_malloc().

void nfct_precompute_psi ( nfct_plan ths_plan  ) 

precomputes the values psi if the PRE_PSI is set the application program has to call this routine after setting the nodes this_plan->x

  • ths_plan The plan for the transform
Author:
Steffen Klatt

Definition at line 855 of file nfct.c.

References nfct_plan::d, nfct_plan::M_total, and nfct_plan::psi.

void nfct_trafo ( nfct_plan ths  ) 

executes a NFCT (approximate,fast), computes for $j=0,...,M\_total-1$ $f_j^C(x_j) = \sum_{k \in I_0^{N,d}} \hat{f}_k^C * cos(2 \pi k x_j)$

  • ths_plan The plan for the transform
Author:
Steffen Klatt

Definition at line 728 of file nfct.c.

References nfft_free(), PRE_FULL_PSI, and TIC.

void ndct_trafo ( nfct_plan ths_plan  ) 

executes a NDCT (exact,slow), computes for $j=0,...,M\_total-1$ $f_j^C(x_j) = \sum_{k \in I_0^{N,d}} \hat{f}_k^C * cos(2 \pi k x_j)$

  • ths_plan The plan for the transform
Author:
Steffen Klatt

Definition at line 273 of file nfct.c.

void nfct_adjoint ( nfct_plan ths_plan  ) 

executes a transposed NFCT (approximate,fast), computes for $k \in I_0^{N,d}$ $h^C(k) = \sum_{j \in I_0^{(M\_total,1)}} f_j^C * cos(2 \pi k x_j)$

  • ths_plan The plan for the transform
Author:
Steffen Klatt

Definition at line 782 of file nfct.c.

References nfct_plan::g, nfct_plan::g1, nfct_plan::g2, nfct_plan::g_hat, nfct_plan::my_fftw_r2r_plan, nfct_plan::nfct_flags, nfft_free(), PRE_FULL_PSI, nfct_plan::psi_index_f, nfct_plan::psi_index_g, and TIC.

void ndct_adjoint ( nfct_plan ths_plan  ) 

executes a direct transposed NDCT (exact,slow), computes for $k \in I_0^{N,d}$ $h^C(k) = \sum_{j \in I_0^{(M\_total,1)}} f_j^C * cos(2 \pi k x_j)$

  • ths_plan The plan for the transform
Author:
Steffen Klatt

Definition at line 274 of file nfct.c.

void nfct_finalize ( nfct_plan ths  ) 

double nfct_phi_hut ( nfct_plan ths_plan,
int  k,
int  d 
)

do some adjustments (N,n) then compute PHI_HUT

  • ths_plan the plan for the transform
  • k index of c_phi
  • d dimension
Author:
Steffen Klatt

Definition at line 80 of file nfct.c.

double nfct_phi ( nfct_plan ths_plan,
double  x,
int  d 
)

do some adjustments (N,n) then compute PHI

  • ths_plan the plan for the transform
  • x node $x$
  • d dimension
Author:
Steffen Klatt

Definition at line 89 of file nfct.c.

int nfct_fftw_2N ( int  n  ) 

returns 2(n-1), fftw related issue

  • n i.e. length of dct-1
Author:
Steffen Klatt

Definition at line 98 of file nfct.c.

Referenced by nfct_init().

int nfct_fftw_2N_rev ( int  n  ) 

returns 0.5n+1, fftw related issue

  • n i.e. length of dct-1
Author:
Steffen Klatt

Definition at line 103 of file nfct.c.

void nfst_init_1d ( nfst_plan ths_plan,
int  N0,
int  M_total 
)

Creates a 1-dimensional transform plan.

  • ths_plan The plan for the transform
  • N0 The bandwidth $N$
  • M_total The number of nodes $x$
Author:
Steffen Klatt

Definition at line 999 of file nfst.c.

References nfst_init().

void nfst_init_2d ( nfst_plan ths_plan,
int  N0,
int  N1,
int  M_total 
)

Creates a 3-dimensional transform plan.

  • ths_plan The plan for the transform
  • N0 The bandwidth of dimension 1
  • N1 The bandwidth of dimension 2
  • M_total The number of nodes $x$
Author:
Steffen Klatt

Definition at line 1007 of file nfst.c.

References nfst_init().

void nfst_init_3d ( nfst_plan ths_plan,
int  N0,
int  N1,
int  N2,
int  M_total 
)

Creates a 3-dimensional transform plan.

  • ths_plan The plan for the transform
  • N0 The bandwidth of dimension 1
  • N1 The bandwidth of dimension 2
  • N2 The bandwidth of dimension 3
  • M_total The number of nodes $x$
Author:
Steffen Klatt

Definition at line 1016 of file nfst.c.

References nfst_init().

void nfst_init ( nfst_plan ths_plan,
int  d,
int *  N,
int  M_total 
)

Creates a d-dimensional transform plan.

  • ths_plan The plan for the transform
  • d the dimension
  • N The bandwidths
  • M_total The number of nodes $x$
Author:
Steffen Klatt

Definition at line 933 of file nfst.c.

References nfst_plan::d, nfst_plan::fftw_flags, nfst_plan::M_total, nfst_plan::n, nfst_plan::N, nfft_malloc(), nfft_next_power_of_2(), and nfst_plan::nfst_flags.

Referenced by nfst_init_1d(), nfst_init_2d(), and nfst_init_3d().

void nfst_init_m ( nfst_plan ths_plan,
int  d,
int *  N,
int  M_total,
int  m 
)

Creates a d-dimensional transform plan with pcific m.

(just for convenience)

  • ths_plan The plan for the transform
  • d the dimension
  • N The bandwidths
  • M_total The number of nodes $x$
  • m cut-off parameter
Author:
Steffen Klatt

Definition at line 960 of file nfst.c.

References nfft_next_power_of_2(), nfst_fftw_2N(), and nfst_init_guru().

void nfst_init_guru ( nfst_plan ths_plan,
int  d,
int *  N,
int  M_total,
int *  n,
int  m,
unsigned  nfst_flags,
unsigned  fftw_flags 
)

Creates a d-dimensional transform plan.

  • ths_plan The plan for the transform
  • d the dimension
  • N The bandwidths
  • M_total The number of nodes $x$
  • n The oversampled bandwidths
  • m The cut-off parameter
  • nfst_flags The flags known to nfst
  • fftw_flags The flags known to fftw
Author:
Steffen Klatt

Definition at line 971 of file nfst.c.

References nfst_plan::d, nfst_plan::fftw_flags, nfst_plan::m, nfst_plan::M_total, nfst_plan::n, nfst_plan::N, nfft_malloc(), and nfst_plan::nfst_flags.

Referenced by nfst_init_m().

void nfst_precompute_psi ( nfst_plan ths_plan  ) 

precomputes the values psi if the PRE_PSI is set the application program has to call this routine after setting the nodes this_plan->x

  • ths_plan The plan for the transform
Author:
Steffen Klatt

Definition at line 760 of file nfst.c.

References nfst_plan::d, nfst_plan::M_total, nfst_plan::nfst_flags, nfst_full_psi(), nfst_plan::nfst_full_psi_eps, PRE_FULL_PSI, and nfst_plan::psi.

void nfst_trafo ( nfst_plan ths  ) 

executes a NFST (approximate,fast), computes for $j=0,...,M\_total-1$ $f_j^S(x_j) = \sum_{k \in I_1^{N,d}} \hat{f}_k^S * sin(2 \pi k x_j)$

  • ths_plan The plan for the transform
Author:
Steffen Klatt

Definition at line 647 of file nfst.c.

References TIC.

void ndst_trafo ( nfst_plan ths_plan  ) 

executes a NDST (exact,slow), computes for $j=0,...,M\_total-1$ $f_j^S(x_j) = \sum_{k \in I_1^{N,d}} \hat{f}_k^S * sin(2 \pi k x_j)$

  • ths_plan The plan for the transform
Author:
Steffen Klatt

Definition at line 271 of file nfst.c.

void nfst_adjoint ( nfst_plan ths_plan  ) 

executes a transposed NFST (approximate,fast), computes for $k \in I_1^{N,d}$ $h^S(k) = \sum_{j \in I_0^{M\_total,1}} f_j^S * cos(2 \pi k x_j)$

  • ths_plan The plan for the transform
Author:
Steffen Klatt

Definition at line 692 of file nfst.c.

References nfst_plan::g, nfst_plan::g1, nfst_plan::g2, nfst_plan::g_hat, nfst_plan::my_fftw_r2r_plan, and TIC.

void ndst_adjoint ( nfst_plan ths_plan  ) 

executes a direct transposed NDST (exact,slow), computes for $k \in I_1^{N,d}$ $h^S(k) = \sum_{j \in I_0^{M\_total,1}} f_j^S * cos(2 \pi k x_j)$

  • ths_plan The plan for the transform
Author:
Steffen Klatt

Definition at line 272 of file nfst.c.

void nfst_finalize ( nfst_plan ths_plan  ) 

void nfst_full_psi ( nfst_plan ths_plan,
double  eps 
)

more memory usage, a bit faster

  • ths_plan The plan for the transform

Definition at line 788 of file nfst.c.

References nfst_plan::d, nfst_plan::M_total, nfft_free(), nfft_malloc(), nfst_plan::nfst_flags, PRE_PSI, nfst_plan::psi, nfst_plan::psi_index_f, nfst_plan::psi_index_g, and nfst_plan::size_psi.

Referenced by nfst_precompute_psi().

double nfst_phi_hut ( nfst_plan ths_plan,
int  k,
int  d 
)

do some adjustments (N,n) then compute PHI_HUT

  • ths_plan the plan for the transform
  • k index of c_phi
  • d dimension
Author:
Steffen Klatt

Definition at line 80 of file nfst.c.

double nfst_phi ( nfst_plan ths_plan,
double  x,
int  d 
)

do some adjustments (N,n) then compute PHI

  • ths_plan the plan for the transform
  • x node $x$
  • d dimension
Author:
Steffen Klatt

Definition at line 89 of file nfst.c.

int nfst_fftw_2N ( int  n  ) 

returns 2(n+1), fftw related issue

  • n i.e. length of dst-1
Author:
Steffen Klatt

Definition at line 98 of file nfst.c.

Referenced by nfst_init_m().

int nfst_fftw_2N_rev ( int  n  ) 

returns 0.5n-1, fftw related issue

  • n i.e. length of dct-1
Author:
Steffen Klatt

Definition at line 103 of file nfst.c.


Generated on 23 Dec 2009 by Doxygen 1.5.6