36 Commits
wt2 ... master

Author SHA1 Message Date
51f9d39837 add installer 2023-11-30 20:46:53 -05:00
c4b7655ad4 tmp update 2022-12-17 10:21:33 +08:00
3415d6fc03 tmp update 2022-12-16 11:29:28 +08:00
172b4af8c4 tmp update 2022-12-15 09:37:20 +08:00
38a2cd7ccf tmp update 2022-03-16 08:48:41 +08:00
b9c140e5ef update cmakelists 2021-09-10 13:09:39 +08:00
ebd0f89493 update build system 2021-08-02 22:01:43 +08:00
张壹
adc77ebadf update build system 2021-08-01 09:26:33 +08:00
9b5e9db390 update build system 2021-08-01 08:43:34 +08:00
d001110e30 Merge branch 'master' of https://gitee.com/yizhangss/wavelib 2021-04-17 08:27:34 +08:00
312e624dc5 update cmakelists 2021-04-16 12:04:51 +08:00
yizhangss
7acb89acfc update cmakelists 2021-04-15 12:24:28 +08:00
yizhangss
53b5d140c9 update cmakelists 2021-04-15 10:54:21 +08:00
04d43c09ec update library 2021-04-14 20:19:48 +08:00
2421f6c543 delete test 2021-04-07 19:17:54 +08:00
24b48f4c9f add test gitignore 2021-04-07 19:16:03 +08:00
8a019e7e88 test complied 2021-04-06 23:58:43 +08:00
edf5790139 add build/ to gitignore 2021-04-06 23:36:36 +08:00
58b5604d3d initial compile on mac-pro 2020-11-13 17:15:38 +08:00
afcb53b797 update gitignore 2020-11-12 14:31:11 +08:00
fc537cea42 update cmakelists 2020-11-12 12:29:01 +08:00
becd7defec add gitignore 2020-11-09 10:29:20 +08:00
Rafat Hussain
a92456d2e2 Update README.md 2020-08-02 16:51:55 +05:30
Rafat Hussain
c7c9ba8b10 Merge branch 'myd7349-fix-uwp-build'
commit : UWP build error fixed
2020-05-29 13:33:52 +05:30
myd7349
d4351d7f1c no need to link against libm any more 2020-05-29 11:36:21 +08:00
myd7349
9d20de8d29 fix UWP build error
- fix the following UWP build errors caught by vcpkg's CI
  src\wavelib.c(3673): error C4703: potentially uninitialized local pointer variable 'out' used
  src\wavelib.c(3499): error C4703: potentially uninitialized local pointer variable 'wavecoeff' used
- move the definition of `out` variable to support old C89 compilers;
2020-05-29 11:15:25 +08:00
Rafat Hussain
f104d084be Merge branch 'myd7349-fix-cmake-install'
commit: fix-cmake pull request merged
2020-05-28 15:34:29 +05:30
myd7349
8d65cce75f link to libm if necessary 2020-05-28 10:24:23 +08:00
myd7349
1acc29c724 improve CMakeLists.txt
- only enable CXX when building unit tests;
- install wavelib and wauxlib archives;
- fix header files installation;
2020-05-28 10:24:23 +08:00
Rafat Hussain
cef10c1133 idwt2 issue taken care of 2019-10-22 18:39:56 +05:30
Rafat Hussain
f2bf77feb8 cleanup 2019-09-06 09:10:03 +05:30
Rafat Hussain
36f0d305c1 Merge pull request #13 from whyang2080/master
gamma replaced with cwt_gamma
2019-04-15 13:58:38 +05:30
Wei-Hsuan Yang
d76bd20573 gamma replaced with cwt_gamma 2019-04-15 13:34:27 +08:00
Rafat Hussain
1e597aaffa Update README.md 2019-04-08 17:48:19 +05:30
Rafat Hussain
782dc66e20 Update README.md 2019-04-08 17:39:22 +05:30
Rafat Hussain
e49f228771 gamma replaced with cwt_gamma 2019-04-08 16:40:15 +05:30
27 changed files with 210 additions and 133 deletions

8
.gitignore vendored
View File

@@ -33,4 +33,10 @@ language.settings.xml
*.tcl
#wavelib-specific
denoised.txt
denoised.txt
test/
build/
.vscode/
.DS_Store
*.sh

View File

