QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
FastFourierTransform Class Reference

FFT implementation. More...

#include <fastfouriertransform.hpp>

+ Collaboration diagram for FastFourierTransform:

Public Member Functions

 FastFourierTransform (std::size_t order)
 
std::size_t output_size () const
 The required size for the output vector. More...
 
template<typename InputIterator , typename RandomAccessIterator >
void transform (InputIterator inBegin, InputIterator inEnd, RandomAccessIterator out) const
 FFT transform. More...
 
template<typename InputIterator , typename RandomAccessIterator >
void inverse_transform (InputIterator inBegin, InputIterator inEnd, RandomAccessIterator out) const
 Inverse FFT transform. More...
 

Static Public Member Functions

static std::size_t min_order (std::size_t inputSize)
 the minimum order required for the given input size More...
 

Private Member Functions

template<typename InputIterator , typename RandomAccessIterator >
void transform_impl (InputIterator inBegin, InputIterator inEnd, RandomAccessIterator out, bool inverse) const
 

Static Private Member Functions

static std::size_t bit_reverse (std::size_t x, std::size_t order)
 

Private Attributes

std::vector< double > cs_
 
std::vector< double > sn_
 

Detailed Description

FFT implementation.

Definition at line 38 of file fastfouriertransform.hpp.

Constructor & Destructor Documentation

◆ FastFourierTransform()

FastFourierTransform ( std::size_t  order)

Definition at line 47 of file fastfouriertransform.hpp.

Member Function Documentation

◆ min_order()

static std::size_t min_order ( std::size_t  inputSize)
static

the minimum order required for the given input size

Definition at line 42 of file fastfouriertransform.hpp.

+ Here is the caller graph for this function:

◆ output_size()

std::size_t output_size ( ) const

The required size for the output vector.

Definition at line 59 of file fastfouriertransform.hpp.

+ Here is the caller graph for this function:

◆ transform()

void transform ( InputIterator  inBegin,
InputIterator  inEnd,
RandomAccessIterator  out 
) const

FFT transform.

The output sequence must be allocated by the user

Definition at line 66 of file fastfouriertransform.hpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ inverse_transform()

void inverse_transform ( InputIterator  inBegin,
InputIterator  inEnd,
RandomAccessIterator  out 
) const

Inverse FFT transform.

The output sequence must be allocated by the user.

Definition at line 74 of file fastfouriertransform.hpp.

+ Here is the call graph for this function:

◆ transform_impl()

void transform_impl ( InputIterator  inBegin,
InputIterator  inEnd,
RandomAccessIterator  out,
bool  inverse 
) const
private

Definition at line 83 of file fastfouriertransform.hpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bit_reverse()

static std::size_t bit_reverse ( std::size_t  x,
std::size_t  order 
)
staticprivate

Definition at line 112 of file fastfouriertransform.hpp.

+ Here is the caller graph for this function:

Member Data Documentation

◆ cs_

std::vector<double> cs_
private

Definition at line 80 of file fastfouriertransform.hpp.

◆ sn_

std::vector<double> sn_
private

Definition at line 80 of file fastfouriertransform.hpp.