TestAccuracy.h Example File
demos/spectrum/3rdparty/fftreal/TestAccuracy.h
#if ! defined (TestAccuracy_HEADER_INCLUDED)
#define TestAccuracy_HEADER_INCLUDED
#if defined (_MSC_VER)
#pragma once
#pragma warning (4 : 4250)
#endif
template <class FO>
class TestAccuracy
{
public:
typedef typename FO::DataType DataType;
typedef long double BigFloat;
static int perform_test_single_object (FO &fft);
static int perform_test_d (FO &fft, const char *class_name_0);
static int perform_test_i (FO &fft, const char *class_name_0);
static int perform_test_di (FO &fft, const char *class_name_0);
protected:
private:
enum { NBR_ACC_TESTS = 10 * 1000 * 1000 };
enum { MAX_NBR_TESTS = 10000 };
static void compute_tf (DataType s [], const DataType x [], long length);
static void compute_itf (DataType x [], const DataType s [], long length);
static int compare_vect_display (const DataType x_ptr [], const DataType y_ptr [], long len, BigFloat &max_err_rel);
static BigFloat
compute_power (const DataType x_ptr [], long len);
static BigFloat
compute_power (const DataType x_ptr [], const DataType y_ptr [], long len);
static void compare_vect (const DataType x_ptr [], const DataType y_ptr [], BigFloat &power, long &max_err_pos, long len);
private:
TestAccuracy ();
~TestAccuracy ();
TestAccuracy (const TestAccuracy &other);
TestAccuracy & operator = (const TestAccuracy &other);
bool operator == (const TestAccuracy &other);
bool operator != (const TestAccuracy &other);
};
#include "TestAccuracy.hpp"
#endif
[+] Documentation Feedback