@@ -1,51 +1,15 @@
cmake_minimum_required(VERSION 2.8.0 FATAL_ERROR)
cmake_minimum_required(VERSION 3.15.2)
# 设置工程名称和语言
project(WaveLib VERSION 1.0)
# 添加配置配件编写的函数
include(CMakePackageConfigHelpers)
set(PROJECT_NAME wavelib)
project(${PROJECT_NAME} CXX C)
# src root path
set(WAVELIB_SRC_ROOT ${PROJECT_SOURCE_DIR} CACHE PATH "Wavelib source root")
# binary output by default
set(COMMON_BIN_PATH ${CMAKE_BINARY_DIR}/Bin)
set(LIBRARY_OUTPUT_PATH ${COMMON_BIN_PATH}/${CMAKE_BUILD_TYPE})
set(EXECUTABLE_OUTPUT_PATH ${COMMON_BIN_PATH}/${CMAKE_BUILD_TYPE})
# set where to find additional cmake modules if any
set(CMAKE_MODULE_PATH ${WAVELIB_SRC_ROOT}/cmake ${CMAKE_MODULE_PATH})
set(WAVELIB_VERSION "1.0.0" CACHE STRING "Wavelib version" FORCE)
message(">>> Building Wavelib version: ${WAVELIB_VERSION}")
message(">>> EXECUTABLE_OUTPUT_PATH = ${EXECUTABLE_OUTPUT_PATH}")
option(BUILD_UT "Enable Unit test" ON)
# cleanup prefix lib for Unix-like OSes
set(CMAKE_SHARED_MODULE_PREFIX)
# install target to this folder by default
set(WAVELIB_BINARY_DIR ${WAVELIB_SRC_ROOT}/bin)
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "${WAVELIB_BINARY_DIR}" CACHE PATH "default install path" FORCE)
endif()
# make include globaly visible
set(PROJECT_WIDE_INCLUDE ${WAVELIB_SRC_ROOT}/include)
include_directories(${PROJECT_WIDE_INCLUDE})
include_directories(${COMMON_BIN_PATH})
if(BUILD_UT)
include(CTest)
enable_testing()
add_subdirectory(unitTests)
endif()
message(STATUS "Platform: " ${CMAKE_HOST_SYSTEM_NAME})
# CMake默认的安装路径 Windows下为C:/Program\ Files/${Project_Name} Linux/Unix下为/usr/local
message(STATUS "Install prefix: " ${CMAKE_INSTALL_PREFIX})
# CMake默认的变异类型为空
message(STATUS "Build type: " ${CMAKE_BUILD_TYPE})
# 添加源文件地址
add_subdirectory(src)
add_subdirectory(auxiliary)
add_subdirectory(test)
install(DIRECTORY ${WAVELIB_SRC_ROOT}/include/ DESTINATION include FILES_MATCHING PATTERN "*.h")
add_subdirectory(auxiliary)

View File

@@ -7,11 +7,11 @@ C Implementation of Discrete Wavelet Transform (DWT,SWT and MODWT), Continuous W
Discrete Wavelet Transform Methods Implemented
DWT/IDWT A decimated Discrete Wavelet Transform implementation using implicit signal extension and up/downsampling so it is a fast implementation. A FFT based implementation is optional but will not be usually needed. Both periodic and symmetric options are available.
DWT/IDWT and DWT2/IDWT2 A decimated Discrete Wavelet Transform implementation using implicit signal extension and up/downsampling so it is a fast implementation. A FFT based implementation is optional but will not be usually needed. Both periodic and symmetric options are available.
SWT/ISWT Stationary Wavelet Transform. It works only for signal lengths that are multiples of 2^J where J is the number of decomposition levels. For signals of other lengths see MODWT implementation.
SWT/ISWT and SWT2/ISWT2 Stationary Wavelet Transform. It works only for signal lengths that are multiples of 2^J where J is the number of decomposition levels. For signals of other lengths see MODWT implementation.
MODWT/IMODWT Maximal Overlap Discrete Wavelet Transform is another undecimated transform. It is implemented for signals of any length but only orthogonal wavelets (Daubechies, Symlets and Coiflets) can be deployed. This implementation is based on the method laid out in "Wavelet Methods For Wavelet Analysis" by Donald Percival and Andrew Walden.
MODWT/IMODWT and MODWT2/IMODWT2 Maximal Overlap Discrete Wavelet Transform is another undecimated transform. It is implemented for signals of any length but only orthogonal wavelets (Daubechies, Symlets and Coiflets) can be deployed. This implementation is based on the method laid out in "Wavelet Methods For Wavelet Analysis" by Donald Percival and Andrew Walden.
Discrete Wavelet Packet Transform Methods Implemented
@@ -23,7 +23,7 @@ CWT/ICWT C translation ( with some modifications) of Continuous Wavelet Transfo
Documentation Available at - https://github.com/rafat/wavelib/wiki
Live Demo (Emscripten) - http://rafat.github.io/wavelib/
Live Demo of 1D DWT and 1D CWT (Emscripten) - http://rafat.github.io/wavelib/
License - BSD 3-Clause

