![]() |
SOPT
Sparse OPTimisation
|
#include <catch2/catch_all.hpp>
#include <memory>
#include <random>
#include "sopt/types.h"
#include "sopt/wavelets/direct.h"
#include "sopt/wavelets/indirect.h"
#include "sopt/wavelets/wavelet_data.h"
#include "sopt/wavelets/wavelets.h"
Go to the source code of this file.
Typedefs | |
using | t_iVector = sopt::Array< sopt::t_uint > |
Functions | |
t_iVector | even (t_iVector const &x) |
t_iVector | odd (t_iVector const &x) |
template<typename T > | |
Eigen::Array< typename T::Scalar, T::RowsAtCompileTime, T::ColsAtCompileTime > | upsample (Eigen::ArrayBase< T > const &input) |
sopt::t_int | random_integer (sopt::t_int min, sopt::t_int max) |
t_iVector | random_ivector (sopt::t_int size, sopt::t_int min, sopt::t_int max) |
template<typename T0 > | |
void | check_round_trip (Eigen::ArrayBase< T0 > const &input_, sopt::t_uint db, sopt::t_uint nlevels=1) |
TEST_CASE ("wavelet data") | |
TEST_CASE ("Wavelet transform innards with integer data", "[wavelet]") | |
TEST_CASE ("1D wavelet transform with floating point data", "[wavelet]") | |
TEST_CASE ("1D wavelet transform with complex data", "[wavelet]") | |
TEST_CASE ("2D wavelet transform with real data", "[wavelet]") | |
TEST_CASE ("Functor implementation", "[wavelet]") | |
TEST_CASE ("Automatic input resizing", "[wavelet]") | |
TEST_CASE ("Dirac wavelets") | |
using t_iVector = sopt::Array<sopt::t_uint> |
Definition at line 11 of file wavelets.cc.
void check_round_trip | ( | Eigen::ArrayBase< T0 > const & | input_, |
sopt::t_uint | db, | ||
sopt::t_uint | nlevels = 1 |
||
) |
Definition at line 49 of file wavelets.cc.
References sopt::wavelets::daubechies_data(), sopt::wavelets::direct_transform(), and sopt::wavelets::indirect_transform().
Referenced by TEST_CASE().
sopt::t_int random_integer | ( | sopt::t_int | min, |
sopt::t_int | max | ||
) |
Definition at line 34 of file wavelets.cc.
References mersenne().
Referenced by TEST_CASE().
t_iVector random_ivector | ( | sopt::t_int | size, |
sopt::t_int | min, | ||
sopt::t_int | max | ||
) |
TEST_CASE | ( | "1D wavelet transform with complex data" | , |
"" | [wavelet] | ||
) |
Definition at line 244 of file wavelets.cc.
References sopt::wavelets::daubechies_data(), sopt::wavelets::direct_transform(), sopt::wavelets::indirect_transform(), and random_integer().
TEST_CASE | ( | "1D wavelet transform with floating point data" | , |
"" | [wavelet] | ||
) |
Definition at line 189 of file wavelets.cc.
References check_round_trip(), sopt::wavelets::daubechies_data(), sopt::wavelets::direct_transform(), sopt::wavelets::indirect_transform(), n, random_integer(), and upsample().
TEST_CASE | ( | "2D wavelet transform with real data" | , |
"" | [wavelet] | ||
) |
Definition at line 256 of file wavelets.cc.
References check_round_trip(), n, N, and random_integer().
TEST_CASE | ( | "Automatic input resizing" | , |
"" | [wavelet] | ||
) |
Definition at line 295 of file wavelets.cc.
References sopt::wavelets::factory().
TEST_CASE | ( | "Dirac wavelets" | ) |
TEST_CASE | ( | "Functor implementation" | , |
"" | [wavelet] | ||
) |
Definition at line 278 of file wavelets.cc.
References sopt::wavelets::direct_transform(), and sopt::wavelets::factory().
TEST_CASE | ( | "wavelet data" | ) |
TEST_CASE | ( | "Wavelet transform innards with integer data" | , |
"" | [wavelet] | ||
) |
Definition at line 71 of file wavelets.cc.
References a, b, even(), odd(), random_integer(), random_ivector(), and upsample().
Eigen::Array<typename T::Scalar, T::RowsAtCompileTime, T::ColsAtCompileTime> upsample | ( | Eigen::ArrayBase< T > const & | input | ) |
Definition at line 23 of file wavelets.cc.
Referenced by TEST_CASE().