19
WaveLibConfig.cmake.in Normal file
View File

@@ -0,0 +1,19 @@
@PACKAGE_INIT@
set(@PROJECT_NAME@_VERSION "@PROJECT_VERSION@")
set_and_check(@PROJECT_NAME@_INSTALL_PREFIX "${PACKAGE_PREFIX_DIR}")
set_and_check(@PROJECT_NAME@_INC_DIR "${PACKAGE_PREFIX_DIR}/include")
set_and_check(@PROJECT_NAME@_INCULDE_DIR "${PACKAGE_PREFIX_DIR}/include")
set_and_check(@PROJECT_NAME@_LIB_DIR "${PACKAGE_PREFIX_DIR}/lib")
set_and_check(@PROJECT_NAME@_LIBRARY_DIR "${PACKAGE_PREFIX_DIR}/lib")
set(@PROJECT_NAME@_LIB wavelib)
set(@PROJECT_NAME@_LIBRARY wavelib)
set(WauxLib_LIB wauxlib)
set(WauxLib_LIBRARY wauxlib)
# include target information
include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake")
check_required_components(@PROJECT_NAME@)

View File

@@ -1,16 +1,55 @@
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
# 设定源文件文件夹
aux_source_directory(. WAUX_SRC)
set(SOURCE_FILES denoise.c
waux.c
)
# 以下部分为库的编译
# 注意目标名必须唯一 所以不能直接生成相同名称的动态库与静态库
# 注意此处不必为目标名称添加lib前缀和相应后缀cmake会自行添加
add_library(wauxlib SHARED ${WAUX_SRC})
# 首先添加静态库的生成命令
add_library(wauxlib_static STATIC ${WAUX_SRC})
# 设置静态库的输出名称从而获得与动态库名称相同的静态库
set_target_properties(wauxlib_static PROPERTIES OUTPUT_NAME "wauxlib")
# 设置输出目标属性以同时输出动态库与静态库
set_target_properties(wauxlib PROPERTIES CLEAN_DIRECT_OUTPUT 1)
set_target_properties(wauxlib_static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
# 设置动态库的版本号
set_target_properties(wauxlib PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR})
# 设置动态库的运行搜索地址
set_target_properties(wauxlib PROPERTIES INSTALL_RPATH /usr/local/lib)
set_target_properties(wauxlib_static PROPERTIES INSTALL_RPATH /usr/local/lib)
set(HEADER_FILES waux.h)
target_link_libraries(wauxlib PUBLIC wavelib)
target_link_libraries(wauxlib_static PUBLIC wavelib_static)
add_library(wauxlib STATIC ${SOURCE_FILES} ${HEADER_FILES})
# 设置库文件的输出地址
set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
target_link_libraries(wauxlib wavelib)
# 设置编译选项
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3")
set_property(TARGET wauxlib PROPERTY FOLDER "lib")
set(CONFIG_FILE_PATH lib/cmake/${PROJECT_NAME})
target_include_directories(wauxlib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
configure_package_config_file(${PROJECT_SOURCE_DIR}/${PROJECT_NAME}Config.cmake.in
${CMAKE_BINARY_DIR}/${PROJECT_NAME}Config.cmake
INSTALL_DESTINATION ${CONFIG_FILE_PATH})
write_basic_package_version_file(${CMAKE_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
VERSION ${PROJECT_VERSION}
COMPATIBILITY SameMajorVersion)
# 库的安装命令
if(WIN32)
install(TARGETS wauxlib DESTINATION lib)
install(TARGETS wauxlib_static DESTINATION lib)
else()
install(TARGETS wauxlib wauxlib_static
EXPORT ${PROJECT_NAME}Targets
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
install(EXPORT ${PROJECT_NAME}Targets
DESTINATION ${CONFIG_FILE_PATH})
install(FILES
${CMAKE_BINARY_DIR}/${PROJECT_NAME}Config.cmake
${CMAKE_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
DESTINATION ${CONFIG_FILE_PATH})
endif()

View File

@@ -4,7 +4,7 @@
#include <string.h>
#include "waux.h"
#include "wauxlib.h"
#include "../header/wauxlib.h"
denoise_object denoise_init(int length, int J,const char* wname) {
denoise_object obj = NULL;

View File

@@ -1,4 +1,4 @@
#include "wauxlib.h"
#include "../header/wauxlib.h"
#include "waux.h"
int compare_double(const void* a, const void* b)

54
installer Executable file
View File

@@ -0,0 +1,54 @@
#!/bin/bash
if [[ $# == 0 || ${1} == "help" ]]; then
echo "Compiles executables/libraries and maintains installed files. Two tools 'Cmake' and 'stow' are empolyed here. For more information, see https://cmake.org and https://www.gnu.org/software/stow/."
echo ""
echo "School of Earth Sciences, Zhejiang University"
echo "Yi Zhang (yizhang-geo@zju.edu.cn)"
echo ""
echo "Usage: ./config.sh [option] [Cmake options]"
echo ""
echo "Options:"
echo "(1) configure: Configure Cmake project(s). This option could take extra Cmake options as in <option>=<value>."
echo "(2) build: Build executables/libraries."
echo "(3) install: Install executables/libraries to the directory of CMAKE_INSTALL_PREFIX and sym-links them to the target address. This offers a quick and clean remove of the installed files."
echo "(4) clean: Clean build/ folder(s)."
echo "(5) uninstall: Delete the installed files and sym-links."
echo "(6) info: Print out current setups."
echo "(7) help: Show help information."
exit 0
fi
package=wavelib
address=/opt/stow
taress=/usr/local
option="-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${address}/${package}"
if [[ $# -gt 1 ]]; then
for opt in "$@"; do
if [[ ${opt} != "configure" ]]; then
option="${option} -D${opt}"
fi
done
fi
if [[ ${1} == "configure" && ! -d "build/" ]]; then
mkdir build && cd build && cmake .. ${option}
elif [[ ${1} == "configure" ]]; then
cd build && rm -rf * && cmake .. ${option}
elif [[ ${1} == "build" ]]; then
cd build && make
elif [[ ${1} == "install" ]]; then
cd build && sudo make install
sudo stow --dir=${address} --target=${taress} -S ${package}
elif [[ ${1} == "clean" ]]; then
rm -rf build/
elif [[ ${1} == "uninstall" ]]; then
sudo stow --dir=${address} --target=${taress} -D ${package}
sudo rm -rf ${address}/${package}
elif [[ ${1} == "info" ]]; then
echo "package name:" ${package}
echo "stow address:" ${address}
echo "target address:" ${taress}
echo "Cmake options:" ${option}
fi

View File

@@ -1,31 +1,55 @@
# 设定源文件文件夹
aux_source_directory(. WAVE_SRC)
# 以下部分为库的编译
# 注意目标名必须唯一 所以不能直接生成相同名称的动态库与静态库
# 注意此处不必为目标名称添加lib前缀和相应后缀cmake会自行添加
add_library(wavelib SHARED ${WAVE_SRC})
# 首先添加静态库的生成命令
add_library(wavelib_static STATIC ${WAVE_SRC})
# 设置静态库的输出名称从而获得与动态库名称相同的静态库
set_target_properties(wavelib_static PROPERTIES OUTPUT_NAME "wavelib")
# 设置输出目标属性以同时输出动态库与静态库
set_target_properties(wavelib PROPERTIES CLEAN_DIRECT_OUTPUT 1)
set_target_properties(wavelib_static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
# 设置动态库的版本号
set_target_properties(wavelib PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR})
# 设置动态库的运行搜索地址
set_target_properties(wavelib PROPERTIES INSTALL_RPATH /usr/local/lib)
set_target_properties(wavelib_static PROPERTIES INSTALL_RPATH /usr/local/lib)
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
# 设置库文件的输出地址
set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
set(SOURCE_FILES conv.c
cwt.c
cwtmath.c
hsfft.c
real.c
wavefilt.c
wavefunc.c
wavelib.c
wtmath.c
)
# 设置编译选项
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3")
set(HEADER_FILES conv.h
cwt.h
cwtmath.h
hsfft.h
real.h
wavefilt.h
wavefunc.h
wtmath.h
)
set(CONFIG_FILE_PATH lib/cmake/${PROJECT_NAME})
add_library(wavelib STATIC ${SOURCE_FILES} ${HEADER_FILES})
set_property(TARGET wavelib PROPERTY FOLDER "lib")
configure_package_config_file(${PROJECT_SOURCE_DIR}/${PROJECT_NAME}Config.cmake.in
${CMAKE_BINARY_DIR}/${PROJECT_NAME}Config.cmake
INSTALL_DESTINATION ${CONFIG_FILE_PATH})
target_include_directories(wavelib PUBLIC ${CMAKE_SOURCE_DIR}/header)
write_basic_package_version_file(${CMAKE_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
VERSION ${PROJECT_VERSION}
COMPATIBILITY SameMajorVersion)
# 库的安装命令
if(WIN32)
install(TARGETS wavelib DESTINATION lib)
install(TARGETS wavelib_static DESTINATION lib)
else()
install(TARGETS wavelib wavelib_static
EXPORT ${PROJECT_NAME}Targets
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
install(EXPORT ${PROJECT_NAME}Targets
DESTINATION ${CONFIG_FILE_PATH})
install(FILES
${CMAKE_BINARY_DIR}/${PROJECT_NAME}Config.cmake
${CMAKE_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
DESTINATION ${CONFIG_FILE_PATH})
endif()
# 头文件安装命令
install(FILES ../header/wavelib.h DESTINATION include)
install(FILES ../header/wauxlib.h DESTINATION include)

6
src/cwt.c Executable file → Normal file
View File

@@ -95,7 +95,7 @@ static void wave_function(int nk, double dt,int mother, double param,double scal
}
norm = sqrt(2.0*pi*scale1 / dt)*sqrt(1.0 / gamma(m + 0.50));
norm = sqrt(2.0*pi*scale1 / dt)*sqrt(1.0 / cwt_gamma(m + 0.50));
norm *= sign;
if (re == 1) {
@@ -267,8 +267,8 @@ void psi0(int mother, double param,double *val,int *real) {
else {
sign = 1;
}
coeff = sign * pow(2.0, (double)m / 2) / gamma(0.5);
*val = coeff * gamma(((double)m + 1.0) / 2.0) / sqrt(gamma(m + 0.50));
coeff = sign * pow(2.0, (double)m / 2) / cwt_gamma(0.5);
*val = coeff * cwt_gamma(((double)m + 1.0) / 2.0) / sqrt(cwt_gamma(m + 0.50));
}
else {
*val = 0;

0
src/cwt.h Executable file → Normal file
View File

2
src/cwtmath.c Executable file → Normal file
View File

@@ -155,7 +155,7 @@ int nint(double N) {
return i;
}
double gamma(double x) {
double cwt_gamma(double x) {
/*
* This C program code is based on W J Cody's fortran code.
* http://www.netlib.org/specfun/gamma

2
src/cwtmath.h Executable file → Normal file
View File

@@ -10,7 +10,7 @@ extern "C" {
void nsfft_exec(fft_object obj, fft_data *inp, fft_data *oup,double lb,double ub,double *w);// lb -lower bound, ub - upper bound, w - time or frequency grid (Size N)
double gamma(double x);
double cwt_gamma(double x);
int nint(double N);

View File

@@ -12,7 +12,7 @@
#include <math.h>
#include <string.h>
#include "wavelib.h"
#include "../header/wavelib.h"
#ifdef __cplusplus
extern "C" {

2
src/wavefunc.c Executable file → Normal file
View File

@@ -111,7 +111,7 @@ void gauss(int N,int p,double lb,double ub,double *psi,double *t) {
t[i] = lb + delta * i;
}
den = sqrt(gamma(p+0.5));
den = sqrt(cwt_gamma(p+0.5));
if ((p+1)%2 == 0) {
num = 1.0;

0
src/wavefunc.h Executable file → Normal file
View File

View File

@@ -8,7 +8,7 @@
#include <string.h>
#include "cwt.h"
#include "wavelib.h"
#include "../header/wavelib.h"
#include "wtmath.h"
wave_object wave_init(const char* wname) {
@@ -3353,7 +3353,7 @@ void setWTConv(wt_object wt, const char *cmethod) {
}
double* dwt2(wt2_object wt, double *inp) {
double *wavecoeff;
double *wavecoeff = NULL;
int i, J, iter, N, lp, rows_n, cols_n, rows_i, cols_i;
int ir, ic, istride,ostride;
int aLL, aLH, aHL, aHH, cdim,clen;
@@ -3504,11 +3504,11 @@ void idwt2(wt2_object wt, double *wavecoeff, double *oup) {
int istride, ostride, iter, J;
int aLL, aLH, aHL, aHH;
double *cL, *cH, *X_lp,*orig;
double *out = NULL;
rows = wt->rows;
cols = wt->cols;
J = wt->J;
double *out;
if (!strcmp(wt->ext, "per")) {
@@ -3628,7 +3628,7 @@ void idwt2(wt2_object wt, double *wavecoeff, double *oup) {
cL[(k - lf + 2)*ic + i] = X_lp[k];
}
idwt_per_stride(wavecoeff + aHL + i, ir, wavecoeff + aHH + i, wt->wave->lpr, wt->wave->hpr, lf, X_lp, istride, ostride);
idwt_sym_stride(wavecoeff + aHL + i, ir, wavecoeff + aHH + i, wt->wave->lpr, wt->wave->hpr, lf, X_lp, istride, ostride);
for (k = lf - 2; k < 2 * ir; ++k) {
cH[(k - lf + 2)*ic + i] = X_lp[k];
@@ -3640,7 +3640,7 @@ void idwt2(wt2_object wt, double *wavecoeff, double *oup) {
ostride = 1;
for (i = 0; i < ir; ++i) {
idwt_per_stride(cL + i*ic, ic, cH + i*ic, wt->wave->lpr, wt->wave->hpr, lf, X_lp, istride, ostride);
idwt_sym_stride(cL + i*ic, ic, cH + i*ic, wt->wave->lpr, wt->wave->hpr, lf, X_lp, istride, ostride);
for (k = lf - 2; k < 2 * ic; ++k) {
out[(k - lf + 2) + i*ic * 2] = X_lp[k];

View File

@@ -42,20 +42,6 @@ add_executable(modwt2test modwt2test.c)
target_link_libraries(modwt2test wavelib)
if(UNIX)
target_link_libraries(cwttest m)
target_link_libraries(dwttest m)
target_link_libraries(swttest m)
target_link_libraries(modwttest m)
target_link_libraries(dwpttest m)
target_link_libraries(wtreetest m)
target_link_libraries(denoisetest m)
target_link_libraries(modwtdenoisetest m)
target_link_libraries(dwt2test m)
target_link_libraries(swt2test m)
target_link_libraries(modwt2test m)
endif()
set_target_properties(cwttest dwttest swttest modwttest dwpttest wtreetest denoisetest modwtdenoisetest dwt2test swt2test modwt2test
PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/test"

0
test/dwt2test.c Executable file → Normal file
View File

0
test/modwt2test.c Executable file → Normal file
View File

0
test/modwtdenoisetest.c Executable file → Normal file
View File

0
test/sst_nino3.dat Executable file → Normal file
View File

0
test/swt2test.c Executable file → Normal file
View File

View File

@@ -1,5 +0,0 @@
#define BOOST_TEST_MODULE WaveLibTests
#include <boost/test/included/unit_test.hpp>

View File

@@ -1,10 +0,0 @@
#ifndef SWALLOWING_BOOSTTEST_H_
#define SWALLOWING_BOOSTTEST_H_
// we use the header only version of boost unit test
#define BOOST_TEST_NO_LIB
#include <boost/test/unit_test.hpp>
#endif // SWALLOWING_BOOSTTEST_H_

View File

@@ -16,7 +16,7 @@ add_dependencies(wavelibLibTests wavelib)
target_link_libraries(wavelibLibTests wavelib)
target_include_directories(wavelibLibTests PUBLIC
${CMAKE_SOURCE_DIR}/../../header
${CMAKE_CURRENT_SOURCE_DIR}/../../header
)

View File

@@ -10,7 +10,7 @@
#include <cstdlib>
#include <cstring>
#include "wavelib.h"
#include "../../header/wavelib.h"
#include<vector>
@@ -393,9 +393,9 @@ void MODWTReconstructionTest()
}
for (unsigned int direct_fft = 0; direct_fft < 2; direct_fft++)
for (unsigned int direct_fft = 0; direct_fft < 1; direct_fft++)
{
for (unsigned int sym_per = 0; sym_per < 2; sym_per++)
for (unsigned int sym_per = 0; sym_per < 1; sym_per++)
{
for (unsigned int j = 0; j < waveletNames.size(); j++)
{