Compare commits
15 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
cb3a9ad29b | ||
![]() |
6a70d98453 | ||
![]() |
4f005e86c2 | ||
![]() |
a4f975b5e5 | ||
![]() |
7079f43a03 | ||
![]() |
55b1ec9159 | ||
![]() |
9e08b4e93a | ||
![]() |
32dab0c338 | ||
![]() |
709e25493b | ||
![]() |
04febc4494 | ||
![]() |
20d02a6b14 | ||
![]() |
2501d6fc68 | ||
![]() |
5d7d9af435 | ||
![]() |
65cbe6e418 | ||
![]() |
4645c9b8b9 |
42
.gitignore
vendored
42
.gitignore
vendored
@ -1,42 +0,0 @@
|
||||
#Folders Ignore
|
||||
Bin/
|
||||
Testing/
|
||||
.vscode/
|
||||
|
||||
#cmake ignore
|
||||
CMakeCache.txt
|
||||
CMakeFiles/
|
||||
CMakeScripts/
|
||||
Makefile/
|
||||
cmake_install.cmake
|
||||
install_manifest.txt
|
||||
CTestTestfile.cmake
|
||||
Makefile
|
||||
|
||||
#yml
|
||||
*.yml
|
||||
|
||||
#Compiled
|
||||
*.a
|
||||
*.o
|
||||
*.lib
|
||||
*.so
|
||||
*.exe
|
||||
*.dll
|
||||
|
||||
#Eclipse
|
||||
.project
|
||||
.cproject
|
||||
language.settings.xml
|
||||
|
||||
#tcl
|
||||
*.tcl
|
||||
|
||||
#wavelib-specific
|
||||
denoised.txt
|
||||
|
||||
test/
|
||||
build/
|
||||
.vscode/
|
||||
.DS_Store
|
||||
*.sh
|
33
.travis.yml
33
.travis.yml
@ -1,33 +0,0 @@
|
||||
sudo: false
|
||||
language: c
|
||||
os:
|
||||
- linux
|
||||
- osx
|
||||
|
||||
compiler:
|
||||
- gcc
|
||||
- clang
|
||||
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
matrix:
|
||||
allow_failures:
|
||||
- compiler: clang
|
||||
|
||||
before_install:
|
||||
# linux prereqisite packages
|
||||
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then wget --no-check-certificate https://www.cmake.org/files/v3.2/cmake-3.2.3-Linux-x86_64.tar.gz; fi
|
||||
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then tar -xzvf cmake-3.2.3-Linux-x86_64.tar.gz; fi
|
||||
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then export PATH=$PWD/cmake-3.2.3-Linux-x86_64/bin:$PATH; fi
|
||||
|
||||
before_script:
|
||||
|
||||
|
||||
script:
|
||||
- mkdir build.ci && cd build.ci
|
||||
- cmake .. -DBUILD_UT=ON -DCMAKE_BUILD_TYPE=$BUILD_CONFIG -DUSE_STATIC_BOOST=YES
|
||||
- cmake --build .
|
||||
- ctest -VV
|
@ -1,15 +0,0 @@
|
||||
cmake_minimum_required(VERSION 3.15.2)
|
||||
# 设置工程名称和语言
|
||||
project(WaveLib VERSION 1.0)
|
||||
# 添加配置配件编写的函数
|
||||
include(CMakePackageConfigHelpers)
|
||||
|
||||
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)
|
@ -1,5 +1,4 @@
|
||||
Copyright (c) 2014, Rafat Hussain
|
||||
Copyright (c) 2016, Holger Nahrstaedt
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
22
README.md
22
README.md
@ -1,29 +1,19 @@
|
||||
[](https://travis-ci.org/rafat/wavelib)
|
||||
|
||||
wavelib
|
||||
=======
|
||||
|
||||
C Implementation of Discrete Wavelet Transform (DWT,SWT and MODWT), Continuous Wavelet transform (CWT) and Discrete Packet Transform ( Full Tree Decomposition and Best Basis DWPT).
|
||||
C Implementation of Wavelet Transform (DWT,SWT and MODWT)
|
||||
|
||||
Discrete Wavelet Transform Methods Implemented
|
||||
Methods Implemented
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
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
|
||||
|
||||
WTREE A Fully Decimated Wavelet Tree Decomposition. This is a highly redundant transform and retains all coefficients at each node. This is not recommended for compression and denoising applications.
|
||||
|
||||
DWPT/IDWPT Is a derivative of WTREE method which retains coefficients based on entropy methods. This is a non-redundant transform and output length is of the same order as the input.
|
||||
|
||||
CWT/ICWT C translation ( with some modifications) of Continuous Wavelet Transform Software provided by C. Torrence and G. Compo, and is available at URL: http://atoc.colorado.edu/research/wavelets/'. A generalized Inverse Transform with approximate reconstruction is also added.
|
||||
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.
|
||||
|
||||
Documentation Available at - https://github.com/rafat/wavelib/wiki
|
||||
|
||||
Live Demo of 1D DWT and 1D CWT (Emscripten) - http://rafat.github.io/wavelib/
|
||||
Live Demo (Emscripten) - http://rafat.github.io/wavelib/
|
||||
|
||||
License - BSD 3-Clause
|
||||
|
||||
|
@ -1,19 +0,0 @@
|
||||
@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@)
|
27
about.html
Normal file
27
about.html
Normal file
@ -0,0 +1,27 @@
|
||||
<div data-ng-controller="TabsController">
|
||||
<tabset justified="true" type="pills">
|
||||
<tab heading="About">
|
||||
<br/>
|
||||
<p>Wavelib is a web implementation of C/C++ 1D Wavelet Transform codebase using Emscripten and javascript.</p>
|
||||
<br/>
|
||||
<p><b>Requirements</b> : HTML5 compliant modern web browser with javascript enabled. This webapp uses asm.js and angularjs that are not compatible with
|
||||
older browsers. Internet Explorer >= 10.0</p>
|
||||
<br/>
|
||||
<p><b>Inputs</b> : You can enter the data vector using either the file input interface or data input interface. In either case, the input is just a
|
||||
one dimensional data vector consisting only of numbers and only including common separators like commas or spaces. </p>
|
||||
</tab>
|
||||
<tab heading="Code">
|
||||
<br/>
|
||||
<p><b>C/C++ Codebase</b> is available at <a href="http://rafat.github.io/#/sites/wavelib/front" target="_blank">my github page</a></p>
|
||||
<br/>
|
||||
</tab>
|
||||
<tab heading="Thanks">
|
||||
<br/>
|
||||
<ul>
|
||||
<li><b>Emscripten</b> : <a href="https://kripken.github.io/emscripten-site/" target="_blank">https://kripken.github.io/emscripten-site/</a></li>
|
||||
<li><b>Angularjs</b> : <a href="https://angularjs.org" target="_blank">https://angularjs.org</a></a></li>
|
||||
<li><b>Plotly</b> : <a href="http://plot.ly/" target="_blank">http://plot.ly/</a></a></li>
|
||||
</ul>
|
||||
</tab>
|
||||
</tabset>
|
||||
</div>
|
16
appveyor.yml
16
appveyor.yml
@ -1,16 +0,0 @@
|
||||
os: Visual Studio 2015
|
||||
|
||||
platform: x64
|
||||
|
||||
environment:
|
||||
BOOST_ROOT: C:\Libraries\boost_1_59_0
|
||||
BOOST_LIBRARYDIR: C:\Libraries\boost_1_59_0\lib64-msvc-14.0
|
||||
|
||||
build_script:
|
||||
- mkdir build
|
||||
- cd build
|
||||
- cmake -G "Visual Studio 14 2015 Win64" -DUSE_STATIC_BOOST=NO ..
|
||||
- cmake --build . --config Debug
|
||||
|
||||
test_script:
|
||||
- ctest -VV -C Debug
|
@ -1,55 +0,0 @@
|
||||
# 设定源文件文件夹
|
||||
aux_source_directory(. WAUX_SRC)
|
||||
|
||||
# 以下部分为库的编译
|
||||
# 注意目标名必须唯一 所以不能直接生成相同名称的动态库与静态库
|
||||
# 注意此处不必为目标名称添加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)
|
||||
|
||||
target_link_libraries(wauxlib PUBLIC wavelib)
|
||||
target_link_libraries(wauxlib_static PUBLIC wavelib_static)
|
||||
|
||||
# 设置库文件的输出地址
|
||||
set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
|
||||
|
||||
# 设置编译选项
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3")
|
||||
|
||||
set(CONFIG_FILE_PATH lib/cmake/${PROJECT_NAME})
|
||||
|
||||
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()
|
@ -1,489 +0,0 @@
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "waux.h"
|
||||
#include "../header/wauxlib.h"
|
||||
|
||||
denoise_object denoise_init(int length, int J,const char* wname) {
|
||||
denoise_object obj = NULL;
|
||||
|
||||
obj = (denoise_object)malloc(sizeof(struct denoise_set) +sizeof(double));
|
||||
|
||||
obj->N = length;
|
||||
obj->J = J;
|
||||
|
||||
strcpy(obj->wname,wname);
|
||||
|
||||
//Set Default Values
|
||||
strcpy(obj->dmethod,"sureshrink");
|
||||
strcpy(obj->ext,"sym");
|
||||
strcpy(obj->level,"all");
|
||||
strcpy(obj->thresh,"soft");
|
||||
strcpy(obj->wmethod,"dwt");
|
||||
strcpy(obj->cmethod,"direct");
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
void visushrink(double *signal,int N,int J,const char *wname,const char *method,const char *ext,const char *thresh,const char *level,double *denoised) {
|
||||
int filt_len,iter,i,dlen,dwt_len,sgn, MaxIter,it;
|
||||
double sigma,td,tmp;
|
||||
wave_object wave;
|
||||
wt_object wt;
|
||||
double *dout,*lnoise;
|
||||
|
||||
wave = wave_init(wname);
|
||||
|
||||
filt_len = wave->filtlength;
|
||||
|
||||
MaxIter = (int) (log((double)N / ((double)filt_len - 1.0)) / log(2.0));
|
||||
|
||||
if (J > MaxIter) {
|
||||
printf("\n Error - The Signal Can only be iterated %d times using this wavelet. Exiting\n",MaxIter);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
wt = wt_init(wave,method,N,J);
|
||||
if(!strcmp(method,"dwt")) {
|
||||
setDWTExtension(wt,ext);
|
||||
dwt(wt,signal);
|
||||
} else if(!strcmp(method,"swt")) {
|
||||
swt(wt,signal);
|
||||
} else {
|
||||
printf("Acceptable WT methods are - dwt,swt and modwt\n");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
lnoise = (double*)malloc(sizeof(double) * J);
|
||||
|
||||
//Set sigma
|
||||
|
||||
iter = wt->length[0];
|
||||
dlen = wt->length[J];
|
||||
|
||||
dout = (double*)malloc(sizeof(double) * dlen);
|
||||
|
||||
if(!strcmp(level,"first")) {
|
||||
for (i = 1; i < J; ++i) {
|
||||
iter += wt->length[i];
|
||||
}
|
||||
|
||||
for(i = 0; i < dlen;++i) {
|
||||
dout[i] = fabs(wt->output[iter+i]);
|
||||
}
|
||||
|
||||
sigma = median(dout,dlen) / 0.6745;
|
||||
for(it = 0; it < J;++it) {
|
||||
lnoise[it] = sigma;
|
||||
}
|
||||
} else if(!strcmp(level,"all")){
|
||||
for(it = 0; it < J;++it) {
|
||||
dlen = wt->length[it+1];
|
||||
for(i = 0; i < dlen;++i) {
|
||||
dout[i] = fabs(wt->output[iter+i]);
|
||||
}
|
||||
sigma = median(dout,dlen) / 0.6745;
|
||||
lnoise[it] = sigma;
|
||||
iter += dlen;
|
||||
}
|
||||
|
||||
} else {
|
||||
printf("Acceptable Noise estimation level values are - first and all \n");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
dwt_len = wt->outlength;
|
||||
iter = wt->length[0];
|
||||
for(it = 0; it < J;++it) {
|
||||
sigma = lnoise[it];
|
||||
dlen = wt->length[it+1];
|
||||
td = sqrt(2.0 * log(dwt_len)) * sigma;
|
||||
|
||||
if(!strcmp(thresh,"hard")) {
|
||||
for(i = 0; i < dlen;++i) {
|
||||
if (fabs(wt->output[iter+i]) < td) {
|
||||
wt->output[iter+i] = 0;
|
||||
}
|
||||
}
|
||||
} else if(!strcmp(thresh,"soft")) {
|
||||
for(i = 0; i < dlen;++i) {
|
||||
if (fabs(wt->output[iter + i]) < td) {
|
||||
wt->output[iter+i] = 0;
|
||||
} else {
|
||||
sgn = wt->output[iter+i] >= 0 ? 1 : -1;
|
||||
tmp = sgn * (fabs(wt->output[iter+i]) - td);
|
||||
wt->output[iter+i] = tmp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
iter += wt->length[it+1];
|
||||
}
|
||||
|
||||
if(!strcmp(method,"dwt")) {
|
||||
idwt(wt,denoised);
|
||||
} else if(!strcmp(method,"swt")) {
|
||||
iswt(wt,denoised);
|
||||
}
|
||||
|
||||
free(dout);
|
||||
free(lnoise);
|
||||
wave_free(wave);
|
||||
wt_free(wt);
|
||||
}
|
||||
|
||||
void sureshrink(double *signal,int N,int J,const char *wname,const char *method,const char *ext,const char *thresh,const char *level,double *denoised) {
|
||||
int filt_len,i,it,len,dlen,dwt_len,min_index,sgn, MaxIter,iter;
|
||||
double sigma,norm,td,tv,te,ct,thr,temp,x_sum;
|
||||
wave_object wave;
|
||||
wt_object wt;
|
||||
double *dout,*risk,*dsum,*lnoise;
|
||||
|
||||
wave = wave_init(wname);
|
||||
|
||||
filt_len = wave->filtlength;
|
||||
|
||||
MaxIter = (int) (log((double)N / ((double)filt_len - 1.0)) / log(2.0));
|
||||
// Depends on J
|
||||
if (J > MaxIter) {
|
||||
printf("\n Error - The Signal Can only be iterated %d times using this wavelet. Exiting\n",MaxIter);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
wt = wt_init(wave,method,N,J);
|
||||
|
||||
if(!strcmp(method,"dwt")) {
|
||||
setDWTExtension(wt,ext);
|
||||
dwt(wt,signal);
|
||||
} else if(!strcmp(method,"swt")) {
|
||||
swt(wt,signal);
|
||||
} else {
|
||||
printf("Acceptable WT methods are - dwt and swt\n");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
len = wt->length[0];
|
||||
dlen = wt->length[J];
|
||||
|
||||
dout = (double*)malloc(sizeof(double) * dlen);
|
||||
risk = (double*)malloc(sizeof(double) * dlen);
|
||||
dsum = (double*)malloc(sizeof(double) * dlen);
|
||||
lnoise = (double*)malloc(sizeof(double) * J);
|
||||
|
||||
iter = wt->length[0];
|
||||
|
||||
if(!strcmp(level,"first")) {
|
||||
for (i = 1; i < J; ++i) {
|
||||
iter += wt->length[i];
|
||||
}
|
||||
|
||||
for(i = 0; i < dlen;++i) {
|
||||
dout[i] = fabs(wt->output[iter+i]);
|
||||
}
|
||||
|
||||
sigma = median(dout,dlen) / 0.6745;
|
||||
for(it = 0; it < J;++it) {
|
||||
lnoise[it] = sigma;
|
||||
}
|
||||
} else if(!strcmp(level,"all")){
|
||||
for(it = 0; it < J;++it) {
|
||||
dlen = wt->length[it+1];
|
||||
for(i = 0; i < dlen;++i) {
|
||||
dout[i] = fabs(wt->output[iter+i]);
|
||||
}
|
||||
sigma = median(dout,dlen) / 0.6745;
|
||||
lnoise[it] = sigma;
|
||||
iter += dlen;
|
||||
}
|
||||
|
||||
} else {
|
||||
printf("Acceptable Noise estimation level values are - first and all \n");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
|
||||
for(it = 0; it < J;++it) {
|
||||
dwt_len = wt->length[it+1];
|
||||
sigma = lnoise[it];
|
||||
|
||||
if ( sigma < 0.00000001) {
|
||||
td = 0;
|
||||
} else {
|
||||
tv = sqrt(2.0 * log(dwt_len));
|
||||
norm = 0.0;
|
||||
for(i = 0; i < dwt_len;++i) {
|
||||
norm += (wt->output[len+i] *wt->output[len+i] /(sigma*sigma));
|
||||
}
|
||||
te =(norm - (double) dwt_len)/(double) dwt_len;
|
||||
ct = pow(log((double) dwt_len)/log(2.0),1.5)/sqrt((double) dwt_len);
|
||||
|
||||
if (te < ct) {
|
||||
td = tv;
|
||||
} else {
|
||||
x_sum = 0.0;
|
||||
|
||||
for(i = 0; i < dwt_len;++i) {
|
||||
dout[i] = fabs(wt->output[len+i]/sigma);
|
||||
}
|
||||
|
||||
qsort(dout, dwt_len, sizeof(double), compare_double);
|
||||
for(i = 0; i < dwt_len;++i) {
|
||||
dout[i] = (dout[i]*dout[i]);
|
||||
x_sum += dout[i];
|
||||
dsum[i] = x_sum;
|
||||
}
|
||||
|
||||
for(i = 0;i < dwt_len;++i) {
|
||||
risk[i] = ((double)dwt_len - 2 * ((double)i + 1) +dsum[i] +
|
||||
dout[i]*((double)dwt_len - 1 -(double) i))/(double)dwt_len;
|
||||
}
|
||||
min_index = minindex(risk,dwt_len);
|
||||
thr = sqrt(dout[min_index]);
|
||||
td = thr < tv ? thr : tv;
|
||||
}
|
||||
}
|
||||
|
||||
td = td * sigma;
|
||||
|
||||
if(!strcmp(thresh,"hard")) {
|
||||
for(i = 0; i < dwt_len;++i) {
|
||||
if (fabs(wt->output[len+i]) < td) {
|
||||
wt->output[len+i] = 0;
|
||||
}
|
||||
}
|
||||
} else if(!strcmp(thresh,"soft")) {
|
||||
for(i = 0; i < dwt_len;++i) {
|
||||
if (fabs(wt->output[len + i]) < td) {
|
||||
wt->output[len+i] = 0;
|
||||
} else {
|
||||
sgn = wt->output[len+i] >= 0 ? 1 : -1;
|
||||
temp = sgn * (fabs(wt->output[len+i]) - td);
|
||||
wt->output[len+i] = temp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
len += wt->length[it+1];
|
||||
}
|
||||
|
||||
if(!strcmp(method,"dwt")) {
|
||||
idwt(wt,denoised);
|
||||
} else if(!strcmp(method,"swt")) {
|
||||
iswt(wt,denoised);
|
||||
}
|
||||
free(dout);
|
||||
free(dsum);
|
||||
free(risk);
|
||||
free(lnoise);
|
||||
wave_free(wave);
|
||||
wt_free(wt);
|
||||
}
|
||||
|
||||
void modwtshrink(double *signal, int N, int J, const char *wname, const char *cmethod, const char *ext, const char *thresh, double *denoised) {
|
||||
int filt_len, iter, i, dlen, sgn, MaxIter, it;
|
||||
double sigma, td, tmp, M, llen;
|
||||
wave_object wave;
|
||||
wt_object wt;
|
||||
double *dout, *lnoise;
|
||||
|
||||
wave = wave_init(wname);
|
||||
|
||||
filt_len = wave->filtlength;
|
||||
|
||||
MaxIter = (int)(log((double)N / ((double)filt_len - 1.0)) / log(2.0));
|
||||
|
||||
if (J > MaxIter) {
|
||||
printf("\n Error - The Signal Can only be iterated %d times using this wavelet. Exiting\n", MaxIter);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
wt = wt_init(wave, "modwt", N, J);
|
||||
|
||||
if (!strcmp(ext, "sym") && !strcmp(cmethod,"fft")) {
|
||||
setWTConv(wt, "fft");
|
||||
setDWTExtension(wt, "sym");
|
||||
}
|
||||
else if (!strcmp(ext, "sym") && !strcmp(cmethod, "direct")) {
|
||||
printf("Symmetric Extension is not available for direct method");
|
||||
exit(-1);
|
||||
}
|
||||
else if (!strcmp(ext, "per") && !strcmp(cmethod, "direct")) {
|
||||
setWTConv(wt, "direct");
|
||||
setDWTExtension(wt, "per");
|
||||
}
|
||||
else if (!strcmp(ext, "per") && !strcmp(cmethod, "fft")) {
|
||||
setWTConv(wt, "fft");
|
||||
setDWTExtension(wt, "per");
|
||||
}
|
||||
else {
|
||||
printf("Signal extension can be either per or sym");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
modwt(wt, signal);
|
||||
|
||||
lnoise = (double*)malloc(sizeof(double)* J);
|
||||
|
||||
//Set sigma
|
||||
|
||||
iter = wt->length[0];
|
||||
dlen = wt->length[J];
|
||||
dout = (double*)malloc(sizeof(double)* dlen);
|
||||
|
||||
for (it = 0; it < J; ++it) {
|
||||
dlen = wt->length[it + 1];
|
||||
for (i = 0; i < dlen; ++i) {
|
||||
dout[i] = fabs(wt->output[iter + i]);
|
||||
}
|
||||
|
||||
sigma = sqrt(2.0) * median(dout, dlen) / 0.6745;
|
||||
lnoise[it] = sigma;
|
||||
iter += dlen;
|
||||
}
|
||||
|
||||
M = pow(2.0,J);
|
||||
llen = log((double)wt->modwtsiglength);
|
||||
// Thresholding
|
||||
|
||||
iter = wt->length[0];
|
||||
for (it = 0; it < J; ++it) {
|
||||
sigma = lnoise[it];
|
||||
dlen = wt->length[it + 1];
|
||||
td = sqrt(2.0 * llen / M) * sigma;
|
||||
|
||||
if (!strcmp(thresh, "hard")) {
|
||||
for (i = 0; i < dlen; ++i) {
|
||||
if (fabs(wt->output[iter + i]) < td) {
|
||||
wt->output[iter + i] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (!strcmp(thresh, "soft")) {
|
||||
for (i = 0; i < dlen; ++i) {
|
||||
if (fabs(wt->output[iter + i]) < td) {
|
||||
wt->output[iter + i] = 0;
|
||||
}
|
||||
else {
|
||||
sgn = wt->output[iter + i] >= 0 ? 1 : -1;
|
||||
tmp = sgn * (fabs(wt->output[iter + i]) - td);
|
||||
wt->output[iter + i] = tmp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
iter += wt->length[it + 1];
|
||||
M /= 2.0;
|
||||
}
|
||||
|
||||
imodwt(wt, denoised);
|
||||
|
||||
free(dout);
|
||||
free(lnoise);
|
||||
wave_free(wave);
|
||||
wt_free(wt);
|
||||
}
|
||||
|
||||
|
||||
void denoise(denoise_object obj, double *signal,double *denoised) {
|
||||
if(!strcmp(obj->dmethod,"sureshrink")) {
|
||||
if (!strcmp(obj->wmethod, "modwt")) {
|
||||
printf("sureshrink method only works with swt and dwt. Please use setDenoiseWTMethod to set the correct method\n");
|
||||
exit(-1);
|
||||
}
|
||||
sureshrink(signal,obj->N,obj->J,obj->wname,obj->wmethod,obj->ext,obj->thresh,obj->level,denoised);
|
||||
} else if(!strcmp(obj->dmethod,"visushrink")) {
|
||||
if (!strcmp(obj->wmethod, "modwt")) {
|
||||
printf("visushrink method only works with swt and dwt. Please use setDenoiseWTMethod to set the correct method\n");
|
||||
exit(-1);
|
||||
}
|
||||
visushrink(signal,obj->N,obj->J,obj->wname,obj->wmethod,obj->ext,obj->thresh,obj->level,denoised);;
|
||||
} else if(!strcmp(obj->dmethod,"modwtshrink")) {
|
||||
if (strcmp(obj->wmethod, "modwt")) {
|
||||
printf("modwtshrink method only works with modwt. Please use setDenoiseWTMethod to set the correct method\n");
|
||||
exit(-1);
|
||||
}
|
||||
modwtshrink(signal,obj->N,obj->J,obj->wname,obj->cmethod,obj->ext,obj->thresh,denoised);;
|
||||
} else {
|
||||
printf("Acceptable Denoising methods are - sureshrink and visushrink\n");
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
|
||||
void setDenoiseMethod(denoise_object obj, const char *dmethod) {
|
||||
if (!strcmp(dmethod, "sureshrink")) {
|
||||
strcpy(obj->dmethod, "sureshrink");
|
||||
}
|
||||
else if (!strcmp(dmethod, "visushrink")) {
|
||||
strcpy(obj->dmethod, "visushrink");
|
||||
}
|
||||
else if (!strcmp(dmethod, "modwtshrink")) {
|
||||
strcpy(obj->dmethod, "modwtshrink");
|
||||
}
|
||||
else {
|
||||
printf("Acceptable Denoising methods are - sureshrink, visushrink and modwtshrink\n");
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
|
||||
void setDenoiseWTMethod(denoise_object obj, const char *wmethod) {
|
||||
if (!strcmp(wmethod, "dwt")) {
|
||||
strcpy(obj->wmethod, "dwt");
|
||||
}
|
||||
else if (!strcmp(wmethod, "swt")) {
|
||||
strcpy(obj->wmethod, "swt");
|
||||
}
|
||||
else if (!strcmp(wmethod, "modwt")) {
|
||||
strcpy(obj->wmethod, "modwt");
|
||||
}
|
||||
else {
|
||||
printf("Wavelet decomposition method can be one of dwt, modwt or swt.\n");
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
|
||||
void setDenoiseWTExtension(denoise_object obj, const char *extension) {
|
||||
if (!strcmp(extension, "sym")) {
|
||||
strcpy(obj->ext, "sym");
|
||||
}
|
||||
else if (!strcmp(extension, "per")) {
|
||||
strcpy(obj->ext, "per");
|
||||
}
|
||||
else {
|
||||
printf("Signal extension can be either per or sym");
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
|
||||
void setDenoiseParameters(denoise_object obj, const char *thresh,const char *level) {
|
||||
|
||||
//Set thresholding
|
||||
if (!strcmp(thresh, "soft")) {
|
||||
strcpy(obj->thresh, "soft");
|
||||
}
|
||||
else if (!strcmp(thresh, "hard")) {
|
||||
strcpy(obj->thresh, "hard");
|
||||
}
|
||||
else {
|
||||
printf("Thresholding Method - soft or hard");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
// Set Noise estimation at the first level or at all levels
|
||||
|
||||
if (!strcmp(level, "first")) {
|
||||
strcpy(obj->level, "first");
|
||||
}
|
||||
else if (!strcmp(level, "all")) {
|
||||
strcpy(obj->level, "all");
|
||||
}
|
||||
else {
|
||||
printf("Noise Estimation at level - first or all");
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
|
||||
void denoise_free(denoise_object object) {
|
||||
free(object);
|
||||
}
|
324
auxiliary/waux.c
324
auxiliary/waux.c
@ -1,324 +0,0 @@
|
||||
#include "../header/wauxlib.h"
|
||||
#include "waux.h"
|
||||
|
||||
int compare_double(const void* a, const void* b)
|
||||
{
|
||||
double arg1 = *(const double*)a;
|
||||
double arg2 = *(const double*)b;
|
||||
|
||||
if (arg1 < arg2) return -1;
|
||||
if (arg1 > arg2) return 1;
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
double mean(const double* vec, int N) {
|
||||
int i;
|
||||
double m;
|
||||
m = 0.0;
|
||||
|
||||
for (i = 0; i < N; ++i) {
|
||||
m+= vec[i];
|
||||
}
|
||||
m = m / N;
|
||||
return m;
|
||||
}
|
||||
|
||||
double var(const double* vec, int N) {
|
||||
double v,temp,m;
|
||||
int i;
|
||||
v = 0.0;
|
||||
m = mean(vec,N);
|
||||
|
||||
for (i = 0; i < N; ++i) {
|
||||
temp = vec[i] - m;
|
||||
v+= temp*temp;
|
||||
}
|
||||
|
||||
v = v / N;
|
||||
|
||||
return v;
|
||||
|
||||
}
|
||||
|
||||
double median(double *x, int N) {
|
||||
double sigma;
|
||||
|
||||
qsort(x, N, sizeof(double), compare_double);
|
||||
|
||||
if ((N % 2) == 0) {
|
||||
sigma = (x[N/2 - 1] + x[N/2] ) / 2.0;
|
||||
} else {
|
||||
sigma = x[N/2];
|
||||
}
|
||||
|
||||
return sigma;
|
||||
}
|
||||
|
||||
double mad(double *x, int N) {
|
||||
double sigma;
|
||||
int i;
|
||||
|
||||
sigma = median(x,N);
|
||||
|
||||
for(i = 0; i < N;++i) {
|
||||
x[i] = (x[i] - sigma) > 0 ? (x[i] - sigma) : -(x[i] - sigma);
|
||||
}
|
||||
|
||||
sigma = median(x,N);
|
||||
|
||||
return sigma;
|
||||
}
|
||||
|
||||
int minindex(const double *arr, int N) {
|
||||
double min;
|
||||
int index,i;
|
||||
|
||||
min = DBL_MAX;
|
||||
index = 0;
|
||||
for(i = 0; i < N;++i) {
|
||||
if (arr[i] < min) {
|
||||
min = arr[i];
|
||||
index = i;
|
||||
}
|
||||
}
|
||||
|
||||
return index;
|
||||
|
||||
}
|
||||
|
||||
void getDWTAppx(wt_object wt, double *appx,int N) {
|
||||
/*
|
||||
Wavelet decomposition is stored as
|
||||
[A(J) D(J) D(J-1) ..... D(1)] in wt->output vector
|
||||
|
||||
Length of A(J) , N = wt->length[0]
|
||||
*/
|
||||
int i;
|
||||
|
||||
for (i = 0; i < N; ++i) {
|
||||
appx[i] = wt->output[i];
|
||||
}
|
||||
}
|
||||
|
||||
void getDWTDetail(wt_object wt, double *detail, int N, int level) {
|
||||
/*
|
||||
returns Detail coefficents at the jth level where j = J,J-1,...,1
|
||||
and Wavelet decomposition is stored as
|
||||
[A(J) D(J) D(J-1) ..... D(1)] in wt->output vector
|
||||
Use getDWTAppx() to get A(J)
|
||||
Level 1 : Length of D(J), ie N, is stored in wt->length[1]
|
||||
Level 2 :Length of D(J-1), ie N, is stored in wt->length[2]
|
||||
....
|
||||
Level J : Length of D(1), ie N, is stored in wt->length[J]
|
||||
*/
|
||||
int i, iter, J;
|
||||
J = wt->J;
|
||||
|
||||
if (level > J || level < 1) {
|
||||
printf("The decomposition only has 1,..,%d levels", J);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
iter = wt->length[0];
|
||||
|
||||
for (i = 1; i < J-level; ++i) {
|
||||
iter += wt->length[i];
|
||||
}
|
||||
|
||||
for (i = 0; i < N; ++i) {
|
||||
detail[i] = wt->output[i + iter];
|
||||
}
|
||||
}
|
||||
|
||||
void getDWTRecCoeff(double *coeff,int *length,const char *ctype,const char *ext, int level, int J,double *lpr,
|
||||
double *hpr,int lf,int siglength,double *reccoeff) {
|
||||
|
||||
int i,j,k,det_len,N,l,m,n,v,t,l2;
|
||||
double *out,*X_lp,*filt;
|
||||
out = (double*)malloc(sizeof(double)* (siglength + 1));
|
||||
l2 = lf / 2;
|
||||
m = -2;
|
||||
n = -1;
|
||||
if (!strcmp(ext, "per")) {
|
||||
if (!strcmp((ctype), "appx")) {
|
||||
det_len = length[0];
|
||||
} else {
|
||||
det_len = length[J - level + 1];
|
||||
}
|
||||
|
||||
N = 2 * length[J];
|
||||
|
||||
X_lp = (double*)malloc(sizeof(double)* (N + 2 * lf - 1));
|
||||
|
||||
for (i = 0; i < det_len; ++i) {
|
||||
out[i] = coeff[i];
|
||||
}
|
||||
|
||||
for (j = level; j > 0; --j) {
|
||||
|
||||
//idwt1(wt, temp, cA_up, out, det_len, wt->output + iter, det_len, X_lp, X_hp, out);
|
||||
|
||||
if (!strcmp((ctype), "det") && j == level) {
|
||||
filt = hpr;
|
||||
} else {
|
||||
filt = lpr;
|
||||
}
|
||||
|
||||
//idwt_per(wt,out, det_len, wt->output + iter, det_len, X_lp);
|
||||
m = -2;
|
||||
n = -1;
|
||||
|
||||
for (i = 0; i < det_len + l2 - 1; ++i) {
|
||||
m += 2;
|
||||
n += 2;
|
||||
X_lp[m] = 0.0;
|
||||
X_lp[n] = 0.0;
|
||||
for (l = 0; l < l2; ++l) {
|
||||
t = 2 * l;
|
||||
if ((i - l) >= 0 && (i - l) < det_len) {
|
||||
X_lp[m] += filt[t] * out[i - l];
|
||||
X_lp[n] += filt[t + 1] * out[i - l];
|
||||
}
|
||||
else if ((i - l) >= det_len && (i-l) < det_len + lf - 1) {
|
||||
X_lp[m] += filt[t] * out[i - l - det_len];
|
||||
X_lp[n] += filt[t + 1] * out[i - l - det_len];
|
||||
}
|
||||
else if ((i - l) < 0 && (i-l) > -l2) {
|
||||
X_lp[m] += filt[t] * out[det_len + i - l] ;
|
||||
X_lp[n] += filt[t + 1] * out[det_len + i - l];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (k = lf/2 - 1; k < 2 * det_len + lf/2 - 1; ++k) {
|
||||
out[k - lf/2 + 1] = X_lp[k];
|
||||
}
|
||||
|
||||
if (j != 1) {
|
||||
det_len = length[J - j + 2];
|
||||
}
|
||||
}
|
||||
|
||||
free(X_lp);
|
||||
|
||||
}
|
||||
else if (!strcmp(ext, "sym")) {
|
||||
if (!strcmp((ctype), "appx")) {
|
||||
det_len = length[0];
|
||||
} else {
|
||||
det_len = length[J - level + 1];
|
||||
}
|
||||
|
||||
N = 2 * length[J] - 1;
|
||||
|
||||
X_lp = (double*)malloc(sizeof(double)* (N + 2 * lf - 1));
|
||||
|
||||
for (i = 0; i < det_len; ++i) {
|
||||
out[i] = coeff[i];
|
||||
}
|
||||
|
||||
for (j = level; j > 0; --j) {
|
||||
|
||||
//idwt1(wt, temp, cA_up, out, det_len, wt->output + iter, det_len, X_lp, X_hp, out);
|
||||
|
||||
if (!strcmp((ctype), "det") && j == level) {
|
||||
filt = hpr;
|
||||
} else {
|
||||
filt = lpr;
|
||||
}
|
||||
|
||||
//idwt_sym(wt, out, det_len, wt->output + iter, det_len, X_lp);
|
||||
|
||||
m = -2;
|
||||
n = -1;
|
||||
|
||||
for (v = 0; v < det_len; ++v) {
|
||||
i = v;
|
||||
m += 2;
|
||||
n += 2;
|
||||
X_lp[m] = 0.0;
|
||||
X_lp[n] = 0.0;
|
||||
for (l = 0; l < lf / 2; ++l) {
|
||||
t = 2 * l;
|
||||
if ((i - l) >= 0 && (i - l) < det_len) {
|
||||
X_lp[m] += filt[t] * out[i - l];
|
||||
X_lp[n] += filt[t + 1] * out[i - l];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (k = lf-2; k < 2 * det_len; ++k) {
|
||||
out[k - lf + 2] = X_lp[k];
|
||||
}
|
||||
|
||||
|
||||
if (j != 1) {
|
||||
det_len = length[J - j + 2];
|
||||
}
|
||||
}
|
||||
|
||||
free(X_lp);
|
||||
|
||||
}
|
||||
else {
|
||||
printf("Signal extension can be either per or sym");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
for (i = 0; i < siglength; ++i) {
|
||||
reccoeff[i] = out[i];
|
||||
}
|
||||
|
||||
free(out);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void autocovar(const double* vec,int N, double* acov,int M) {
|
||||
double m,temp1,temp2;
|
||||
int i,t;
|
||||
m = mean(vec,N);
|
||||
|
||||
if ( M > N) {
|
||||
M = N-1;
|
||||
printf("\n Lag is greater than the length N of the input vector. It is automatically set to length N - 1.\n");
|
||||
printf("\n The Output Vector only contains N calculated values.");
|
||||
} else if ( M < 0) {
|
||||
M = 0;
|
||||
}
|
||||
|
||||
for(i = 0; i < M;i++) {
|
||||
acov[i] = 0.0;
|
||||
for (t = 0; t < N-i;t++) {
|
||||
temp1 = vec[t] - m;
|
||||
temp2 = vec[t+i] - m;
|
||||
acov[i]+= temp1*temp2;
|
||||
}
|
||||
acov[i] = acov[i] / N;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
void autocorr(const double* vec,int N,double* acorr, int M) {
|
||||
double var;
|
||||
int i;
|
||||
if (M > N) {
|
||||
M = N - 1;
|
||||
printf("\n Lag is greater than the length N of the input vector. It is automatically set to length N - 1.\n");
|
||||
printf("\n The Output Vector only contains N calculated values.");
|
||||
}
|
||||
else if (M < 0) {
|
||||
M = 0;
|
||||
}
|
||||
autocovar(vec,N,acorr,M);
|
||||
var = acorr[0];
|
||||
acorr[0] = 1.0;
|
||||
|
||||
for(i = 1; i < M; i++) {
|
||||
acorr[i] = acorr[i]/var;
|
||||
}
|
||||
|
||||
}
|
@ -1,47 +0,0 @@
|
||||
/*
|
||||
* waux.h
|
||||
*
|
||||
* Created on: Aug 22, 2017
|
||||
* Author: Rafat Hussain
|
||||
*/
|
||||
|
||||
#ifndef AUXILIARY_WAUX_H_
|
||||
#define AUXILIARY_WAUX_H_
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <float.h>
|
||||
#include <math.h>
|
||||
#include "../header/wavelib.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int compare_double(const void* a, const void* b);
|
||||
|
||||
double mean(const double* vec, int N);
|
||||
|
||||
double var(const double* vec, int N);
|
||||
|
||||
double median(double *x, int N);
|
||||
|
||||
int minindex(const double *arr, int N);
|
||||
|
||||
void getDWTAppx(wt_object wt, double *appx,int N);
|
||||
|
||||
void getDWTDetail(wt_object wt, double *detail, int N, int level);
|
||||
|
||||
void autocovar(const double* vec,int N,double* acov, int M);
|
||||
|
||||
void autocorr(const double* vec,int N,double* acorr, int M);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#endif /* AUXILIARY_WAUX_H_ */
|
110
cdisplay.html
Normal file
110
cdisplay.html
Normal file
@ -0,0 +1,110 @@
|
||||
<div class="row marketing">
|
||||
<div class="col-md-3"></div>
|
||||
<div class="col-md-6 col-sm-12">
|
||||
<select class="wide-control form-control default" data-ng-model="selected.wdisplay"
|
||||
data-ng-options="wdisplays.indexOf(e) as e for e in wdisplays" data-ng-change="updateGraph()">
|
||||
<option value=""> Select Outputs </option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-3"></div>
|
||||
</div>
|
||||
|
||||
<div class="row marketing">
|
||||
<div class="col-md-3"></div>
|
||||
<div class="col-md-6 col-sm-12">
|
||||
<div id="graph1" style="width:100%"></div>
|
||||
</div>
|
||||
<div class="col-md-3"></div>
|
||||
</div>
|
||||
|
||||
<div class="row marketing">
|
||||
<div class="col-md-3"></div>
|
||||
<div class="col-md-3 col-sm-6">
|
||||
<button class="btn btn-primary btn-block"><span data-position="right">
|
||||
</span>Color Scale </button>
|
||||
<select class="wide-control form-control default" data-ng-model="selected.cscale"
|
||||
data-ng-options="a.cscale for a in cmap" required>
|
||||
<option value=""> Select Colorscale </option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-6">
|
||||
<button class="btn btn-primary btn-block"><span data-position="right">
|
||||
</span>Y Axis </button>
|
||||
<select class="wide-control form-control default" data-ng-model="selected.yaxis"
|
||||
data-ng-options="a.yaxis for a in caxis" required>
|
||||
<option value=""> Select Y Axis </option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-3"></div>
|
||||
</div>
|
||||
|
||||
<div class="row marketing">
|
||||
<div class="col-md-3"></div>
|
||||
<div class="col-md-6 col-sm-12">
|
||||
<button class="btn btn-primary btn-block"><span data-position="right">
|
||||
</span>Sampling Period (dt)</button>
|
||||
<input class="form-control default" type="text" data-ng-model="dt">
|
||||
</div>
|
||||
<div class="col-md-3"></div>
|
||||
</div>
|
||||
|
||||
<div class="row marketing">
|
||||
<div class="col-md-6 col-sm-12">
|
||||
<button class="btn btn-primary btn-block"><span data-position="right">
|
||||
</span>Wavelet</button>
|
||||
<select class="wide-control form-control default" data-ng-model="selected.family"
|
||||
data-ng-options="a.family for a in cwavedb" required>
|
||||
<option value=""> Select Wavelet </option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-12">
|
||||
<button class="btn btn-primary btn-block"><span data-position="right">
|
||||
</span>Parameter</button>
|
||||
<input class="form-control default" type="text" data-ng-model="param">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row marketing">
|
||||
<div class="col-md-12 col-sm-12">
|
||||
<button class="btn btn-primary btn-block"><span data-position="right">
|
||||
</span>Scale Settings</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row marketing">
|
||||
<div class="col-md-3">
|
||||
<button class="btn btn-primary btn-block"><span data-position="right">
|
||||
</span>Type</button>
|
||||
<select class="wide-control form-control default" data-ng-model="selected.type"
|
||||
data-ng-options="a.type for a in stype" required>
|
||||
<option value=""> Scale Type </option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<button class="btn btn-primary btn-block"><span data-position="right">
|
||||
</span>Number of Scales (J)</button>
|
||||
<input class="form-control default" type="text" data-ng-model="jtot">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<button class="btn btn-primary btn-block"><span data-position="right">
|
||||
</span>Min (s0)</button>
|
||||
<input class="form-control default" type="text" data-ng-model="s0">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<button class="btn btn-primary btn-block"><span data-position="right">
|
||||
</span>Spacing (dj)</button>
|
||||
<input class="form-control default" type="text" data-ng-model="dj">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row marketing">
|
||||
<div class="col-md-3">
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<button class="btn btn-primary btn-block" data-ng-click="cwaveTest()">
|
||||
<span class="glyphicon glyphicon-share-alt pull-left" data-position="right"></span>GO</button>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
</div>
|
||||
|
||||
</div>
|
2048
data/Blocks7.txt
Normal file
2048
data/Blocks7.txt
Normal file
File diff suppressed because it is too large
Load Diff
2048
data/Bumps7.txt
Normal file
2048
data/Bumps7.txt
Normal file
File diff suppressed because it is too large
Load Diff
2048
data/Doppler8.txt
Normal file
2048
data/Doppler8.txt
Normal file
File diff suppressed because it is too large
Load Diff
2048
data/HeaviSine8.txt
Normal file
2048
data/HeaviSine8.txt
Normal file
File diff suppressed because it is too large
Load Diff
1024
data/Heavisine1024.txt
Normal file
1024
data/Heavisine1024.txt
Normal file
File diff suppressed because it is too large
Load Diff
1024
data/PiecePoly20.txt
Normal file
1024
data/PiecePoly20.txt
Normal file
File diff suppressed because it is too large
Load Diff
2048
data/PiecePolynomial6.txt
Normal file
2048
data/PiecePolynomial6.txt
Normal file
File diff suppressed because it is too large
Load Diff
2048
data/PieceRegular6.txt
Normal file
2048
data/PieceRegular6.txt
Normal file
File diff suppressed because it is too large
Load Diff
800
data/bumps6.txt
Normal file
800
data/bumps6.txt
Normal file
@ -0,0 +1,800 @@
|
||||
-1.6767
|
||||
0.72166
|
||||
0.67185
|
||||
0.032496
|
||||
0.86367
|
||||
-0.46865
|
||||
0.19288
|
||||
0.49161
|
||||
0.26748
|
||||
-0.87929
|
||||
-0.73515
|
||||
-0.38756
|
||||
-0.69925
|
||||
-1.5703
|
||||
0.75588
|
||||
0.5294
|
||||
-0.5978
|
||||
1.4826
|
||||
-0.057172
|
||||
1.2967
|
||||
1.0696
|
||||
-0.33913
|
||||
-0.52662
|
||||
1.0579
|
||||
0.58289
|
||||
-0.73201
|
||||
-0.78396
|
||||
1.0947
|
||||
-0.49741
|
||||
-0.65714
|
||||
-0.034562
|
||||
0.76354
|
||||
-0.25936
|
||||
0.8759
|
||||
-0.30639
|
||||
-0.4633
|
||||
-0.44075
|
||||
-1.9808
|
||||
0.99643
|
||||
-0.0958
|
||||
-0.11853
|
||||
-0.91163
|
||||
-0.027314
|
||||
0.35386
|
||||
2.8151
|
||||
1.3011
|
||||
0.51132
|
||||
-0.33284
|
||||
-2.1671
|
||||
1.8455
|
||||
-1.1525
|
||||
0.49215
|
||||
0.76668
|
||||
-1.266
|
||||
-2.0075
|
||||
1.042
|
||||
-0.14152
|
||||
1.0209
|
||||
-0.8342
|
||||
0.34541
|
||||
-0.27282
|
||||
0.063822
|
||||
0.78823
|
||||
0.12445
|
||||
-1.3926
|
||||
-0.63137
|
||||
1.8474
|
||||
-0.14454
|
||||
-0.18299
|
||||
0.16005
|
||||
1.8592
|
||||
-2.2734
|
||||
-0.65969
|
||||
-1.7671
|
||||
0.065591
|
||||
-0.45918
|
||||
0.92118
|
||||
-0.4691
|
||||
0.30254
|
||||
-0.28309
|
||||
-0.61878
|
||||
0.43903
|
||||
2.2957
|
||||
0.46457
|
||||
-2.4205
|
||||
-1.3053
|
||||
-1.5407
|
||||
1.7266
|
||||
0.2769
|
||||
0.91494
|
||||
-0.75993
|
||||
0.18514
|
||||
-0.075193
|
||||
-0.58771
|
||||
-0.79935
|
||||
0.67348
|
||||
2.1975
|
||||
3.7539
|
||||
3.6454
|
||||
3.6425
|
||||
5.5747
|
||||
7.5241
|
||||
7.311
|
||||
5.214
|
||||
6.2046
|
||||
5.0606
|
||||
5.6248
|
||||
3.4838
|
||||
2.6398
|
||||
1.3781
|
||||
1.8915
|
||||
0.26372
|
||||
0.42347
|
||||
-0.66314
|
||||
0.048844
|
||||
-0.0090891
|
||||
-1.1122
|
||||
1.9109
|
||||
-1.8006
|
||||
-0.96107
|
||||
1.0398
|
||||
-0.6453
|
||||
1.3331
|
||||
0.30353
|
||||
-0.47365
|
||||
-0.41239
|
||||
2.8906
|
||||
3.4071
|
||||
4.6502
|
||||
6.0105
|
||||
5.797
|
||||
9.0042
|
||||
8.6098
|
||||
6.8693
|
||||
7.3399
|
||||
7.4701
|
||||
6.6091
|
||||
4.2172
|
||||
1.8747
|
||||
2.5045
|
||||
0.18352
|
||||
1.13
|
||||
3.2199
|
||||
0.49253
|
||||
2.1461
|
||||
1.8323
|
||||
1.1139
|
||||
3.2405
|
||||
3.4121
|
||||
3.8176
|
||||
5.6834
|
||||
5.2998
|
||||
7.7896
|
||||
4.4501
|
||||
4.5555
|
||||
5.5688
|
||||
3.6487
|
||||
4.8511
|
||||
4.595
|
||||
2.4904
|
||||
3.2967
|
||||
3.4377
|
||||
-0.30872
|
||||
1.2064
|
||||
1.0509
|
||||
0.45589
|
||||
-0.70316
|
||||
1.9036
|
||||
1.3016
|
||||
0.98537
|
||||
1.3596
|
||||
1.7112
|
||||
-1.4304
|
||||
-0.607
|
||||
-0.63204
|
||||
-0.72734
|
||||
-1.0273
|
||||
-0.31238
|
||||
-0.62147
|
||||
1.3428
|
||||
0.13887
|
||||
0.72632
|
||||
2.1584
|
||||
-1.0134
|
||||
0.49747
|
||||
-0.52692
|
||||
0.88718
|
||||
-1.5265
|
||||
0.57204
|
||||
-0.85982
|
||||
-0.24201
|
||||
0.47674
|
||||
1.6177
|
||||
-0.14317
|
||||
0.47651
|
||||
0.68378
|
||||
-1.5943
|
||||
-2.4524
|
||||
-0.82688
|
||||
0.7219
|
||||
-0.14781
|
||||
1.7049
|
||||
-0.70859
|
||||
-0.26519
|
||||
1.379
|
||||
0.94018
|
||||
-0.41558
|
||||
-0.38434
|
||||
0.4771
|
||||
0.14104
|
||||
-0.47159
|
||||
-0.94515
|
||||
-0.63622
|
||||
-1.096
|
||||
0.76221
|
||||
-0.94511
|
||||
-0.67555
|
||||
2.1709
|
||||
2.8988
|
||||
3.2046
|
||||
0.47725
|
||||
-0.017649
|
||||
3.0412
|
||||
0.7023
|
||||
2.8518
|
||||
4.3749
|
||||
4.3611
|
||||
3.2626
|
||||
4.9381
|
||||
6.8391
|
||||
6.4672
|
||||
6.5378
|
||||
6.1944
|
||||
6.868
|
||||
8.1778
|
||||
6.8547
|
||||
8.4479
|
||||
7.6793
|
||||
7.6529
|
||||
6.7262
|
||||
6.4574
|
||||
7.0603
|
||||
7.237
|
||||
8.1007
|
||||
8.5111
|
||||
6.8208
|
||||
5.8115
|
||||
6.488
|
||||
9.8504
|
||||
7.5047
|
||||
6.9365
|
||||
8.3783
|
||||
8.6585
|
||||
8.4763
|
||||
6.137
|
||||
7.3377
|
||||
8.149
|
||||
6.1884
|
||||
9.7506
|
||||
6.7148
|
||||
7.2796
|
||||
6.8942
|
||||
8.1101
|
||||
7.0392
|
||||
5.5981
|
||||
4.3979
|
||||
4.1192
|
||||
4.6389
|
||||
3.0348
|
||||
1.6154
|
||||
2.8638
|
||||
0.97095
|
||||
0.64134
|
||||
0.9277
|
||||
3.393
|
||||
3.2647
|
||||
0.65323
|
||||
1.3864
|
||||
0.40858
|
||||
0.34521
|
||||
-0.013242
|
||||
-1.1468
|
||||
-1.5252
|
||||
-0.92468
|
||||
0.76883
|
||||
1.7496
|
||||
0.70832
|
||||
-1.6195
|
||||
-0.18419
|
||||
-1.4846
|
||||
1.5155
|
||||
-0.20335
|
||||
-1.0738
|
||||
0.82304
|
||||
0.18354
|
||||
1.1868
|
||||
0.71035
|
||||
-0.65988
|
||||
-0.47881
|
||||
-1.0364
|
||||
1.0214
|
||||
1.4648
|
||||
-0.95915
|
||||
0.00049512
|
||||
-0.81039
|
||||
-1.2337
|
||||
-0.44541
|
||||
1.313
|
||||
2.2554
|
||||
1.1276
|
||||
-0.31847
|
||||
-0.47442
|
||||
0.1197
|
||||
-0.36551
|
||||
1.2555
|
||||
-0.79417
|
||||
0.71875
|
||||
-1.9066
|
||||
-0.21176
|
||||
1.7119
|
||||
-0.36833
|
||||
-0.10583
|
||||
-0.29509
|
||||
-1.2763
|
||||
0.83482
|
||||
-0.03458
|
||||
-0.31222
|
||||
1.9105
|
||||
-1.6256
|
||||
1.1519
|
||||
1.8271
|
||||
-0.0009501
|
||||
-0.70981
|
||||
1.8757
|
||||
-0.77052
|
||||
0.44052
|
||||
-0.77347
|
||||
2.0475
|
||||
0.41174
|
||||
0.826
|
||||
-0.044081
|
||||
1.9727
|
||||
0.72225
|
||||
0.34157
|
||||
0.43566
|
||||
-0.19295
|
||||
0.62202
|
||||
0.048644
|
||||
0.54729
|
||||
3.7591
|
||||
-0.072933
|
||||
-0.26263
|
||||
1.421
|
||||
0.041181
|
||||
0.22485
|
||||
-1.8904
|
||||
1.3111
|
||||
-0.60504
|
||||
1.1994
|
||||
1.4164
|
||||
1.6345
|
||||
0.70865
|
||||
0.078886
|
||||
1.5622
|
||||
2.309
|
||||
0.033343
|
||||
-0.43958
|
||||
0.35494
|
||||
0.83378
|
||||
3.3211
|
||||
-1.0384
|
||||
1.7388
|
||||
1.7949
|
||||
1.7024
|
||||
1.6972
|
||||
1.6257
|
||||
4.1026
|
||||
3.4665
|
||||
2.4143
|
||||
2.7657
|
||||
2.9863
|
||||
4.6267
|
||||
4.0628
|
||||
4.602
|
||||
3.9584
|
||||
3.868
|
||||
6.1963
|
||||
5.0329
|
||||
6.4678
|
||||
6.0719
|
||||
5.0085
|
||||
7.2593
|
||||
6.2524
|
||||
6.9503
|
||||
5.428
|
||||
6.2528
|
||||
6.7903
|
||||
6.7117
|
||||
6.4827
|
||||
5.67
|
||||
7.4407
|
||||
5.9906
|
||||
6.0129
|
||||
6.3112
|
||||
7.5659
|
||||
7.4273
|
||||
6.1503
|
||||
6.846
|
||||
6.2065
|
||||
5.623
|
||||
6.3812
|
||||
7.5817
|
||||
6.9163
|
||||
6.7305
|
||||
8.5031
|
||||
5.3629
|
||||
6.1196
|
||||
5.8455
|
||||
5.276
|
||||
7.9106
|
||||
8.0551
|
||||
6.1611
|
||||
4.7321
|
||||
7.931
|
||||
5.6309
|
||||
7.4212
|
||||
7.3641
|
||||
6.1199
|
||||
4.1945
|
||||
5.9414
|
||||
6.2486
|
||||
7.4172
|
||||
5.1539
|
||||
5.228
|
||||
6.0029
|
||||
5.0445
|
||||
5.6298
|
||||
6.4241
|
||||
4.962
|
||||
6.0779
|
||||
5.3627
|
||||
4.9836
|
||||
5.8392
|
||||
4.9202
|
||||
6.4157
|
||||
5.3382
|
||||
5.938
|
||||
3.2413
|
||||
6.0579
|
||||
4.102
|
||||
4.0396
|
||||
5.1296
|
||||
5.9863
|
||||
5.783
|
||||
4.4274
|
||||
5.5049
|
||||
6.2918
|
||||
3.0518
|
||||
3.1792
|
||||
1.8224
|
||||
2.0787
|
||||
1.3441
|
||||
0.86307
|
||||
3.1884
|
||||
2.4151
|
||||
0.17109
|
||||
0.93545
|
||||
2.3153
|
||||
1.1201
|
||||
2.0555
|
||||
-0.99153
|
||||
0.9585
|
||||
1.0962
|
||||
-0.29846
|
||||
2.0099
|
||||
0.88858
|
||||
-1.8368
|
||||
-1.0727
|
||||
1.5504
|
||||
0.32459
|
||||
1.4854
|
||||
0.15435
|
||||
0.68867
|
||||
-1.1702
|
||||
-0.33452
|
||||
-0.13274
|
||||
1.3219
|
||||
-0.28669
|
||||
0.28494
|
||||
0.17292
|
||||
-0.4985
|
||||
1.2927
|
||||
1.543
|
||||
0.42477
|
||||
0.69877
|
||||
0.83893
|
||||
-1.1609
|
||||
1.357
|
||||
-1.8824
|
||||
-0.90972
|
||||
-0.4917
|
||||
0.48267
|
||||
0.41443
|
||||
-0.50514
|
||||
-1.2486
|
||||
0.63696
|
||||
-0.57146
|
||||
0.67604
|
||||
0.58168
|
||||
1.3112
|
||||
-1.0345
|
||||
-0.71636
|
||||
0.41991
|
||||
-1.0641
|
||||
-0.61833
|
||||
-0.03578
|
||||
-0.24298
|
||||
0.80813
|
||||
-0.66023
|
||||
0.55094
|
||||
-0.55651
|
||||
-0.92706
|
||||
1.6989
|
||||
-0.058475
|
||||
-0.12628
|
||||
-0.58587
|
||||
-0.37392
|
||||
1.084
|
||||
-0.69002
|
||||
-0.86797
|
||||
-0.37787
|
||||
-1.5603
|
||||
0.33947
|
||||
-0.64016
|
||||
2.2639
|
||||
0.84064
|
||||
-1.0056
|
||||
2.0281
|
||||
0.043279
|
||||
-0.62092
|
||||
-0.73402
|
||||
0.15044
|
||||
-0.052086
|
||||
0.91022
|
||||
0.098474
|
||||
0.15853
|
||||
-1.2166
|
||||
-0.79532
|
||||
-0.43051
|
||||
1.6539
|
||||
-1.7575
|
||||
-1.0255
|
||||
-0.39424
|
||||
-0.24131
|
||||
-0.35303
|
||||
-1.3536
|
||||
2.5103
|
||||
1.0449
|
||||
-1.9665
|
||||
-0.10216
|
||||
1.8162
|
||||
0.52612
|
||||
0.36978
|
||||
0.55109
|
||||
-0.1089
|
||||
-0.95415
|
||||
0.77898
|
||||
2.3458
|
||||
-1.4312
|
||||
0.31331
|
||||
0.59261
|
||||
1.0144
|
||||
0.1187
|
||||
0.70385
|
||||
2.1198
|
||||
0.15197
|
||||
-1.3874
|
||||
-1.7153
|
||||
-0.78636
|
||||
0.65922
|
||||
0.65659
|
||||
0.79224
|
||||
-0.38336
|
||||
-1.62
|
||||
1.0468
|
||||
0.22501
|
||||
-0.47771
|
||||
0.92363
|
||||
0.64716
|
||||
-0.5598
|
||||
0.58023
|
||||
0.27702
|
||||
1.3096e-005
|
||||
-2.1335
|
||||
-1.0128
|
||||
-0.59172
|
||||
1.1292
|
||||
0.10683
|
||||
0.21885
|
||||
-0.74012
|
||||
-1.2693
|
||||
0.60222
|
||||
0.66201
|
||||
-0.66181
|
||||
-0.78853
|
||||
-0.76661
|
||||
-0.2446
|
||||
0.96906
|
||||
0.24396
|
||||
-1.3597
|
||||
0.079872
|
||||
1.0912
|
||||
0.30671
|
||||
0.5757
|
||||
1.1942
|
||||
-0.37265
|
||||
-0.15348
|
||||
-0.16259
|
||||
0.028869
|
||||
-0.10252
|
||||
0.10473
|
||||
1.2044
|
||||
-1.2208
|
||||
-0.75592
|
||||
-0.5446
|
||||
-0.34936
|
||||
-0.79987
|
||||
-1.4023
|
||||
-0.13104
|
||||
-0.46432
|
||||
0.079216
|
||||
-0.38917
|
||||
0.36207
|
||||
-0.79278
|
||||
-1.1265
|
||||
0.083357
|
||||
1.3023
|
||||
-0.85105
|
||||
0.065807
|
||||
0.96388
|
||||
-0.12916
|
||||
1.09
|
||||
0.089076
|
||||
1.7133
|
||||
-1.8379
|
||||
-0.89689
|
||||
0.2466
|
||||
1.1425
|
||||
1.7813
|
||||
2.028
|
||||
2.5002
|
||||
2.8911
|
||||
2.742
|
||||
2.7165
|
||||
2.1593
|
||||
4.333
|
||||
5.0275
|
||||
3.3598
|
||||
5.5858
|
||||
6.4838
|
||||
6.9201
|
||||
5.6166
|
||||
6.3335
|
||||
7.4131
|
||||
7.1268
|
||||
6.5762
|
||||
6.7152
|
||||
6.8339
|
||||
4.9649
|
||||
7.0346
|
||||
7.7847
|
||||
4.0395
|
||||
5.6799
|
||||
4.9381
|
||||
5.0001
|
||||
2.9729
|
||||
2.6346
|
||||
2.7508
|
||||
1.8195
|
||||
2.6121
|
||||
2.5431
|
||||
0.57303
|
||||
1.2708
|
||||
0.14314
|
||||
1.7765
|
||||
-1.394
|
||||
-0.32754
|
||||
3.349
|
||||
0.85253
|
||||
1.0331
|
||||
1.0974
|
||||
-0.10298
|
||||
-0.2349
|
||||
0.37345
|
||||
0.43714
|
||||
-0.021712
|
||||
-1.8485
|
||||
1.0306
|
||||
-0.51161
|
||||
1.0095
|
||||
0.017927
|
||||
0.029016
|
||||
-0.52681
|
||||
-1.5543
|
||||
-0.37856
|
||||
0.95705
|
||||
-1.7858
|
||||
0.83317
|
||||
0.18818
|
||||
-0.4865
|
||||
0.60845
|
||||
-0.71101
|
||||
-0.89356
|
||||
-0.20043
|
||||
0.4842
|
||||
0.21177
|
||||
0.40839
|
||||
1.7479
|
||||
1.1724
|
||||
1.9265
|
||||
2.6437
|
||||
-1.6559
|
||||
-0.68976
|
||||
-0.017169
|
||||
1.5001
|
||||
0.8215
|
||||
1.5963
|
||||
0.54355
|
||||
-0.72756
|
||||
-0.36009
|
||||
-0.22316
|
||||
-0.52598
|
||||
-0.29642
|
||||
-0.029568
|
||||
-1.0336
|
||||
1.06
|
||||
0.38794
|
||||
-0.27812
|
||||
-0.35033
|
||||
-0.22645
|
||||
0.20176
|
||||
0.70605
|
||||
-0.038814
|
||||
-0.34347
|
||||
-0.62761
|
||||
-0.5028
|
||||
0.5461
|
||||
1.1276
|
||||
1.24
|
||||
-0.64214
|
||||
-1.4566
|
||||
1.3312
|
||||
0.053646
|
||||
1.2391
|
||||
0.73185
|
||||
1.1131
|
||||
0.32015
|
||||
-0.57213
|
||||
-3.536
|
||||
-0.59941
|
||||
-0.03819
|
||||
-1.3105
|
||||
-0.50005
|
||||
-0.44309
|
||||
0.57528
|
||||
0.086497
|
||||
2.4384
|
||||
1.1295
|
||||
-0.1952
|
||||
-0.044796
|
||||
1.522
|
||||
1.5067
|
||||
2.9494
|
||||
3.9087
|
||||
3.3204
|
||||
5.2219
|
||||
5.6532
|
||||
3.944
|
||||
5.0768
|
||||
5.0749
|
||||
2.03
|
||||
3.8737
|
||||
4.5364
|
||||
1.0323
|
||||
2.1827
|
||||
1.6892
|
||||
1.4933
|
||||
0.70228
|
||||
3.0377
|
||||
4.1547
|
||||
5.5056
|
||||
5.0936
|
||||
7.249
|
||||
7.724
|
||||
7.5035
|
||||
8.8902
|
||||
8.7646
|
||||
7.9654
|
||||
5.7719
|
||||
9.7688
|
5400
data/ecg.txt
Normal file
5400
data/ecg.txt
Normal file
File diff suppressed because it is too large
Load Diff
512
data/heavisine.txt
Normal file
512
data/heavisine.txt
Normal file
@ -0,0 +1,512 @@
|
||||
0.0982
|
||||
0.1963
|
||||
0.2943
|
||||
0.3921
|
||||
0.4896
|
||||
0.5869
|
||||
0.6838
|
||||
0.7804
|
||||
0.8764
|
||||
0.9719
|
||||
1.0669
|
||||
1.1611
|
||||
1.2547
|
||||
1.3476
|
||||
1.4396
|
||||
1.5307
|
||||
1.6210
|
||||
1.7102
|
||||
1.7984
|
||||
1.8856
|
||||
1.9716
|
||||
2.0564
|
||||
2.1400
|
||||
2.2223
|
||||
2.3032
|
||||
2.3828
|
||||
2.4609
|
||||
2.5376
|
||||
2.6127
|
||||
2.6862
|
||||
2.7582
|
||||
2.8284
|
||||
2.8970
|
||||
2.9638
|
||||
3.0288
|
||||
3.0920
|
||||
3.1534
|
||||
3.2128
|
||||
3.2703
|
||||
3.3259
|
||||
3.3794
|
||||
3.4309
|
||||
3.4803
|
||||
3.5277
|
||||
3.5729
|
||||
3.6160
|
||||
3.6568
|
||||
3.6955
|
||||
3.7320
|
||||
3.7662
|
||||
3.7981
|
||||
3.8278
|
||||
3.8551
|
||||
3.8801
|
||||
3.9028
|
||||
3.9231
|
||||
3.9411
|
||||
3.9567
|
||||
3.9699
|
||||
3.9807
|
||||
3.9892
|
||||
3.9952
|
||||
3.9988
|
||||
4.0000
|
||||
3.9988
|
||||
3.9952
|
||||
3.9892
|
||||
3.9807
|
||||
3.9699
|
||||
3.9567
|
||||
3.9411
|
||||
3.9231
|
||||
3.9028
|
||||
3.8801
|
||||
3.8551
|
||||
3.8278
|
||||
3.7981
|
||||
3.7662
|
||||
3.7320
|
||||
3.6955
|
||||
3.6568
|
||||
3.6160
|
||||
3.5729
|
||||
3.5277
|
||||
3.4803
|
||||
3.4309
|
||||
3.3794
|
||||
3.3259
|
||||
3.2703
|
||||
3.2128
|
||||
3.1534
|
||||
3.0920
|
||||
3.0288
|
||||
2.9638
|
||||
2.8970
|
||||
2.8284
|
||||
2.7582
|
||||
2.6862
|
||||
2.6127
|
||||
2.5376
|
||||
2.4609
|
||||
2.3828
|
||||
2.3032
|
||||
2.2223
|
||||
2.1400
|
||||
2.0564
|
||||
1.9716
|
||||
1.8856
|
||||
1.7984
|
||||
1.7102
|
||||
1.6210
|
||||
1.5307
|
||||
1.4396
|
||||
1.3476
|
||||
1.2547
|
||||
1.1611
|
||||
1.0669
|
||||
0.9719
|
||||
0.8764
|
||||
0.7804
|
||||
0.6838
|
||||
0.5869
|
||||
0.4896
|
||||
0.3921
|
||||
0.2943
|
||||
0.1963
|
||||
0.0982
|
||||
0.0000
|
||||
-0.0982
|
||||
-0.1963
|
||||
-0.2943
|
||||
-0.3921
|
||||
-0.4896
|
||||
-0.5869
|
||||
-0.6838
|
||||
-0.7804
|
||||
-0.8764
|
||||
-0.9719
|
||||
-1.0669
|
||||
-1.1611
|
||||
-1.2547
|
||||
-1.3476
|
||||
-1.4396
|
||||
-1.5307
|
||||
-1.6210
|
||||
-1.7102
|
||||
-1.7984
|
||||
-1.8856
|
||||
-1.9716
|
||||
-2.0564
|
||||
-2.1400
|
||||
-2.2223
|
||||
-2.3032
|
||||
-4.3828
|
||||
-4.4609
|
||||
-4.5376
|
||||
-4.6127
|
||||
-4.6862
|
||||
-4.7582
|
||||
-4.8284
|
||||
-4.8970
|
||||
-4.9638
|
||||
-5.0288
|
||||
-5.0920
|
||||
-5.1534
|
||||
-5.2128
|
||||
-5.2703
|
||||
-5.3259
|
||||
-5.3794
|
||||
-5.4309
|
||||
-5.4803
|
||||
-5.5277
|
||||
-5.5729
|
||||
-5.6160
|
||||
-5.6568
|
||||
-5.6955
|
||||
-5.7320
|
||||
-5.7662
|
||||
-5.7981
|
||||
-5.8278
|
||||
-5.8551
|
||||
-5.8801
|
||||
-5.9028
|
||||
-5.9231
|
||||
-5.9411
|
||||
-5.9567
|
||||
-5.9699
|
||||
-5.9807
|
||||
-5.9892
|
||||
-5.9952
|
||||
-5.9988
|
||||
-6.0000
|
||||
-5.9988
|
||||
-5.9952
|
||||
-5.9892
|
||||
-5.9807
|
||||
-5.9699
|
||||
-5.9567
|
||||
-5.9411
|
||||
-5.9231
|
||||
-5.9028
|
||||
-5.8801
|
||||
-5.8551
|
||||
-5.8278
|
||||
-5.7981
|
||||
-5.7662
|
||||
-5.7320
|
||||
-5.6955
|
||||
-5.6568
|
||||
-5.6160
|
||||
-5.5729
|
||||
-5.5277
|
||||
-5.4803
|
||||
-5.4309
|
||||
-5.3794
|
||||
-5.3259
|
||||
-5.2703
|
||||
-5.2128
|
||||
-5.1534
|
||||
-5.0920
|
||||
-5.0288
|
||||
-4.9638
|
||||
-4.8970
|
||||
-4.8284
|
||||
-4.7582
|
||||
-4.6862
|
||||
-4.6127
|
||||
-4.5376
|
||||
-4.4609
|
||||
-4.3828
|
||||
-4.3032
|
||||
-4.2223
|
||||
-4.1400
|
||||
-4.0564
|
||||
-3.9716
|
||||
-3.8856
|
||||
-3.7984
|
||||
-3.7102
|
||||
-3.6210
|
||||
-3.5307
|
||||
-3.4396
|
||||
-3.3476
|
||||
-3.2547
|
||||
-3.1611
|
||||
-3.0669
|
||||
-2.9719
|
||||
-2.8764
|
||||
-2.7804
|
||||
-2.6838
|
||||
-2.5869
|
||||
-2.4896
|
||||
-2.3921
|
||||
-2.2943
|
||||
-2.1963
|
||||
-2.0982
|
||||
-2.0000
|
||||
-1.9018
|
||||
-1.8037
|
||||
-1.7057
|
||||
-1.6079
|
||||
-1.5104
|
||||
-1.4131
|
||||
-1.3162
|
||||
-1.2196
|
||||
-1.1236
|
||||
-1.0281
|
||||
-0.9331
|
||||
-0.8389
|
||||
-0.7453
|
||||
-0.6524
|
||||
-0.5604
|
||||
-0.4693
|
||||
-0.3790
|
||||
-0.2898
|
||||
-0.2016
|
||||
-0.1144
|
||||
-0.0284
|
||||
0.0564
|
||||
0.1400
|
||||
0.2223
|
||||
0.3032
|
||||
0.3828
|
||||
0.4609
|
||||
0.5376
|
||||
0.6127
|
||||
0.6862
|
||||
0.7582
|
||||
0.8284
|
||||
0.8970
|
||||
0.9638
|
||||
1.0288
|
||||
1.0920
|
||||
1.1534
|
||||
1.2128
|
||||
1.2703
|
||||
1.3259
|
||||
1.3794
|
||||
1.4309
|
||||
1.4803
|
||||
1.5277
|
||||
1.5729
|
||||
1.6160
|
||||
1.6568
|
||||
1.6955
|
||||
1.7320
|
||||
1.7662
|
||||
1.7981
|
||||
1.8278
|
||||
1.8551
|
||||
1.8801
|
||||
1.9028
|
||||
1.9231
|
||||
1.9411
|
||||
1.9567
|
||||
1.9699
|
||||
1.9807
|
||||
1.9892
|
||||
1.9952
|
||||
1.9988
|
||||
2.0000
|
||||
1.9988
|
||||
1.9952
|
||||
1.9892
|
||||
1.9807
|
||||
1.9699
|
||||
1.9567
|
||||
1.9411
|
||||
1.9231
|
||||
1.9028
|
||||
1.8801
|
||||
1.8551
|
||||
1.8278
|
||||
1.7981
|
||||
1.7662
|
||||
1.7320
|
||||
1.6955
|
||||
1.6568
|
||||
1.6160
|
||||
1.5729
|
||||
1.5277
|
||||
1.4803
|
||||
1.4309
|
||||
1.3794
|
||||
1.3259
|
||||
1.2703
|
||||
1.2128
|
||||
1.1534
|
||||
1.0920
|
||||
1.0288
|
||||
0.9638
|
||||
0.8970
|
||||
0.8284
|
||||
0.7582
|
||||
0.6862
|
||||
0.6127
|
||||
0.5376
|
||||
0.4609
|
||||
0.3828
|
||||
0.3032
|
||||
0.2223
|
||||
0.1400
|
||||
0.0564
|
||||
-0.0284
|
||||
-0.1144
|
||||
-0.2016
|
||||
-0.2898
|
||||
-0.3790
|
||||
-0.4693
|
||||
1.4396
|
||||
1.3476
|
||||
1.2547
|
||||
1.1611
|
||||
1.0669
|
||||
0.9719
|
||||
0.8764
|
||||
0.7804
|
||||
0.6838
|
||||
0.5869
|
||||
0.4896
|
||||
0.3921
|
||||
0.2943
|
||||
0.1963
|
||||
0.0982
|
||||
0.0000
|
||||
-0.0982
|
||||
-0.1963
|
||||
-0.2943
|
||||
-0.3921
|
||||
-0.4896
|
||||
-0.5869
|
||||
-0.6838
|
||||
-0.7804
|
||||
-0.8764
|
||||
-0.9719
|
||||
-1.0669
|
||||
-1.1611
|
||||
-1.2547
|
||||
-1.3476
|
||||
-1.4396
|
||||
-1.5307
|
||||
-1.6210
|
||||
-1.7102
|
||||
-1.7984
|
||||
-1.8856
|
||||
-1.9716
|
||||
-2.0564
|
||||
-2.1400
|
||||
-2.2223
|
||||
-2.3032
|
||||
-2.3828
|
||||
-2.4609
|
||||
-2.5376
|
||||
-2.6127
|
||||
-2.6862
|
||||
-2.7582
|
||||
-2.8284
|
||||
-2.8970
|
||||
-2.9638
|
||||
-3.0288
|
||||
-3.0920
|
||||
-3.1534
|
||||
-3.2128
|
||||
-3.2703
|
||||
-3.3259
|
||||
-3.3794
|
||||
-3.4309
|
||||
-3.4803
|
||||
-3.5277
|
||||
-3.5729
|
||||
-3.6160
|
||||
-3.6568
|
||||
-3.6955
|
||||
-3.7320
|
||||
-3.7662
|
||||
-3.7981
|
||||
-3.8278
|
||||
-3.8551
|
||||
-3.8801
|
||||
-3.9028
|
||||
-3.9231
|
||||
-3.9411
|
||||
-3.9567
|
||||
-3.9699
|
||||
-3.9807
|
||||
-3.9892
|
||||
-3.9952
|
||||
-3.9988
|
||||
-4.0000
|
||||
-3.9988
|
||||
-3.9952
|
||||
-3.9892
|
||||
-3.9807
|
||||
-3.9699
|
||||
-3.9567
|
||||
-3.9411
|
||||
-3.9231
|
||||
-3.9028
|
||||
-3.8801
|
||||
-3.8551
|
||||
-3.8278
|
||||
-3.7981
|
||||
-3.7662
|
||||
-3.7320
|
||||
-3.6955
|
||||
-3.6568
|
||||
-3.6160
|
||||
-3.5729
|
||||
-3.5277
|
||||
-3.4803
|
||||
-3.4309
|
||||
-3.3794
|
||||
-3.3259
|
||||
-3.2703
|
||||
-3.2128
|
||||
-3.1534
|
||||
-3.0920
|
||||
-3.0288
|
||||
-2.9638
|
||||
-2.8970
|
||||
-2.8284
|
||||
-2.7582
|
||||
-2.6862
|
||||
-2.6127
|
||||
-2.5376
|
||||
-2.4609
|
||||
-2.3828
|
||||
-2.3032
|
||||
-2.2223
|
||||
-2.1400
|
||||
-2.0564
|
||||
-1.9716
|
||||
-1.8856
|
||||
-1.7984
|
||||
-1.7102
|
||||
-1.6210
|
||||
-1.5307
|
||||
-1.4396
|
||||
-1.3476
|
||||
-1.2547
|
||||
-1.1611
|
||||
-1.0669
|
||||
-0.9719
|
||||
-0.8764
|
||||
-0.7804
|
||||
-0.6838
|
||||
-0.5869
|
||||
-0.4896
|
||||
-0.3921
|
||||
-0.2943
|
||||
-0.1963
|
||||
-0.0982
|
||||
-0.0000
|
2048
data/inp.dat
Normal file
2048
data/inp.dat
Normal file
File diff suppressed because it is too large
Load Diff
1024
data/noisbloc.txt
Normal file
1024
data/noisbloc.txt
Normal file
File diff suppressed because it is too large
Load Diff
1024
data/piecepoly.txt
Normal file
1024
data/piecepoly.txt
Normal file
File diff suppressed because it is too large
Load Diff
256
data/pieceregular.txt
Normal file
256
data/pieceregular.txt
Normal file
@ -0,0 +1,256 @@
|
||||
-18.3237
|
||||
-18.2232
|
||||
-18.0974
|
||||
-17.9410
|
||||
-17.7480
|
||||
-17.5113
|
||||
-17.2230
|
||||
-16.8744
|
||||
-16.4558
|
||||
-15.9565
|
||||
-15.3653
|
||||
-14.6701
|
||||
-13.8586
|
||||
-12.9182
|
||||
-11.8363
|
||||
-10.6008
|
||||
-9.2006
|
||||
-7.6257
|
||||
-5.8680
|
||||
-3.9217
|
||||
-1.7839
|
||||
0.5452
|
||||
3.0614
|
||||
5.7562
|
||||
8.6167
|
||||
11.6252
|
||||
14.7591
|
||||
17.9909
|
||||
21.2884
|
||||
24.6155
|
||||
27.9319
|
||||
31.1947
|
||||
34.3587
|
||||
37.3775
|
||||
40.2049
|
||||
42.7957
|
||||
13.2164
|
||||
14.2125
|
||||
15.0317
|
||||
15.6595
|
||||
16.0845
|
||||
16.2990
|
||||
16.2990
|
||||
16.0845
|
||||
15.6595
|
||||
15.0317
|
||||
14.2125
|
||||
13.2164
|
||||
12.0608
|
||||
10.7654
|
||||
9.3517
|
||||
34.3587
|
||||
31.1947
|
||||
27.9319
|
||||
24.6155
|
||||
21.2884
|
||||
17.9909
|
||||
14.7591
|
||||
11.6252
|
||||
8.6167
|
||||
5.7562
|
||||
3.0614
|
||||
0.5452
|
||||
-1.7839
|
||||
-3.9217
|
||||
-5.8680
|
||||
-7.6257
|
||||
-9.2006
|
||||
-10.6008
|
||||
-11.8363
|
||||
-12.9182
|
||||
-13.8586
|
||||
-14.6701
|
||||
-15.3653
|
||||
-15.9565
|
||||
-16.4558
|
||||
-16.8744
|
||||
-17.2230
|
||||
-17.5113
|
||||
-17.7480
|
||||
-17.9410
|
||||
-18.0974
|
||||
-18.2232
|
||||
-18.3237
|
||||
-18.4035
|
||||
-18.0080
|
||||
-17.8889
|
||||
-17.7403
|
||||
-17.5533
|
||||
-17.3156
|
||||
-17.0102
|
||||
-16.6129
|
||||
-16.0884
|
||||
-15.3848
|
||||
-14.4239
|
||||
-13.0840
|
||||
-11.1708
|
||||
-8.3634
|
||||
-4.1098
|
||||
2.5833
|
||||
13.6048
|
||||
32.7934
|
||||
28.0187
|
||||
10.9660
|
||||
1.0776
|
||||
-4.9459
|
||||
-8.7354
|
||||
-11.1225
|
||||
-12.4865
|
||||
-12.8019
|
||||
-11.2050
|
||||
-3.3124
|
||||
1.8995
|
||||
-11.3573
|
||||
-15.0684
|
||||
-16.5028
|
||||
-17.1937
|
||||
-17.5831
|
||||
-17.8288
|
||||
-17.9968
|
||||
-18.1185
|
||||
-18.2103
|
||||
-18.2818
|
||||
-18.3388
|
||||
-18.3849
|
||||
-18.4229
|
||||
-18.4545
|
||||
-18.4810
|
||||
-17.4642
|
||||
-17.2104
|
||||
-16.9033
|
||||
-16.5317
|
||||
-16.0822
|
||||
-15.5384
|
||||
-14.8804
|
||||
-14.0844
|
||||
-13.1214
|
||||
-11.9563
|
||||
-10.5467
|
||||
-8.8414
|
||||
-6.7782
|
||||
-4.2822
|
||||
-1.2624
|
||||
2.3911
|
||||
6.8111
|
||||
12.1585
|
||||
18.6280
|
||||
26.4549
|
||||
35.9241
|
||||
35.9241
|
||||
26.4549
|
||||
18.6280
|
||||
12.1585
|
||||
6.8111
|
||||
2.3911
|
||||
-1.2624
|
||||
-4.2822
|
||||
-6.7782
|
||||
-8.8414
|
||||
-10.5467
|
||||
-11.9563
|
||||
-13.1214
|
||||
-14.0844
|
||||
-14.8804
|
||||
-15.5384
|
||||
-16.0822
|
||||
-16.5317
|
||||
-16.9033
|
||||
-17.2104
|
||||
-17.4642
|
||||
-18.6741
|
||||
-18.6741
|
||||
-18.6741
|
||||
-18.6741
|
||||
-18.6741
|
||||
-18.6741
|
||||
-18.6741
|
||||
-18.6741
|
||||
-18.6741
|
||||
-18.6741
|
||||
-18.6741
|
||||
-18.6741
|
||||
6.3259
|
||||
6.3259
|
||||
6.3259
|
||||
6.3259
|
||||
6.3259
|
||||
6.3259
|
||||
6.3259
|
||||
6.3259
|
||||
6.3259
|
||||
6.3259
|
||||
6.3259
|
||||
6.3259
|
||||
6.3259
|
||||
6.3259
|
||||
6.3259
|
||||
6.3259
|
||||
6.3259
|
||||
6.3259
|
||||
6.3259
|
||||
6.3259
|
||||
6.3259
|
||||
6.3259
|
||||
6.3259
|
||||
6.3259
|
||||
34.8066
|
||||
34.6752
|
||||
34.5285
|
||||
34.3645
|
||||
34.1812
|
||||
33.9763
|
||||
33.7474
|
||||
33.4917
|
||||
33.2058
|
||||
32.8863
|
||||
32.5294
|
||||
32.1304
|
||||
31.6846
|
||||
31.1864
|
||||
30.6296
|
||||
30.0074
|
||||
29.3121
|
||||
28.5350
|
||||
27.6667
|
||||
26.6963
|
||||
25.6118
|
||||
24.3999
|
||||
23.0456
|
||||
21.5322
|
||||
19.8408
|
||||
17.9507
|
||||
15.8385
|
||||
13.4781
|
||||
10.8403
|
||||
7.8925
|
||||
4.5982
|
||||
0.9168
|
||||
-3.1972
|
||||
-7.7947
|
||||
-12.9325
|
||||
-18.6741
|
||||
-18.6741
|
||||
-18.6741
|
||||
-18.6741
|
||||
-18.6741
|
||||
-18.6741
|
||||
-18.6741
|
||||
-18.6741
|
||||
-18.6741
|
||||
-18.6741
|
||||
-18.6741
|
||||
-18.6741
|
||||
-18.6741
|
||||
-18.6741
|
||||
-18.3237
|
2048
data/pieceregular2048.txt
Normal file
2048
data/pieceregular2048.txt
Normal file
File diff suppressed because it is too large
Load Diff
73
data/wavedb.json
Normal file
73
data/wavedb.json
Normal file
@ -0,0 +1,73 @@
|
||||
{
|
||||
"id" : "0",
|
||||
"family" : "haar",
|
||||
"wavelets" : [
|
||||
{ "haar" }
|
||||
]
|
||||
},{
|
||||
"id" : "1",
|
||||
"family" : "daubechies",
|
||||
"wavelets" : [
|
||||
{ "db1" },
|
||||
{ "db2" },
|
||||
{ "db3" },
|
||||
{ "db4" },
|
||||
{ "db5" },
|
||||
{ "db6" },
|
||||
{ "db7" },
|
||||
{ "db8" },
|
||||
{ "db9" },
|
||||
{ "db10" },
|
||||
{ "db11" },
|
||||
{ "db12" },
|
||||
{ "db13" },
|
||||
{ "db14" },
|
||||
{ "db15" }
|
||||
]
|
||||
},{
|
||||
"id" : "2",
|
||||
"family" : "biorthogonal",
|
||||
"wavelets" : [
|
||||
{ "bior1.1" },
|
||||
{ "bior1.3" },
|
||||
{ "bior1.5" },
|
||||
{ "bior2.2" },
|
||||
{ "bior2.4" },
|
||||
{ "bior2.6" },
|
||||
{ "bior2.8" },
|
||||
{ "bior3.1" },
|
||||
{ "bior3.3" },
|
||||
{ "bior3.5" },
|
||||
{ "bior3.7" },
|
||||
{ "bior3.9" },
|
||||
{ "bior4.4" },
|
||||
{ "bior5.5" },
|
||||
{ "bior6.8" }
|
||||
]
|
||||
},{
|
||||
"id" : "3",
|
||||
"family" : "coiflets",
|
||||
"wavelets" : [
|
||||
{ "coif1" },
|
||||
{ "coif2" },
|
||||
{ "coif3" },
|
||||
{ "coif4" },
|
||||
{ "coif5" }
|
||||
]
|
||||
},{
|
||||
"id" : "4",
|
||||
"family" : "symmlets",
|
||||
"wavelets" : [
|
||||
{ "sym2" },
|
||||
{ "sym3" },
|
||||
{ "sym4" },
|
||||
{ "sym5" },
|
||||
{ "sym6" },
|
||||
{ "sym7" },
|
||||
{ "sym8" },
|
||||
{ "sym9" },
|
||||
{ "sym10" }
|
||||
]
|
||||
}
|
||||
|
||||
}
|
80
denoise.html
Normal file
80
denoise.html
Normal file
@ -0,0 +1,80 @@
|
||||
<div class="row marketing">
|
||||
<div class="col-md-3"></div>
|
||||
<div class="col-md-6 col-sm-12">
|
||||
<select class="wide-control form-control default" data-ng-model="selected.wdisplay"
|
||||
data-ng-options="wdisplays.indexOf(e) as e for e in wdisplays" data-ng-change="updateGraph()">
|
||||
<option value=""> Select Outputs </option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-3"></div>
|
||||
</div>
|
||||
|
||||
<div class="row marketing">
|
||||
<div class="col-md-12 col-sm-12">
|
||||
<div id="graph1" style="width:100%"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row marketing">
|
||||
<div class="col-md-6">
|
||||
<select class="wide-control form-control default" data-ng-model="selected.dnmethod"
|
||||
data-ng-options="d.dnmethod for d in dnmethods" required>
|
||||
<option value=""> Denoising Method </option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<select class="wide-control form-control default" data-ng-model="selected.threshold"
|
||||
data-ng-options="t.threshold for t in thresholds" required>
|
||||
<option value=""> Thresholding Method </option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<select class="wide-control form-control default" data-ng-model="selected.family"
|
||||
data-ng-options="a.family for a in wavedb" required>
|
||||
<option value=""> Wavelet Family </option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<select class="wide-control form-control default" data-ng-model="selected.wavelet"
|
||||
data-ng-options="b.wavelet for b in selected.family.wavelets" data-ng-change="getMaxIter()" required>
|
||||
<option value=""> Wavelet </option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<select class="wide-control form-control default" data-ng-model="selected.method"
|
||||
data-ng-options="c.method for c in methods" required>
|
||||
<option value=""> Wavelet Methods </option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<select class="wide-control form-control default" data-ng-model="selected.level"
|
||||
data-ng-options="e for e in levels" required>
|
||||
<option value=""> Decomposition Levels </option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<button class="btn btn-primary btn-block" data-ng-click="denoiseSignal()">
|
||||
<span class="glyphicon glyphicon-share-alt pull-left" data-position="left"></span>GO</button>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<button class="btn btn-primary btn-block" id="reportButton" data-ng-click="viewReport()" disabled>
|
||||
<span class="glyphicon glyphicon-share-alt pull-left" data-position="left"></span>View Report</button>
|
||||
</div>
|
||||
<script type="text/ng-template" id="myModalContent2.html">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title" style="font-family:Lucida Console;color:black;font-size:large">Wavelet Denoising Output</h3>
|
||||
</div>
|
||||
<div class="modal-body" style="font-family:Lucida Console;color:blue;font-size:small">
|
||||
<p>Method : {{method}} ({{ext}})</p>
|
||||
<p>Wavelet : {{wname}}</p>
|
||||
<p>Denoising : {{dnmethod}}</p>
|
||||
<p>Threshold : {{threshold}}</p>
|
||||
<p>Decomposition level : {{level}}</p>
|
||||
<p>Denoised Signal : [<span data-ng-repeat="a1 in appx track by $index">{{a1}} {{$last ? '' : ', '}}</span>]</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<!--button class="btn btn-primary" type="button" ng-click="ok()" disabled>OK</button-->
|
||||
<button class="btn btn-warning" type="button" ng-click="cancel()">Cancel</button>
|
||||
</div>
|
||||
</script>
|
||||
</div>
|
76
display.html
Normal file
76
display.html
Normal file
@ -0,0 +1,76 @@
|
||||
<div class="row marketing">
|
||||
<div class="col-md-3"></div>
|
||||
<div class="col-md-6 col-sm-12">
|
||||
<select class="wide-control form-control default" data-ng-model="selected.wdisplay"
|
||||
data-ng-options="wdisplays.indexOf(e) as e for e in wdisplays" data-ng-change="updateGraph()">
|
||||
<option value=""> Select Outputs </option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-3"></div>
|
||||
</div>
|
||||
|
||||
<div class="row marketing">
|
||||
<div class="col-md-2"></div>
|
||||
<div class="col-md-8 col-sm-12">
|
||||
<div id="graph1" style="width:100%"></div>
|
||||
</div>
|
||||
<div class="col-md-2"></div>
|
||||
</div>
|
||||
|
||||
<div class="row marketing">
|
||||
<div class="col-md-6">
|
||||
<select class="wide-control form-control default" data-ng-model="selected.family"
|
||||
data-ng-options="a.family for a in wavedb" required>
|
||||
<option value=""> Wavelet Family </option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<select class="wide-control form-control default" data-ng-model="selected.wavelet"
|
||||
data-ng-options="b.wavelet for b in selected.family.wavelets" data-ng-change="getMaxIter()" required>
|
||||
<option value=""> Wavelet </option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<select class="wide-control form-control default" data-ng-model="selected.method"
|
||||
data-ng-options="c.method for c in methods" required>
|
||||
<option value=""> Wavelet Methods </option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<select class="wide-control form-control default" data-ng-model="selected.level"
|
||||
data-ng-options="d for d in levels" required>
|
||||
<option value=""> Decomposition Levels </option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<button class="btn btn-primary btn-block" data-ng-click="waveTest()">
|
||||
<span class="glyphicon glyphicon-share-alt pull-left" data-position="left"></span>GO</button>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<button class="btn btn-primary btn-block" id="reportButton" data-ng-click="viewReport()" disabled>
|
||||
<span class="glyphicon glyphicon-share-alt pull-left" data-position="left"></span>View Report</button>
|
||||
</div>
|
||||
<script type="text/ng-template" id="myModalContent.html">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title" style="font-family:Lucida Console;color:black;font-size:large">Wavelet Transform Output</h3>
|
||||
</div>
|
||||
<div class="modal-body" style="font-family:Lucida Console;color:blue;font-size:small">
|
||||
<p>Method : {{method}} ({{ext}})</p>
|
||||
<p>Wavelet : {{wname}}</p>
|
||||
<p>Wavelet Filters :</p>
|
||||
<p>LPD : [<span data-ng-repeat="lp1 in lpd track by $index">{{lp1}} {{$last ? '' : ', '}}</span>]</p>
|
||||
<p>HPD : [<span data-ng-repeat="hp1 in hpd track by $index">{{hp1}} {{$last ? '' : ', '}}</span>]</p>
|
||||
<p>LPR : [<span data-ng-repeat="lp2 in lpr track by $index">{{lp2}} {{$last ? '' : ', '}}</span>]</p>
|
||||
<p>HPR : [<span data-ng-repeat="hp2 in hpr track by $index">{{hp2}} {{$last ? '' : ', '}}</span>]</p>
|
||||
<p>Decomposition Levels : {{J}}</p>
|
||||
<p>APPX{{J}} : [<span data-ng-repeat="a1 in appx track by $index">{{a1}} {{$last ? '' : ', '}}</span>]</p>
|
||||
<div data-ng-repeat="detail in details">
|
||||
<p>DET : [<span data-ng-repeat="a2 in detail track by $index">{{a2}} {{$last ? '' : ', '}}</span>]</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<!--button class="btn btn-primary" type="button" ng-click="ok()" disabled>OK</button-->
|
||||
<button class="btn btn-warning" type="button" ng-click="cancel()">Cancel</button>
|
||||
</div>
|
||||
</script>
|
||||
</div>
|
BIN
favicon.ico
Normal file
BIN
favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 40 KiB |
57
frdenoise.html
Normal file
57
frdenoise.html
Normal file
@ -0,0 +1,57 @@
|
||||
<div class="header clearfix">
|
||||
<h3 class="text-muted">Wavelib : Wavelet Transform Online Demo</h3>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row marketing">
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4> Test Signals</h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<button class="btn btn-primary btn-block"><span class="glyphicon glyphicon-hand-down pull-left" data-position="left">
|
||||
</span>Select Example</button>
|
||||
<select class="wide-control form-control default" data-ng-model="tvalue" data-ng-change="testInput()" id="testsig1">
|
||||
<option value=""> SELECT INPUT </option>
|
||||
<option>Noisy Bumps</option>
|
||||
<option>Noisy Doppler</option>
|
||||
<option>Noisy Heavisine</option>
|
||||
<option>Noisy Piecewise Polynomial</option>
|
||||
<option>Noisy Piecewise Regular</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4>Data Input</h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<input class="wide-control form-control default" type="text" data-ng-model="inp1" placeholder="Copy and Paste Data Vector">
|
||||
|
||||
<button class="btn btn-primary btn-block" data-ng-click="dataInput()">
|
||||
<span class="glyphicon glyphicon-share-alt pull-left" data-position="left"></span>GO</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4> File Input</h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<span class="btn btn-block btn-primary btn-file">
|
||||
Browse<input type="file" id="finp1" ></input>
|
||||
</span>
|
||||
<button class="btn btn-primary btn-block" data-ng-click="fileInput()" data-uib="twitter%20bootstrap/button" data-ver="1">
|
||||
<span class="glyphicon glyphicon-folder-open pull-left" data-position="left"></span>Upload</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
60
front.html
Normal file
60
front.html
Normal file
@ -0,0 +1,60 @@
|
||||
<div class="header clearfix">
|
||||
<h3 class="text-muted">Wavelib : Wavelet Transform Online Demo</h3>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row marketing">
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4> Test Signals</h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<button class="btn btn-primary btn-block"><span class="glyphicon glyphicon-hand-down pull-left" data-position="left">
|
||||
</span>Select Example</button>
|
||||
<select class="wide-control form-control default" data-ng-model="tvalue" data-ng-change="testInput()" id="testsig1">
|
||||
<option value=""> SELECT INPUT </option>
|
||||
<option>ECG</option>
|
||||
<option>Heavisine</option>
|
||||
<option>Piecewise Regular 256</option>
|
||||
<option>Piecewise Regular 2048</option>
|
||||
<option>Piecewise Polynomial</option>
|
||||
<option>Noisy Bumps</option>
|
||||
<option>Noisy Heavisine</option>
|
||||
<option>El Nino Data</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4>Data Input</h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<input class="wide-control form-control default" type="text" data-ng-model="inp1" placeholder="Copy and Paste Data Vector">
|
||||
|
||||
<button class="btn btn-primary btn-block" data-ng-click="dataInput()">
|
||||
<span class="glyphicon glyphicon-share-alt pull-left" data-position="left"></span>GO</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4> File Input</h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<span class="btn btn-block btn-primary btn-file">
|
||||
Browse<input type="file" id="finp1" ></input>
|
||||
</span>
|
||||
<button class="btn btn-primary btn-block" data-ng-click="fileInput()" data-uib="twitter%20bootstrap/button" data-ver="1">
|
||||
<span class="glyphicon glyphicon-folder-open pull-left" data-position="left"></span>Upload</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
@ -1,60 +0,0 @@
|
||||
/*
|
||||
Copyright (c) 2017, Rafat Hussain
|
||||
*/
|
||||
#ifndef WAUXLIB_H_
|
||||
#define WAUXLIB_H_
|
||||
|
||||
#include "wavelib.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct denoise_set* denoise_object;
|
||||
|
||||
denoise_object denoise_init(int length, int J,const char* wname);
|
||||
|
||||
struct denoise_set{
|
||||
int N; //signal length
|
||||
int J; // Levels of Wavelet decomposition
|
||||
char wname[10]; //Wavelet name
|
||||
char wmethod[10]; //Wavelet decomposition method - dwt or swt
|
||||
char cmethod[10]; //Cnvolution Method - direct or fft . Available only for modwt.
|
||||
// SWT and DWT only use direct method.
|
||||
char ext[10]; // Signal Extension - sym or per
|
||||
char thresh[10]; // thresholding - soft or hard
|
||||
char level[10]; // Noise Estimation level - first or all
|
||||
char dmethod[20]; //Denoising Method -sureshrink or visushrink
|
||||
//double params[0];
|
||||
};
|
||||
|
||||
void visushrink(double *signal,int N,int J,const char *wname,const char *method,const char *ext,const char *thresh,const char *level,double *denoised);
|
||||
|
||||
void sureshrink(double *signal,int N,int J,const char *wname,const char *method,const char *ext,const char *thresh,const char *level,double *denoised);
|
||||
|
||||
void modwtshrink(double *signal, int N, int J, const char *wname, const char *cmethod, const char *ext, const char *thresh, double *denoised);
|
||||
|
||||
void denoise(denoise_object obj, double *signal,double *denoised);
|
||||
|
||||
void setDenoiseMethod(denoise_object obj, const char *dmethod);
|
||||
|
||||
void setDenoiseWTMethod(denoise_object obj, const char *wmethod);
|
||||
|
||||
void setDenoiseWTExtension(denoise_object obj, const char *extension);
|
||||
|
||||
void setDenoiseParameters(denoise_object obj, const char *thresh,const char *level);
|
||||
|
||||
void denoise_free(denoise_object object);
|
||||
|
||||
void getDWTRecCoeff(double *coeff,int *length,const char *ctype,const char *ext, int level, int J,double *lpr,
|
||||
double *hpr,int lf,int siglength,double *reccoeff);
|
||||
|
||||
double mad(double *x, int N);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* WAUXLIB_H_ */
|
210
header/wavelib.h
Executable file → Normal file
210
header/wavelib.h
Executable file → Normal file
@ -5,28 +5,13 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma warning(disable : 4200)
|
||||
#pragma warning(disable : 4996)
|
||||
#endif
|
||||
|
||||
#ifndef fft_type
|
||||
#define fft_type double
|
||||
#endif
|
||||
|
||||
#ifndef cplx_type
|
||||
#define cplx_type double
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct cplx_t {
|
||||
cplx_type re;
|
||||
cplx_type im;
|
||||
} cplx_data;
|
||||
|
||||
typedef struct wave_set* wave_object;
|
||||
|
||||
wave_object wave_init(const char* wname);
|
||||
wave_object wave_init(char* wname);
|
||||
|
||||
struct wave_set{
|
||||
char wname[50];
|
||||
@ -83,14 +68,13 @@ struct conv_set{
|
||||
|
||||
typedef struct wt_set* wt_object;
|
||||
|
||||
wt_object wt_init(wave_object wave,const char* method, int siglength, int J);
|
||||
wt_object wt_init(wave_object wave,char* method, int siglength, int J);
|
||||
|
||||
struct wt_set{
|
||||
wave_object wave;
|
||||
conv_object cobj;
|
||||
char method[10];
|
||||
int siglength;// Length of the original signal.
|
||||
int modwtsiglength; // Modified signal length for MODWT
|
||||
int outlength;// Length of the output DWT vector
|
||||
int lenlength;// Length of the Output Dimension Vector "length"
|
||||
int J; // Number of decomposition Levels
|
||||
@ -107,207 +91,33 @@ struct wt_set{
|
||||
double params[0];
|
||||
};
|
||||
|
||||
typedef struct wtree_set* wtree_object;
|
||||
void dwt11(wt_object wt, double *Vin, int M, double *Wout,
|
||||
double *Vout);
|
||||
|
||||
wtree_object wtree_init(wave_object wave, int siglength, int J);
|
||||
|
||||
struct wtree_set{
|
||||
wave_object wave;
|
||||
conv_object cobj;
|
||||
char method[10];
|
||||
int siglength;// Length of the original signal.
|
||||
int outlength;// Length of the output DWT vector
|
||||
int lenlength;// Length of the Output Dimension Vector "length"
|
||||
int J; // Number of decomposition Levels
|
||||
int MaxIter;// Maximum Iterations J <= MaxIter
|
||||
int even;// even = 1 if signal is of even length. even = 0 otherwise
|
||||
char ext[10];// Type of Extension used - "per" or "sym"
|
||||
|
||||
int N; //
|
||||
int nodes;
|
||||
int cfftset;
|
||||
int zpad;
|
||||
int length[102];
|
||||
double *output;
|
||||
int *nodelength;
|
||||
int *coeflength;
|
||||
double params[0];
|
||||
};
|
||||
|
||||
typedef struct wpt_set* wpt_object;
|
||||
|
||||
wpt_object wpt_init(wave_object wave, int siglength, int J);
|
||||
|
||||
struct wpt_set{
|
||||
wave_object wave;
|
||||
conv_object cobj;
|
||||
int siglength;// Length of the original signal.
|
||||
int outlength;// Length of the output DWT vector
|
||||
int lenlength;// Length of the Output Dimension Vector "length"
|
||||
int J; // Number of decomposition Levels
|
||||
int MaxIter;// Maximum Iterations J <= MaxIter
|
||||
int even;// even = 1 if signal is of even length. even = 0 otherwise
|
||||
char ext[10];// Type of Extension used - "per" or "sym"
|
||||
char entropy[20];
|
||||
double eparam;
|
||||
|
||||
int N; //
|
||||
int nodes;
|
||||
int length[102];
|
||||
double *output;
|
||||
double *costvalues;
|
||||
double *basisvector;
|
||||
int *nodeindex;
|
||||
int *numnodeslevel;
|
||||
int *coeflength;
|
||||
double params[0];
|
||||
};
|
||||
|
||||
|
||||
typedef struct cwt_set* cwt_object;
|
||||
|
||||
cwt_object cwt_init(const char* wave, double param, int siglength,double dt, int J);
|
||||
|
||||
struct cwt_set{
|
||||
char wave[10];// Wavelet - morl/morlet,paul,dog/dgauss
|
||||
int siglength;// Length of Input Data
|
||||
int J;// Total Number of Scales
|
||||
double s0;// Smallest scale. It depends on the sampling rate. s0 <= 2 * dt for most wavelets
|
||||
double dt;// Sampling Rate
|
||||
double dj;// Separation between scales. eg., scale = s0 * 2 ^ ( [0:N-1] *dj ) or scale = s0 *[0:N-1] * dj
|
||||
char type[10];// Scale Type - Power or Linear
|
||||
int pow;// Base of Power in case type = pow. Typical value is pow = 2
|
||||
int sflag;
|
||||
int pflag;
|
||||
int npad;
|
||||
int mother;
|
||||
double m;// Wavelet parameter param
|
||||
double smean;// Input Signal mean
|
||||
|
||||
cplx_data *output;
|
||||
double *scale;
|
||||
double *period;
|
||||
double *coi;
|
||||
double params[0];
|
||||
};
|
||||
|
||||
typedef struct wt2_set* wt2_object;
|
||||
|
||||
wt2_object wt2_init(wave_object wave, const char* method, int rows, int cols, int J);
|
||||
|
||||
struct wt2_set{
|
||||
wave_object wave;
|
||||
char method[10];
|
||||
int rows;// Matrix Number of rows
|
||||
int cols; // Matrix Number of columns
|
||||
int outlength;// Length of the output DWT vector
|
||||
int J; // Number of decomposition Levels
|
||||
int MaxIter;// Maximum Iterations J <= MaxIter
|
||||
char ext[10];// Type of Extension used - "per" or "sym"
|
||||
int coeffaccesslength;
|
||||
|
||||
int N; //
|
||||
int *dimensions;
|
||||
int *coeffaccess;
|
||||
int params[0];
|
||||
};
|
||||
|
||||
void dwt(wt_object wt, const double *inp);
|
||||
void dwt(wt_object wt, double *inp);
|
||||
|
||||
void idwt(wt_object wt, double *dwtop);
|
||||
|
||||
double *getDWTmra(wt_object wt, double *wavecoeffs);
|
||||
|
||||
void wtree(wtree_object wt, const double *inp);
|
||||
|
||||
void dwpt(wpt_object wt, const double *inp);
|
||||
|
||||
void idwpt(wpt_object wt, double *dwtop);
|
||||
|
||||
void swt(wt_object wt, const double *inp);
|
||||
void swt(wt_object wt, double *inp);
|
||||
|
||||
void iswt(wt_object wt, double *swtop);
|
||||
|
||||
double *getSWTmra(wt_object wt, double *wavecoeffs);
|
||||
|
||||
void modwt(wt_object wt, const double *inp);
|
||||
void modwt(wt_object wt, double *inp);
|
||||
|
||||
void imodwt(wt_object wt, double *dwtop);
|
||||
|
||||
double* getMODWTmra(wt_object wt, double *wavecoeffs);
|
||||
void setDWTExtension(wt_object wt, char *extension);
|
||||
|
||||
void setDWTExtension(wt_object wt, const char *extension);
|
||||
|
||||
void setWTREEExtension(wtree_object wt, const char *extension);
|
||||
|
||||
void setDWPTExtension(wpt_object wt, const char *extension);
|
||||
|
||||
void setDWT2Extension(wt2_object wt, const char *extension);
|
||||
|
||||
void setDWPTEntropy(wpt_object wt, const char *entropy, double eparam);
|
||||
|
||||
void setWTConv(wt_object wt, const char *cmethod);
|
||||
|
||||
int getWTREENodelength(wtree_object wt, int X);
|
||||
|
||||
void getWTREECoeffs(wtree_object wt, int X, int Y, double *coeffs, int N);
|
||||
|
||||
int getDWPTNodelength(wpt_object wt, int X);
|
||||
|
||||
void getDWPTCoeffs(wpt_object wt, int X, int Y, double *coeffs, int N);
|
||||
|
||||
void setCWTScales(cwt_object wt, double s0, double dj, const char *type, int power);
|
||||
|
||||
void setCWTScaleVector(cwt_object wt, const double *scale, int J, double s0, double dj);
|
||||
|
||||
void setCWTPadding(cwt_object wt, int pad);
|
||||
|
||||
void cwt(cwt_object wt, const double *inp);
|
||||
|
||||
void icwt(cwt_object wt, double *cwtop);
|
||||
|
||||
int getCWTScaleLength(int N);
|
||||
|
||||
double* dwt2(wt2_object wt, double *inp);
|
||||
|
||||
void idwt2(wt2_object wt,double *wavecoeff, double *oup);
|
||||
|
||||
double* swt2(wt2_object wt, double *inp);
|
||||
|
||||
void iswt2(wt2_object wt, double *wavecoeffs, double *oup);
|
||||
|
||||
double* modwt2(wt2_object wt, double *inp);
|
||||
|
||||
void imodwt2(wt2_object wt, double *wavecoeff, double *oup);
|
||||
|
||||
double* getWT2Coeffs(wt2_object wt,double* wcoeffs, int level,char *type, int *rows, int *cols);
|
||||
|
||||
void dispWT2Coeffs(double *A, int row, int col);
|
||||
void setWTConv(wt_object wt, char *cmethod);
|
||||
|
||||
void wave_summary(wave_object obj);
|
||||
|
||||
void wt_summary(wt_object wt);
|
||||
|
||||
void wtree_summary(wtree_object wt);
|
||||
|
||||
void wpt_summary(wpt_object wt);
|
||||
|
||||
void cwt_summary(cwt_object wt);
|
||||
|
||||
void wt2_summary(wt2_object wt);
|
||||
|
||||
void wave_free(wave_object object);
|
||||
|
||||
void wt_free(wt_object object);
|
||||
|
||||
void wtree_free(wtree_object object);
|
||||
|
||||
void wpt_free(wpt_object object);
|
||||
|
||||
void cwt_free(cwt_object object);
|
||||
|
||||
void wt2_free(wt2_object wt);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
@ -315,3 +125,5 @@ void wt2_free(wt2_object wt);
|
||||
|
||||
|
||||
#endif /* WAVELIB_H_ */
|
||||
|
||||
|
||||
|
BIN
img/3dgausswave.png
Normal file
BIN
img/3dgausswave.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 41 KiB |
66
index.html
Normal file
66
index.html
Normal file
@ -0,0 +1,66 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Wavelets Online</title>
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="stylesheets/free.css">
|
||||
<script src="js/ie-emulation-modes-warning.js"></script>
|
||||
</head>
|
||||
<body data-ng-app="ngmain">
|
||||
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
|
||||
<div class="container">
|
||||
<!-- Brand and toggle get grouped for better mobile display -->
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="index.html">Wavelib</a>
|
||||
</div>
|
||||
<!-- Collect the nav links, forms, and other content for toggling -->
|
||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="#/">Inputs</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#/about">About</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://rafat.github.io">rafat.github.io</a>
|
||||
</li>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- /.navbar-collapse -->
|
||||
</div>
|
||||
<!-- /.container -->
|
||||
</nav>
|
||||
|
||||
<div class="container">
|
||||
<div data-ng-view></div>
|
||||
|
||||
<footer class="footer">
|
||||
<p><!--© Rafat Hussain 2015--></p>
|
||||
</footer>
|
||||
|
||||
</div> <!-- /container -->
|
||||
|
||||
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
|
||||
<script src="js/ie10-viewport-bug-workaround.js"></script>
|
||||
<script async src="js/wavelib.js"></script>
|
||||
<!--<script src="js/index_user_scripts.js"></script> -->
|
||||
<!--<script src="js/dygraph-combined-dev.js"></script>-->
|
||||
<!--<script async src="js/plotly.min.js"></script>-->
|
||||
<script async src="https://cdn.plot.ly/plotly-1.5.0.min.js"></script>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.5/angular.min.js"></script>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.5/angular-route.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.13.0/ui-bootstrap-tpls.min.js"></script>
|
||||
<script src="js/ngfile.js"></script>
|
||||
</body>
|
||||
</html>
|
54
installer
54
installer
@ -1,54 +0,0 @@
|
||||
#!/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
|
15
js/angular-route.min.js
vendored
Normal file
15
js/angular-route.min.js
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
/*
|
||||
AngularJS v1.3.14
|
||||
(c) 2010-2014 Google, Inc. http://angularjs.org
|
||||
License: MIT
|
||||
*/
|
||||
(function(q,d,C){'use strict';function v(r,k,h){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(a,f,b,c,y){function z(){l&&(h.cancel(l),l=null);m&&(m.$destroy(),m=null);n&&(l=h.leave(n),l.then(function(){l=null}),n=null)}function x(){var b=r.current&&r.current.locals;if(d.isDefined(b&&b.$template)){var b=a.$new(),c=r.current;n=y(b,function(b){h.enter(b,null,n||f).then(function(){!d.isDefined(t)||t&&!a.$eval(t)||k()});z()});m=c.scope=b;m.$emit("$viewContentLoaded");
|
||||
m.$eval(w)}else z()}var m,n,l,t=b.autoscroll,w=b.onload||"";a.$on("$routeChangeSuccess",x);x()}}}function A(d,k,h){return{restrict:"ECA",priority:-400,link:function(a,f){var b=h.current,c=b.locals;f.html(c.$template);var y=d(f.contents());b.controller&&(c.$scope=a,c=k(b.controller,c),b.controllerAs&&(a[b.controllerAs]=c),f.data("$ngControllerController",c),f.children().data("$ngControllerController",c));y(a)}}}q=d.module("ngRoute",["ng"]).provider("$route",function(){function r(a,f){return d.extend(Object.create(a),
|
||||
f)}function k(a,d){var b=d.caseInsensitiveMatch,c={originalPath:a,regexp:a},h=c.keys=[];a=a.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)([\?\*])?/g,function(a,d,b,c){a="?"===c?c:null;c="*"===c?c:null;h.push({name:b,optional:!!a});d=d||"";return""+(a?"":d)+"(?:"+(a?d:"")+(c&&"(.+?)"||"([^/]+)")+(a||"")+")"+(a||"")}).replace(/([\/$\*])/g,"\\$1");c.regexp=new RegExp("^"+a+"$",b?"i":"");return c}var h={};this.when=function(a,f){var b=d.copy(f);d.isUndefined(b.reloadOnSearch)&&(b.reloadOnSearch=!0);
|
||||
d.isUndefined(b.caseInsensitiveMatch)&&(b.caseInsensitiveMatch=this.caseInsensitiveMatch);h[a]=d.extend(b,a&&k(a,b));if(a){var c="/"==a[a.length-1]?a.substr(0,a.length-1):a+"/";h[c]=d.extend({redirectTo:a},k(c,b))}return this};this.caseInsensitiveMatch=!1;this.otherwise=function(a){"string"===typeof a&&(a={redirectTo:a});this.when(null,a);return this};this.$get=["$rootScope","$location","$routeParams","$q","$injector","$templateRequest","$sce",function(a,f,b,c,k,q,x){function m(b){var e=s.current;
|
||||
(v=(p=l())&&e&&p.$$route===e.$$route&&d.equals(p.pathParams,e.pathParams)&&!p.reloadOnSearch&&!w)||!e&&!p||a.$broadcast("$routeChangeStart",p,e).defaultPrevented&&b&&b.preventDefault()}function n(){var u=s.current,e=p;if(v)u.params=e.params,d.copy(u.params,b),a.$broadcast("$routeUpdate",u);else if(e||u)w=!1,(s.current=e)&&e.redirectTo&&(d.isString(e.redirectTo)?f.path(t(e.redirectTo,e.params)).search(e.params).replace():f.url(e.redirectTo(e.pathParams,f.path(),f.search())).replace()),c.when(e).then(function(){if(e){var a=
|
||||
d.extend({},e.resolve),b,g;d.forEach(a,function(b,e){a[e]=d.isString(b)?k.get(b):k.invoke(b,null,null,e)});d.isDefined(b=e.template)?d.isFunction(b)&&(b=b(e.params)):d.isDefined(g=e.templateUrl)&&(d.isFunction(g)&&(g=g(e.params)),g=x.getTrustedResourceUrl(g),d.isDefined(g)&&(e.loadedTemplateUrl=g,b=q(g)));d.isDefined(b)&&(a.$template=b);return c.all(a)}}).then(function(c){e==s.current&&(e&&(e.locals=c,d.copy(e.params,b)),a.$broadcast("$routeChangeSuccess",e,u))},function(b){e==s.current&&a.$broadcast("$routeChangeError",
|
||||
e,u,b)})}function l(){var a,b;d.forEach(h,function(c,h){var g;if(g=!b){var k=f.path();g=c.keys;var m={};if(c.regexp)if(k=c.regexp.exec(k)){for(var l=1,n=k.length;l<n;++l){var p=g[l-1],q=k[l];p&&q&&(m[p.name]=q)}g=m}else g=null;else g=null;g=a=g}g&&(b=r(c,{params:d.extend({},f.search(),a),pathParams:a}),b.$$route=c)});return b||h[null]&&r(h[null],{params:{},pathParams:{}})}function t(a,b){var c=[];d.forEach((a||"").split(":"),function(a,d){if(0===d)c.push(a);else{var f=a.match(/(\w+)(?:[?*])?(.*)/),
|
||||
h=f[1];c.push(b[h]);c.push(f[2]||"");delete b[h]}});return c.join("")}var w=!1,p,v,s={routes:h,reload:function(){w=!0;a.$evalAsync(function(){m();n()})},updateParams:function(a){if(this.current&&this.current.$$route)a=d.extend({},this.current.params,a),f.path(t(this.current.$$route.originalPath,a)),f.search(a);else throw B("norout");}};a.$on("$locationChangeStart",m);a.$on("$locationChangeSuccess",n);return s}]});var B=d.$$minErr("ngRoute");q.provider("$routeParams",function(){this.$get=function(){return{}}});
|
||||
q.directive("ngView",v);q.directive("ngView",A);v.$inject=["$route","$anchorScroll","$animate"];A.$inject=["$compile","$controller","$route"]})(window,window.angular);
|
||||
//# sourceMappingURL=angular-route.min.js.map
|
26181
js/angular.js
vendored
Normal file
26181
js/angular.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
251
js/angular.min.js
vendored
Normal file
251
js/angular.min.js
vendored
Normal file
@ -0,0 +1,251 @@
|
||||
/*
|
||||
AngularJS v1.3.11
|
||||
(c) 2010-2014 Google, Inc. http://angularjs.org
|
||||
License: MIT
|
||||
*/
|
||||
(function(M,Y,t){'use strict';function T(b){return function(){var a=arguments[0],c;c="["+(b?b+":":"")+a+"] http://errors.angularjs.org/1.3.11/"+(b?b+"/":"")+a;for(a=1;a<arguments.length;a++){c=c+(1==a?"?":"&")+"p"+(a-1)+"=";var d=encodeURIComponent,e;e=arguments[a];e="function"==typeof e?e.toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof e?"undefined":"string"!=typeof e?JSON.stringify(e):e;c+=d(e)}return Error(c)}}function Ta(b){if(null==b||Ua(b))return!1;var a=b.length;return b.nodeType===
|
||||
oa&&a?!0:F(b)||D(b)||0===a||"number"===typeof a&&0<a&&a-1 in b}function s(b,a,c){var d,e;if(b)if(G(b))for(d in b)"prototype"==d||"length"==d||"name"==d||b.hasOwnProperty&&!b.hasOwnProperty(d)||a.call(c,b[d],d,b);else if(D(b)||Ta(b)){var f="object"!==typeof b;d=0;for(e=b.length;d<e;d++)(f||d in b)&&a.call(c,b[d],d,b)}else if(b.forEach&&b.forEach!==s)b.forEach(a,c,b);else for(d in b)b.hasOwnProperty(d)&&a.call(c,b[d],d,b);return b}function Ed(b,a,c){for(var d=Object.keys(b).sort(),e=0;e<d.length;e++)a.call(c,
|
||||
b[d[e]],d[e]);return d}function kc(b){return function(a,c){b(c,a)}}function Fd(){return++nb}function lc(b,a){a?b.$$hashKey=a:delete b.$$hashKey}function z(b){for(var a=b.$$hashKey,c=1,d=arguments.length;c<d;c++){var e=arguments[c];if(e)for(var f=Object.keys(e),g=0,h=f.length;g<h;g++){var l=f[g];b[l]=e[l]}}lc(b,a);return b}function ba(b){return parseInt(b,10)}function H(){}function pa(b){return b}function da(b){return function(){return b}}function A(b){return"undefined"===typeof b}function y(b){return"undefined"!==
|
||||
typeof b}function I(b){return null!==b&&"object"===typeof b}function F(b){return"string"===typeof b}function V(b){return"number"===typeof b}function qa(b){return"[object Date]"===Da.call(b)}function G(b){return"function"===typeof b}function ob(b){return"[object RegExp]"===Da.call(b)}function Ua(b){return b&&b.window===b}function Va(b){return b&&b.$evalAsync&&b.$watch}function Wa(b){return"boolean"===typeof b}function mc(b){return!(!b||!(b.nodeName||b.prop&&b.attr&&b.find))}function Gd(b){var a={};
|
||||
b=b.split(",");var c;for(c=0;c<b.length;c++)a[b[c]]=!0;return a}function ua(b){return Q(b.nodeName||b[0]&&b[0].nodeName)}function Xa(b,a){var c=b.indexOf(a);0<=c&&b.splice(c,1);return a}function Ea(b,a,c,d){if(Ua(b)||Va(b))throw Ka("cpws");if(a){if(b===a)throw Ka("cpi");c=c||[];d=d||[];if(I(b)){var e=c.indexOf(b);if(-1!==e)return d[e];c.push(b);d.push(a)}if(D(b))for(var f=a.length=0;f<b.length;f++)e=Ea(b[f],null,c,d),I(b[f])&&(c.push(b[f]),d.push(e)),a.push(e);else{var g=a.$$hashKey;D(a)?a.length=
|
||||
0:s(a,function(b,c){delete a[c]});for(f in b)b.hasOwnProperty(f)&&(e=Ea(b[f],null,c,d),I(b[f])&&(c.push(b[f]),d.push(e)),a[f]=e);lc(a,g)}}else if(a=b)D(b)?a=Ea(b,[],c,d):qa(b)?a=new Date(b.getTime()):ob(b)?(a=new RegExp(b.source,b.toString().match(/[^\/]*$/)[0]),a.lastIndex=b.lastIndex):I(b)&&(e=Object.create(Object.getPrototypeOf(b)),a=Ea(b,e,c,d));return a}function ra(b,a){if(D(b)){a=a||[];for(var c=0,d=b.length;c<d;c++)a[c]=b[c]}else if(I(b))for(c in a=a||{},b)if("$"!==c.charAt(0)||"$"!==c.charAt(1))a[c]=
|
||||
b[c];return a||b}function fa(b,a){if(b===a)return!0;if(null===b||null===a)return!1;if(b!==b&&a!==a)return!0;var c=typeof b,d;if(c==typeof a&&"object"==c)if(D(b)){if(!D(a))return!1;if((c=b.length)==a.length){for(d=0;d<c;d++)if(!fa(b[d],a[d]))return!1;return!0}}else{if(qa(b))return qa(a)?fa(b.getTime(),a.getTime()):!1;if(ob(b)&&ob(a))return b.toString()==a.toString();if(Va(b)||Va(a)||Ua(b)||Ua(a)||D(a))return!1;c={};for(d in b)if("$"!==d.charAt(0)&&!G(b[d])){if(!fa(b[d],a[d]))return!1;c[d]=!0}for(d in a)if(!c.hasOwnProperty(d)&&
|
||||
"$"!==d.charAt(0)&&a[d]!==t&&!G(a[d]))return!1;return!0}return!1}function Ya(b,a,c){return b.concat(Za.call(a,c))}function nc(b,a){var c=2<arguments.length?Za.call(arguments,2):[];return!G(a)||a instanceof RegExp?a:c.length?function(){return arguments.length?a.apply(b,Ya(c,arguments,0)):a.apply(b,c)}:function(){return arguments.length?a.apply(b,arguments):a.call(b)}}function Hd(b,a){var c=a;"string"===typeof b&&"$"===b.charAt(0)&&"$"===b.charAt(1)?c=t:Ua(a)?c="$WINDOW":a&&Y===a?c="$DOCUMENT":Va(a)&&
|
||||
(c="$SCOPE");return c}function $a(b,a){if("undefined"===typeof b)return t;V(a)||(a=a?2:null);return JSON.stringify(b,Hd,a)}function oc(b){return F(b)?JSON.parse(b):b}function va(b){b=B(b).clone();try{b.empty()}catch(a){}var c=B("<div>").append(b).html();try{return b[0].nodeType===pb?Q(c):c.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(a,b){return"<"+Q(b)})}catch(d){return Q(c)}}function pc(b){try{return decodeURIComponent(b)}catch(a){}}function qc(b){var a={},c,d;s((b||"").split("&"),function(b){b&&
|
||||
(c=b.replace(/\+/g,"%20").split("="),d=pc(c[0]),y(d)&&(b=y(c[1])?pc(c[1]):!0,rc.call(a,d)?D(a[d])?a[d].push(b):a[d]=[a[d],b]:a[d]=b))});return a}function Nb(b){var a=[];s(b,function(b,d){D(b)?s(b,function(b){a.push(Fa(d,!0)+(!0===b?"":"="+Fa(b,!0)))}):a.push(Fa(d,!0)+(!0===b?"":"="+Fa(b,!0)))});return a.length?a.join("&"):""}function qb(b){return Fa(b,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function Fa(b,a){return encodeURIComponent(b).replace(/%40/gi,"@").replace(/%3A/gi,
|
||||
":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,a?"%20":"+")}function Id(b,a){var c,d,e=rb.length;b=B(b);for(d=0;d<e;++d)if(c=rb[d]+a,F(c=b.attr(c)))return c;return null}function Jd(b,a){var c,d,e={};s(rb,function(a){a+="app";!c&&b.hasAttribute&&b.hasAttribute(a)&&(c=b,d=b.getAttribute(a))});s(rb,function(a){a+="app";var e;!c&&(e=b.querySelector("["+a.replace(":","\\:")+"]"))&&(c=e,d=e.getAttribute(a))});c&&(e.strictDi=null!==Id(c,"strict-di"),a(c,d?[d]:[],e))}function sc(b,
|
||||
a,c){I(c)||(c={});c=z({strictDi:!1},c);var d=function(){b=B(b);if(b.injector()){var d=b[0]===Y?"document":va(b);throw Ka("btstrpd",d.replace(/</,"<").replace(/>/,">"));}a=a||[];a.unshift(["$provide",function(a){a.value("$rootElement",b)}]);c.debugInfoEnabled&&a.push(["$compileProvider",function(a){a.debugInfoEnabled(!0)}]);a.unshift("ng");d=Ob(a,c.strictDi);d.invoke(["$rootScope","$rootElement","$compile","$injector",function(a,b,c,d){a.$apply(function(){b.data("$injector",d);c(b)(a)})}]);return d},
|
||||
e=/^NG_ENABLE_DEBUG_INFO!/,f=/^NG_DEFER_BOOTSTRAP!/;M&&e.test(M.name)&&(c.debugInfoEnabled=!0,M.name=M.name.replace(e,""));if(M&&!f.test(M.name))return d();M.name=M.name.replace(f,"");ga.resumeBootstrap=function(b){s(b,function(b){a.push(b)});d()}}function Kd(){M.name="NG_ENABLE_DEBUG_INFO!"+M.name;M.location.reload()}function Ld(b){b=ga.element(b).injector();if(!b)throw Ka("test");return b.get("$$testability")}function tc(b,a){a=a||"_";return b.replace(Md,function(b,d){return(d?a:"")+b.toLowerCase()})}
|
||||
function Nd(){var b;uc||((sa=M.jQuery)&&sa.fn.on?(B=sa,z(sa.fn,{scope:La.scope,isolateScope:La.isolateScope,controller:La.controller,injector:La.injector,inheritedData:La.inheritedData}),b=sa.cleanData,sa.cleanData=function(a){var c;if(Pb)Pb=!1;else for(var d=0,e;null!=(e=a[d]);d++)(c=sa._data(e,"events"))&&c.$destroy&&sa(e).triggerHandler("$destroy");b(a)}):B=R,ga.element=B,uc=!0)}function Qb(b,a,c){if(!b)throw Ka("areq",a||"?",c||"required");return b}function sb(b,a,c){c&&D(b)&&(b=b[b.length-1]);
|
||||
Qb(G(b),a,"not a function, got "+(b&&"object"===typeof b?b.constructor.name||"Object":typeof b));return b}function Ma(b,a){if("hasOwnProperty"===b)throw Ka("badname",a);}function vc(b,a,c){if(!a)return b;a=a.split(".");for(var d,e=b,f=a.length,g=0;g<f;g++)d=a[g],b&&(b=(e=b)[d]);return!c&&G(b)?nc(e,b):b}function tb(b){var a=b[0];b=b[b.length-1];var c=[a];do{a=a.nextSibling;if(!a)break;c.push(a)}while(a!==b);return B(c)}function ha(){return Object.create(null)}function Od(b){function a(a,b,c){return a[b]||
|
||||
(a[b]=c())}var c=T("$injector"),d=T("ng");b=a(b,"angular",Object);b.$$minErr=b.$$minErr||T;return a(b,"module",function(){var b={};return function(f,g,h){if("hasOwnProperty"===f)throw d("badname","module");g&&b.hasOwnProperty(f)&&(b[f]=null);return a(b,f,function(){function a(c,d,e,f){f||(f=b);return function(){f[e||"push"]([c,d,arguments]);return u}}if(!g)throw c("nomod",f);var b=[],d=[],e=[],q=a("$injector","invoke","push",d),u={_invokeQueue:b,_configBlocks:d,_runBlocks:e,requires:g,name:f,provider:a("$provide",
|
||||
"provider"),factory:a("$provide","factory"),service:a("$provide","service"),value:a("$provide","value"),constant:a("$provide","constant","unshift"),animation:a("$animateProvider","register"),filter:a("$filterProvider","register"),controller:a("$controllerProvider","register"),directive:a("$compileProvider","directive"),config:q,run:function(a){e.push(a);return this}};h&&q(h);return u})}})}function Pd(b){z(b,{bootstrap:sc,copy:Ea,extend:z,equals:fa,element:B,forEach:s,injector:Ob,noop:H,bind:nc,toJson:$a,
|
||||
fromJson:oc,identity:pa,isUndefined:A,isDefined:y,isString:F,isFunction:G,isObject:I,isNumber:V,isElement:mc,isArray:D,version:Qd,isDate:qa,lowercase:Q,uppercase:ub,callbacks:{counter:0},getTestability:Ld,$$minErr:T,$$csp:ab,reloadWithDebugInfo:Kd});bb=Od(M);try{bb("ngLocale")}catch(a){bb("ngLocale",[]).provider("$locale",Rd)}bb("ng",["ngLocale"],["$provide",function(a){a.provider({$$sanitizeUri:Sd});a.provider("$compile",wc).directive({a:Td,input:xc,textarea:xc,form:Ud,script:Vd,select:Wd,style:Xd,
|
||||
option:Yd,ngBind:Zd,ngBindHtml:$d,ngBindTemplate:ae,ngClass:be,ngClassEven:ce,ngClassOdd:de,ngCloak:ee,ngController:fe,ngForm:ge,ngHide:he,ngIf:ie,ngInclude:je,ngInit:ke,ngNonBindable:le,ngPluralize:me,ngRepeat:ne,ngShow:oe,ngStyle:pe,ngSwitch:qe,ngSwitchWhen:re,ngSwitchDefault:se,ngOptions:te,ngTransclude:ue,ngModel:ve,ngList:we,ngChange:xe,pattern:yc,ngPattern:yc,required:zc,ngRequired:zc,minlength:Ac,ngMinlength:Ac,maxlength:Bc,ngMaxlength:Bc,ngValue:ye,ngModelOptions:ze}).directive({ngInclude:Ae}).directive(vb).directive(Cc);
|
||||
a.provider({$anchorScroll:Be,$animate:Ce,$browser:De,$cacheFactory:Ee,$controller:Fe,$document:Ge,$exceptionHandler:He,$filter:Dc,$interpolate:Ie,$interval:Je,$http:Ke,$httpBackend:Le,$location:Me,$log:Ne,$parse:Oe,$rootScope:Pe,$q:Qe,$$q:Re,$sce:Se,$sceDelegate:Te,$sniffer:Ue,$templateCache:Ve,$templateRequest:We,$$testability:Xe,$timeout:Ye,$window:Ze,$$rAF:$e,$$asyncCallback:af,$$jqLite:bf})}])}function cb(b){return b.replace(cf,function(a,b,d,e){return e?d.toUpperCase():d}).replace(df,"Moz$1")}
|
||||
function Ec(b){b=b.nodeType;return b===oa||!b||9===b}function Fc(b,a){var c,d,e=a.createDocumentFragment(),f=[];if(Rb.test(b)){c=c||e.appendChild(a.createElement("div"));d=(ef.exec(b)||["",""])[1].toLowerCase();d=ia[d]||ia._default;c.innerHTML=d[1]+b.replace(ff,"<$1></$2>")+d[2];for(d=d[0];d--;)c=c.lastChild;f=Ya(f,c.childNodes);c=e.firstChild;c.textContent=""}else f.push(a.createTextNode(b));e.textContent="";e.innerHTML="";s(f,function(a){e.appendChild(a)});return e}function R(b){if(b instanceof
|
||||
R)return b;var a;F(b)&&(b=U(b),a=!0);if(!(this instanceof R)){if(a&&"<"!=b.charAt(0))throw Sb("nosel");return new R(b)}if(a){a=Y;var c;b=(c=gf.exec(b))?[a.createElement(c[1])]:(c=Fc(b,a))?c.childNodes:[]}Gc(this,b)}function Tb(b){return b.cloneNode(!0)}function wb(b,a){a||xb(b);if(b.querySelectorAll)for(var c=b.querySelectorAll("*"),d=0,e=c.length;d<e;d++)xb(c[d])}function Hc(b,a,c,d){if(y(d))throw Sb("offargs");var e=(d=yb(b))&&d.events,f=d&&d.handle;if(f)if(a)s(a.split(" "),function(a){if(y(c)){var d=
|
||||
e[a];Xa(d||[],c);if(d&&0<d.length)return}b.removeEventListener(a,f,!1);delete e[a]});else for(a in e)"$destroy"!==a&&b.removeEventListener(a,f,!1),delete e[a]}function xb(b,a){var c=b.ng339,d=c&&zb[c];d&&(a?delete d.data[a]:(d.handle&&(d.events.$destroy&&d.handle({},"$destroy"),Hc(b)),delete zb[c],b.ng339=t))}function yb(b,a){var c=b.ng339,c=c&&zb[c];a&&!c&&(b.ng339=c=++hf,c=zb[c]={events:{},data:{},handle:t});return c}function Ub(b,a,c){if(Ec(b)){var d=y(c),e=!d&&a&&!I(a),f=!a;b=(b=yb(b,!e))&&b.data;
|
||||
if(d)b[a]=c;else{if(f)return b;if(e)return b&&b[a];z(b,a)}}}function Ab(b,a){return b.getAttribute?-1<(" "+(b.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+a+" "):!1}function Bb(b,a){a&&b.setAttribute&&s(a.split(" "),function(a){b.setAttribute("class",U((" "+(b.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+U(a)+" "," ")))})}function Cb(b,a){if(a&&b.setAttribute){var c=(" "+(b.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");s(a.split(" "),function(a){a=
|
||||
U(a);-1===c.indexOf(" "+a+" ")&&(c+=a+" ")});b.setAttribute("class",U(c))}}function Gc(b,a){if(a)if(a.nodeType)b[b.length++]=a;else{var c=a.length;if("number"===typeof c&&a.window!==a){if(c)for(var d=0;d<c;d++)b[b.length++]=a[d]}else b[b.length++]=a}}function Ic(b,a){return Db(b,"$"+(a||"ngController")+"Controller")}function Db(b,a,c){9==b.nodeType&&(b=b.documentElement);for(a=D(a)?a:[a];b;){for(var d=0,e=a.length;d<e;d++)if((c=B.data(b,a[d]))!==t)return c;b=b.parentNode||11===b.nodeType&&b.host}}
|
||||
function Jc(b){for(wb(b,!0);b.firstChild;)b.removeChild(b.firstChild)}function Kc(b,a){a||wb(b);var c=b.parentNode;c&&c.removeChild(b)}function jf(b,a){a=a||M;if("complete"===a.document.readyState)a.setTimeout(b);else B(a).on("load",b)}function Lc(b,a){var c=Eb[a.toLowerCase()];return c&&Mc[ua(b)]&&c}function kf(b,a){var c=b.nodeName;return("INPUT"===c||"TEXTAREA"===c)&&Nc[a]}function lf(b,a){var c=function(c,e){c.isDefaultPrevented=function(){return c.defaultPrevented};var f=a[e||c.type],g=f?f.length:
|
||||
0;if(g){if(A(c.immediatePropagationStopped)){var h=c.stopImmediatePropagation;c.stopImmediatePropagation=function(){c.immediatePropagationStopped=!0;c.stopPropagation&&c.stopPropagation();h&&h.call(c)}}c.isImmediatePropagationStopped=function(){return!0===c.immediatePropagationStopped};1<g&&(f=ra(f));for(var l=0;l<g;l++)c.isImmediatePropagationStopped()||f[l].call(b,c)}};c.elem=b;return c}function bf(){this.$get=function(){return z(R,{hasClass:function(b,a){b.attr&&(b=b[0]);return Ab(b,a)},addClass:function(b,
|
||||
a){b.attr&&(b=b[0]);return Cb(b,a)},removeClass:function(b,a){b.attr&&(b=b[0]);return Bb(b,a)}})}}function Na(b,a){var c=b&&b.$$hashKey;if(c)return"function"===typeof c&&(c=b.$$hashKey()),c;c=typeof b;return c="function"==c||"object"==c&&null!==b?b.$$hashKey=c+":"+(a||Fd)():c+":"+b}function db(b,a){if(a){var c=0;this.nextUid=function(){return++c}}s(b,this.put,this)}function mf(b){return(b=b.toString().replace(Oc,"").match(Pc))?"function("+(b[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function Vb(b,
|
||||
a,c){var d;if("function"===typeof b){if(!(d=b.$inject)){d=[];if(b.length){if(a)throw F(c)&&c||(c=b.name||mf(b)),Ga("strictdi",c);a=b.toString().replace(Oc,"");a=a.match(Pc);s(a[1].split(nf),function(a){a.replace(of,function(a,b,c){d.push(c)})})}b.$inject=d}}else D(b)?(a=b.length-1,sb(b[a],"fn"),d=b.slice(0,a)):sb(b,"fn",!0);return d}function Ob(b,a){function c(a){return function(b,c){if(I(b))s(b,kc(a));else return a(b,c)}}function d(a,b){Ma(a,"service");if(G(b)||D(b))b=q.instantiate(b);if(!b.$get)throw Ga("pget",
|
||||
a);return n[a+"Provider"]=b}function e(a,b){return function(){var c=r.invoke(b,this);if(A(c))throw Ga("undef",a);return c}}function f(a,b,c){return d(a,{$get:!1!==c?e(a,b):b})}function g(a){var b=[],c;s(a,function(a){function d(a){var b,c;b=0;for(c=a.length;b<c;b++){var e=a[b],f=q.get(e[0]);f[e[1]].apply(f,e[2])}}if(!m.get(a)){m.put(a,!0);try{F(a)?(c=bb(a),b=b.concat(g(c.requires)).concat(c._runBlocks),d(c._invokeQueue),d(c._configBlocks)):G(a)?b.push(q.invoke(a)):D(a)?b.push(q.invoke(a)):sb(a,"module")}catch(e){throw D(a)&&
|
||||
(a=a[a.length-1]),e.message&&e.stack&&-1==e.stack.indexOf(e.message)&&(e=e.message+"\n"+e.stack),Ga("modulerr",a,e.stack||e.message||e);}}});return b}function h(b,c){function d(a,e){if(b.hasOwnProperty(a)){if(b[a]===l)throw Ga("cdep",a+" <- "+k.join(" <- "));return b[a]}try{return k.unshift(a),b[a]=l,b[a]=c(a,e)}catch(f){throw b[a]===l&&delete b[a],f;}finally{k.shift()}}function e(b,c,f,g){"string"===typeof f&&(g=f,f=null);var h=[],k=Vb(b,a,g),l,q,n;q=0;for(l=k.length;q<l;q++){n=k[q];if("string"!==
|
||||
typeof n)throw Ga("itkn",n);h.push(f&&f.hasOwnProperty(n)?f[n]:d(n,g))}D(b)&&(b=b[l]);return b.apply(c,h)}return{invoke:e,instantiate:function(a,b,c){var d=Object.create((D(a)?a[a.length-1]:a).prototype||null);a=e(a,d,b,c);return I(a)||G(a)?a:d},get:d,annotate:Vb,has:function(a){return n.hasOwnProperty(a+"Provider")||b.hasOwnProperty(a)}}}a=!0===a;var l={},k=[],m=new db([],!0),n={$provide:{provider:c(d),factory:c(f),service:c(function(a,b){return f(a,["$injector",function(a){return a.instantiate(b)}])}),
|
||||
value:c(function(a,b){return f(a,da(b),!1)}),constant:c(function(a,b){Ma(a,"constant");n[a]=b;u[a]=b}),decorator:function(a,b){var c=q.get(a+"Provider"),d=c.$get;c.$get=function(){var a=r.invoke(d,c);return r.invoke(b,null,{$delegate:a})}}}},q=n.$injector=h(n,function(a,b){ga.isString(b)&&k.push(b);throw Ga("unpr",k.join(" <- "));}),u={},r=u.$injector=h(u,function(a,b){var c=q.get(a+"Provider",b);return r.invoke(c.$get,c,t,a)});s(g(b),function(a){r.invoke(a||H)});return r}function Be(){var b=!0;this.disableAutoScrolling=
|
||||
function(){b=!1};this.$get=["$window","$location","$rootScope",function(a,c,d){function e(a){var b=null;Array.prototype.some.call(a,function(a){if("a"===ua(a))return b=a,!0});return b}function f(b){if(b){b.scrollIntoView();var c;c=g.yOffset;G(c)?c=c():mc(c)?(c=c[0],c="fixed"!==a.getComputedStyle(c).position?0:c.getBoundingClientRect().bottom):V(c)||(c=0);c&&(b=b.getBoundingClientRect().top,a.scrollBy(0,b-c))}else a.scrollTo(0,0)}function g(){var a=c.hash(),b;a?(b=h.getElementById(a))?f(b):(b=e(h.getElementsByName(a)))?
|
||||
f(b):"top"===a&&f(null):f(null)}var h=a.document;b&&d.$watch(function(){return c.hash()},function(a,b){a===b&&""===a||jf(function(){d.$evalAsync(g)})});return g}]}function af(){this.$get=["$$rAF","$timeout",function(b,a){return b.supported?function(a){return b(a)}:function(b){return a(b,0,!1)}}]}function pf(b,a,c,d){function e(a){try{a.apply(null,Za.call(arguments,1))}finally{if(v--,0===v)for(;w.length;)try{w.pop()()}catch(b){c.error(b)}}}function f(a,b){(function N(){s(L,function(a){a()});C=b(N,
|
||||
a)})()}function g(){h();l()}function h(){x=b.history.state;x=A(x)?null:x;fa(x,J)&&(x=J);J=x}function l(){if(E!==m.url()||P!==x)E=m.url(),P=x,s(W,function(a){a(m.url(),x)})}function k(a){try{return decodeURIComponent(a)}catch(b){return a}}var m=this,n=a[0],q=b.location,u=b.history,r=b.setTimeout,O=b.clearTimeout,p={};m.isMock=!1;var v=0,w=[];m.$$completeOutstandingRequest=e;m.$$incOutstandingRequestCount=function(){v++};m.notifyWhenNoOutstandingRequests=function(a){s(L,function(a){a()});0===v?a():
|
||||
w.push(a)};var L=[],C;m.addPollFn=function(a){A(C)&&f(100,r);L.push(a);return a};var x,P,E=q.href,S=a.find("base"),X=null;h();P=x;m.url=function(a,c,e){A(e)&&(e=null);q!==b.location&&(q=b.location);u!==b.history&&(u=b.history);if(a){var f=P===e;if(E===a&&(!d.history||f))return m;var g=E&&Ha(E)===Ha(a);E=a;P=e;!d.history||g&&f?(g||(X=a),c?q.replace(a):g?(c=q,e=a.indexOf("#"),a=-1===e?"":a.substr(e+1),c.hash=a):q.href=a):(u[c?"replaceState":"pushState"](e,"",a),h(),P=x);return m}return X||q.href.replace(/%27/g,
|
||||
"'")};m.state=function(){return x};var W=[],wa=!1,J=null;m.onUrlChange=function(a){if(!wa){if(d.history)B(b).on("popstate",g);B(b).on("hashchange",g);wa=!0}W.push(a);return a};m.$$checkUrlChange=l;m.baseHref=function(){var a=S.attr("href");return a?a.replace(/^(https?\:)?\/\/[^\/]*/,""):""};var ea={},y="",ca=m.baseHref();m.cookies=function(a,b){var d,e,f,g;if(a)b===t?n.cookie=encodeURIComponent(a)+"=;path="+ca+";expires=Thu, 01 Jan 1970 00:00:00 GMT":F(b)&&(d=(n.cookie=encodeURIComponent(a)+"="+encodeURIComponent(b)+
|
||||
";path="+ca).length+1,4096<d&&c.warn("Cookie '"+a+"' possibly not set or overflowed because it was too large ("+d+" > 4096 bytes)!"));else{if(n.cookie!==y)for(y=n.cookie,d=y.split("; "),ea={},f=0;f<d.length;f++)e=d[f],g=e.indexOf("="),0<g&&(a=k(e.substring(0,g)),ea[a]===t&&(ea[a]=k(e.substring(g+1))));return ea}};m.defer=function(a,b){var c;v++;c=r(function(){delete p[c];e(a)},b||0);p[c]=!0;return c};m.defer.cancel=function(a){return p[a]?(delete p[a],O(a),e(H),!0):!1}}function De(){this.$get=["$window",
|
||||
"$log","$sniffer","$document",function(b,a,c,d){return new pf(b,d,a,c)}]}function Ee(){this.$get=function(){function b(b,d){function e(a){a!=n&&(q?q==a&&(q=a.n):q=a,f(a.n,a.p),f(a,n),n=a,n.n=null)}function f(a,b){a!=b&&(a&&(a.p=b),b&&(b.n=a))}if(b in a)throw T("$cacheFactory")("iid",b);var g=0,h=z({},d,{id:b}),l={},k=d&&d.capacity||Number.MAX_VALUE,m={},n=null,q=null;return a[b]={put:function(a,b){if(k<Number.MAX_VALUE){var c=m[a]||(m[a]={key:a});e(c)}if(!A(b))return a in l||g++,l[a]=b,g>k&&this.remove(q.key),
|
||||
b},get:function(a){if(k<Number.MAX_VALUE){var b=m[a];if(!b)return;e(b)}return l[a]},remove:function(a){if(k<Number.MAX_VALUE){var b=m[a];if(!b)return;b==n&&(n=b.p);b==q&&(q=b.n);f(b.n,b.p);delete m[a]}delete l[a];g--},removeAll:function(){l={};g=0;m={};n=q=null},destroy:function(){m=h=l=null;delete a[b]},info:function(){return z({},h,{size:g})}}}var a={};b.info=function(){var b={};s(a,function(a,e){b[e]=a.info()});return b};b.get=function(b){return a[b]};return b}}function Ve(){this.$get=["$cacheFactory",
|
||||
function(b){return b("templates")}]}function wc(b,a){function c(a,b){var c=/^\s*([@&]|=(\*?))(\??)\s*(\w*)\s*$/,d={};s(a,function(a,e){var f=a.match(c);if(!f)throw ja("iscp",b,e,a);d[e]={mode:f[1][0],collection:"*"===f[2],optional:"?"===f[3],attrName:f[4]||e}});return d}var d={},e=/^\s*directive\:\s*([\w\-]+)\s+(.*)$/,f=/(([\w\-]+)(?:\:([^;]+))?;?)/,g=Gd("ngSrc,ngSrcset,src,srcset"),h=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,l=/^(on[a-z]+|formaction)$/;this.directive=function n(a,e){Ma(a,"directive");F(a)?(Qb(e,
|
||||
"directiveFactory"),d.hasOwnProperty(a)||(d[a]=[],b.factory(a+"Directive",["$injector","$exceptionHandler",function(b,e){var f=[];s(d[a],function(d,g){try{var h=b.invoke(d);G(h)?h={compile:da(h)}:!h.compile&&h.link&&(h.compile=da(h.link));h.priority=h.priority||0;h.index=g;h.name=h.name||a;h.require=h.require||h.controller&&h.name;h.restrict=h.restrict||"EA";I(h.scope)&&(h.$$isolateBindings=c(h.scope,h.name));f.push(h)}catch(l){e(l)}});return f}])),d[a].push(e)):s(a,kc(n));return this};this.aHrefSanitizationWhitelist=
|
||||
function(b){return y(b)?(a.aHrefSanitizationWhitelist(b),this):a.aHrefSanitizationWhitelist()};this.imgSrcSanitizationWhitelist=function(b){return y(b)?(a.imgSrcSanitizationWhitelist(b),this):a.imgSrcSanitizationWhitelist()};var k=!0;this.debugInfoEnabled=function(a){return y(a)?(k=a,this):k};this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$document","$sce","$animate","$$sanitizeUri",function(a,b,c,r,O,p,v,w,L,C,x){function P(a,b){try{a.addClass(b)}catch(c){}}
|
||||
function E(a,b,c,d,e){a instanceof B||(a=B(a));s(a,function(b,c){b.nodeType==pb&&b.nodeValue.match(/\S+/)&&(a[c]=B(b).wrap("<span></span>").parent()[0])});var f=S(a,b,a,c,d,e);E.$$addScopeClass(a);var g=null;return function(b,c,d){Qb(b,"scope");d=d||{};var e=d.parentBoundTranscludeFn,h=d.transcludeControllers;d=d.futureParentElement;e&&e.$$boundTransclude&&(e=e.$$boundTransclude);g||(g=(d=d&&d[0])?"foreignobject"!==ua(d)&&d.toString().match(/SVG/)?"svg":"html":"html");d="html"!==g?B(Wb(g,B("<div>").append(a).html())):
|
||||
c?La.clone.call(a):a;if(h)for(var l in h)d.data("$"+l+"Controller",h[l].instance);E.$$addScopeInfo(d,b);c&&c(d,b);f&&f(b,d,d,e);return d}}function S(a,b,c,d,e,f){function g(a,c,d,e){var f,l,k,q,n,p,w;if(r)for(w=Array(c.length),q=0;q<h.length;q+=3)f=h[q],w[f]=c[f];else w=c;q=0;for(n=h.length;q<n;)l=w[h[q++]],c=h[q++],f=h[q++],c?(c.scope?(k=a.$new(),E.$$addScopeInfo(B(l),k)):k=a,p=c.transcludeOnThisElement?X(a,c.transclude,e,c.elementTranscludeOnThisElement):!c.templateOnThisElement&&e?e:!e&&b?X(a,
|
||||
b):null,c(f,k,l,d,p)):f&&f(a,l.childNodes,t,e)}for(var h=[],l,k,q,n,r,p=0;p<a.length;p++){l=new Xb;k=W(a[p],[],l,0===p?d:t,e);(f=k.length?ea(k,a[p],l,b,c,null,[],[],f):null)&&f.scope&&E.$$addScopeClass(l.$$element);l=f&&f.terminal||!(q=a[p].childNodes)||!q.length?null:S(q,f?(f.transcludeOnThisElement||!f.templateOnThisElement)&&f.transclude:b);if(f||l)h.push(p,f,l),n=!0,r=r||f;f=null}return n?g:null}function X(a,b,c,d){return function(d,e,f,g,h){d||(d=a.$new(!1,h),d.$$transcluded=!0);return b(d,e,
|
||||
{parentBoundTranscludeFn:c,transcludeControllers:f,futureParentElement:g})}}function W(a,b,c,d,g){var h=c.$attr,l;switch(a.nodeType){case oa:ca(b,ya(ua(a)),"E",d,g);for(var k,q,n,r=a.attributes,p=0,w=r&&r.length;p<w;p++){var O=!1,L=!1;k=r[p];l=k.name;q=U(k.value);k=ya(l);if(n=fb.test(k))l=l.replace(Rc,"").substr(8).replace(/_(.)/g,function(a,b){return b.toUpperCase()});var u=k.replace(/(Start|End)$/,"");A(u)&&k===u+"Start"&&(O=l,L=l.substr(0,l.length-5)+"end",l=l.substr(0,l.length-6));k=ya(l.toLowerCase());
|
||||
h[k]=l;if(n||!c.hasOwnProperty(k))c[k]=q,Lc(a,k)&&(c[k]=!0);Pa(a,b,q,k,n);ca(b,k,"A",d,g,O,L)}a=a.className;I(a)&&(a=a.animVal);if(F(a)&&""!==a)for(;l=f.exec(a);)k=ya(l[2]),ca(b,k,"C",d,g)&&(c[k]=U(l[3])),a=a.substr(l.index+l[0].length);break;case pb:M(b,a.nodeValue);break;case 8:try{if(l=e.exec(a.nodeValue))k=ya(l[1]),ca(b,k,"M",d,g)&&(c[k]=U(l[2]))}catch(v){}}b.sort(N);return b}function wa(a,b,c){var d=[],e=0;if(b&&a.hasAttribute&&a.hasAttribute(b)){do{if(!a)throw ja("uterdir",b,c);a.nodeType==
|
||||
oa&&(a.hasAttribute(b)&&e++,a.hasAttribute(c)&&e--);d.push(a);a=a.nextSibling}while(0<e)}else d.push(a);return B(d)}function J(a,b,c){return function(d,e,f,g,h){e=wa(e[0],b,c);return a(d,e,f,g,h)}}function ea(a,d,e,f,g,l,k,n,r){function w(a,b,c,d){if(a){c&&(a=J(a,c,d));a.require=K.require;a.directiveName=z;if(S===K||K.$$isolateScope)a=Z(a,{isolateScope:!0});k.push(a)}if(b){c&&(b=J(b,c,d));b.require=K.require;b.directiveName=z;if(S===K||K.$$isolateScope)b=Z(b,{isolateScope:!0});n.push(b)}}function L(a,
|
||||
b,c,d){var e,f="data",g=!1,l=c,k;if(F(b)){k=b.match(h);b=b.substring(k[0].length);k[3]&&(k[1]?k[3]=null:k[1]=k[3]);"^"===k[1]?f="inheritedData":"^^"===k[1]&&(f="inheritedData",l=c.parent());"?"===k[2]&&(g=!0);e=null;d&&"data"===f&&(e=d[b])&&(e=e.instance);e=e||l[f]("$"+b+"Controller");if(!e&&!g)throw ja("ctreq",b,a);return e||null}D(b)&&(e=[],s(b,function(b){e.push(L(a,b,c,d))}));return e}function v(a,c,f,g,h){function l(a,b,c){var d;Va(a)||(c=b,b=a,a=t);H&&(d=P);c||(c=H?W.parent():W);return h(a,
|
||||
b,d,c,wa)}var r,w,u,x,P,eb,W,J;d===f?(J=e,W=e.$$element):(W=B(f),J=new Xb(W,e));S&&(x=c.$new(!0));h&&(eb=l,eb.$$boundTransclude=h);C&&(X={},P={},s(C,function(a){var b={$scope:a===S||a.$$isolateScope?x:c,$element:W,$attrs:J,$transclude:eb};u=a.controller;"@"==u&&(u=J[a.name]);b=p(u,b,!0,a.controllerAs);P[a.name]=b;H||W.data("$"+a.name+"Controller",b.instance);X[a.name]=b}));if(S){E.$$addScopeInfo(W,x,!0,!(ka&&(ka===S||ka===S.$$originalDirective)));E.$$addScopeClass(W,!0);g=X&&X[S.name];var xa=x;g&&
|
||||
g.identifier&&!0===S.bindToController&&(xa=g.instance);s(x.$$isolateBindings=S.$$isolateBindings,function(a,d){var e=a.attrName,f=a.optional,g,h,l,k;switch(a.mode){case "@":J.$observe(e,function(a){xa[d]=a});J.$$observers[e].$$scope=c;J[e]&&(xa[d]=b(J[e])(c));break;case "=":if(f&&!J[e])break;h=O(J[e]);k=h.literal?fa:function(a,b){return a===b||a!==a&&b!==b};l=h.assign||function(){g=xa[d]=h(c);throw ja("nonassign",J[e],S.name);};g=xa[d]=h(c);f=function(a){k(a,xa[d])||(k(a,g)?l(c,a=xa[d]):xa[d]=a);
|
||||
return g=a};f.$stateful=!0;f=a.collection?c.$watchCollection(J[e],f):c.$watch(O(J[e],f),null,h.literal);x.$on("$destroy",f);break;case "&":h=O(J[e]),xa[d]=function(a){return h(c,a)}}})}X&&(s(X,function(a){a()}),X=null);g=0;for(r=k.length;g<r;g++)w=k[g],$(w,w.isolateScope?x:c,W,J,w.require&&L(w.directiveName,w.require,W,P),eb);var wa=c;S&&(S.template||null===S.templateUrl)&&(wa=x);a&&a(wa,f.childNodes,t,h);for(g=n.length-1;0<=g;g--)w=n[g],$(w,w.isolateScope?x:c,W,J,w.require&&L(w.directiveName,w.require,
|
||||
W,P),eb)}r=r||{};for(var x=-Number.MAX_VALUE,P,C=r.controllerDirectives,X,S=r.newIsolateScopeDirective,ka=r.templateDirective,ea=r.nonTlbTranscludeDirective,ca=!1,A=!1,H=r.hasElementTranscludeDirective,aa=e.$$element=B(d),K,z,N,Aa=f,Q,M=0,R=a.length;M<R;M++){K=a[M];var Pa=K.$$start,fb=K.$$end;Pa&&(aa=wa(d,Pa,fb));N=t;if(x>K.priority)break;if(N=K.scope)K.templateUrl||(I(N)?(Oa("new/isolated scope",S||P,K,aa),S=K):Oa("new/isolated scope",S,K,aa)),P=P||K;z=K.name;!K.templateUrl&&K.controller&&(N=K.controller,
|
||||
C=C||{},Oa("'"+z+"' controller",C[z],K,aa),C[z]=K);if(N=K.transclude)ca=!0,K.$$tlb||(Oa("transclusion",ea,K,aa),ea=K),"element"==N?(H=!0,x=K.priority,N=aa,aa=e.$$element=B(Y.createComment(" "+z+": "+e[z]+" ")),d=aa[0],V(g,Za.call(N,0),d),Aa=E(N,f,x,l&&l.name,{nonTlbTranscludeDirective:ea})):(N=B(Tb(d)).contents(),aa.empty(),Aa=E(N,f));if(K.template)if(A=!0,Oa("template",ka,K,aa),ka=K,N=G(K.template)?K.template(aa,e):K.template,N=Sc(N),K.replace){l=K;N=Rb.test(N)?Tc(Wb(K.templateNamespace,U(N))):[];
|
||||
d=N[0];if(1!=N.length||d.nodeType!==oa)throw ja("tplrt",z,"");V(g,aa,d);R={$attr:{}};N=W(d,[],R);var ba=a.splice(M+1,a.length-(M+1));S&&y(N);a=a.concat(N).concat(ba);Qc(e,R);R=a.length}else aa.html(N);if(K.templateUrl)A=!0,Oa("template",ka,K,aa),ka=K,K.replace&&(l=K),v=T(a.splice(M,a.length-M),aa,e,g,ca&&Aa,k,n,{controllerDirectives:C,newIsolateScopeDirective:S,templateDirective:ka,nonTlbTranscludeDirective:ea}),R=a.length;else if(K.compile)try{Q=K.compile(aa,e,Aa),G(Q)?w(null,Q,Pa,fb):Q&&w(Q.pre,
|
||||
Q.post,Pa,fb)}catch(qf){c(qf,va(aa))}K.terminal&&(v.terminal=!0,x=Math.max(x,K.priority))}v.scope=P&&!0===P.scope;v.transcludeOnThisElement=ca;v.elementTranscludeOnThisElement=H;v.templateOnThisElement=A;v.transclude=Aa;r.hasElementTranscludeDirective=H;return v}function y(a){for(var b=0,c=a.length;b<c;b++){var d=b,e;e=z(Object.create(a[b]),{$$isolateScope:!0});a[d]=e}}function ca(b,e,f,g,h,l,k){if(e===h)return null;h=null;if(d.hasOwnProperty(e)){var q;e=a.get(e+"Directive");for(var r=0,p=e.length;r<
|
||||
p;r++)try{if(q=e[r],(g===t||g>q.priority)&&-1!=q.restrict.indexOf(f)){if(l){var w={$$start:l,$$end:k};q=z(Object.create(q),w)}b.push(q);h=q}}catch(O){c(O)}}return h}function A(b){if(d.hasOwnProperty(b))for(var c=a.get(b+"Directive"),e=0,f=c.length;e<f;e++)if(b=c[e],b.multiElement)return!0;return!1}function Qc(a,b){var c=b.$attr,d=a.$attr,e=a.$$element;s(a,function(d,e){"$"!=e.charAt(0)&&(b[e]&&b[e]!==d&&(d+=("style"===e?";":" ")+b[e]),a.$set(e,d,!0,c[e]))});s(b,function(b,f){"class"==f?(P(e,b),a["class"]=
|
||||
(a["class"]?a["class"]+" ":"")+b):"style"==f?(e.attr("style",e.attr("style")+";"+b),a.style=(a.style?a.style+";":"")+b):"$"==f.charAt(0)||a.hasOwnProperty(f)||(a[f]=b,d[f]=c[f])})}function T(a,b,c,d,e,f,g,h){var l=[],k,q,n=b[0],p=a.shift(),w=z({},p,{templateUrl:null,transclude:null,replace:null,$$originalDirective:p}),O=G(p.templateUrl)?p.templateUrl(b,c):p.templateUrl,u=p.templateNamespace;b.empty();r(L.getTrustedResourceUrl(O)).then(function(r){var L,v;r=Sc(r);if(p.replace){r=Rb.test(r)?Tc(Wb(u,
|
||||
U(r))):[];L=r[0];if(1!=r.length||L.nodeType!==oa)throw ja("tplrt",p.name,O);r={$attr:{}};V(d,b,L);var x=W(L,[],r);I(p.scope)&&y(x);a=x.concat(a);Qc(c,r)}else L=n,b.html(r);a.unshift(w);k=ea(a,L,c,e,b,p,f,g,h);s(d,function(a,c){a==L&&(d[c]=b[0])});for(q=S(b[0].childNodes,e);l.length;){r=l.shift();v=l.shift();var C=l.shift(),E=l.shift(),x=b[0];if(!r.$$destroyed){if(v!==n){var J=v.className;h.hasElementTranscludeDirective&&p.replace||(x=Tb(L));V(C,B(v),x);P(B(x),J)}v=k.transcludeOnThisElement?X(r,k.transclude,
|
||||
E):E;k(q,r,x,d,v)}}l=null});return function(a,b,c,d,e){a=e;b.$$destroyed||(l?l.push(b,c,d,a):(k.transcludeOnThisElement&&(a=X(b,k.transclude,e)),k(q,b,c,d,a)))}}function N(a,b){var c=b.priority-a.priority;return 0!==c?c:a.name!==b.name?a.name<b.name?-1:1:a.index-b.index}function Oa(a,b,c,d){if(b)throw ja("multidir",b.name,c.name,a,va(d));}function M(a,c){var d=b(c,!0);d&&a.push({priority:0,compile:function(a){a=a.parent();var b=!!a.length;b&&E.$$addBindingClass(a);return function(a,c){var e=c.parent();
|
||||
b||E.$$addBindingClass(e);E.$$addBindingInfo(e,d.expressions);a.$watch(d,function(a){c[0].nodeValue=a})}}})}function Wb(a,b){a=Q(a||"html");switch(a){case "svg":case "math":var c=Y.createElement("div");c.innerHTML="<"+a+">"+b+"</"+a+">";return c.childNodes[0].childNodes;default:return b}}function R(a,b){if("srcdoc"==b)return L.HTML;var c=ua(a);if("xlinkHref"==b||"form"==c&&"action"==b||"img"!=c&&("src"==b||"ngSrc"==b))return L.RESOURCE_URL}function Pa(a,c,d,e,f){var h=R(a,e);f=g[e]||f;var k=b(d,!0,
|
||||
h,f);if(k){if("multiple"===e&&"select"===ua(a))throw ja("selmulti",va(a));c.push({priority:100,compile:function(){return{pre:function(a,c,g){c=g.$$observers||(g.$$observers={});if(l.test(e))throw ja("nodomevents");var n=g[e];n!==d&&(k=n&&b(n,!0,h,f),d=n);k&&(g[e]=k(a),(c[e]||(c[e]=[])).$$inter=!0,(g.$$observers&&g.$$observers[e].$$scope||a).$watch(k,function(a,b){"class"===e&&a!=b?g.$updateClass(a,b):g.$set(e,a)}))}}}})}}function V(a,b,c){var d=b[0],e=b.length,f=d.parentNode,g,h;if(a)for(g=0,h=a.length;g<
|
||||
h;g++)if(a[g]==d){a[g++]=c;h=g+e-1;for(var l=a.length;g<l;g++,h++)h<l?a[g]=a[h]:delete a[g];a.length-=e-1;a.context===d&&(a.context=c);break}f&&f.replaceChild(c,d);a=Y.createDocumentFragment();a.appendChild(d);B(c).data(B(d).data());sa?(Pb=!0,sa.cleanData([d])):delete B.cache[d[B.expando]];d=1;for(e=b.length;d<e;d++)f=b[d],B(f).remove(),a.appendChild(f),delete b[d];b[0]=c;b.length=1}function Z(a,b){return z(function(){return a.apply(null,arguments)},a,b)}function $(a,b,d,e,f,g){try{a(b,d,e,f,g)}catch(h){c(h,
|
||||
va(d))}}var Xb=function(a,b){if(b){var c=Object.keys(b),d,e,f;d=0;for(e=c.length;d<e;d++)f=c[d],this[f]=b[f]}else this.$attr={};this.$$element=a};Xb.prototype={$normalize:ya,$addClass:function(a){a&&0<a.length&&C.addClass(this.$$element,a)},$removeClass:function(a){a&&0<a.length&&C.removeClass(this.$$element,a)},$updateClass:function(a,b){var c=Uc(a,b);c&&c.length&&C.addClass(this.$$element,c);(c=Uc(b,a))&&c.length&&C.removeClass(this.$$element,c)},$set:function(a,b,d,e){var f=this.$$element[0],g=
|
||||
Lc(f,a),h=kf(f,a),f=a;g?(this.$$element.prop(a,b),e=g):h&&(this[h]=b,f=h);this[a]=b;e?this.$attr[a]=e:(e=this.$attr[a])||(this.$attr[a]=e=tc(a,"-"));g=ua(this.$$element);if("a"===g&&"href"===a||"img"===g&&"src"===a)this[a]=b=x(b,"src"===a);else if("img"===g&&"srcset"===a){for(var g="",h=U(b),l=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,l=/\s/.test(h)?l:/(,)/,h=h.split(l),l=Math.floor(h.length/2),k=0;k<l;k++)var q=2*k,g=g+x(U(h[q]),!0),g=g+(" "+U(h[q+1]));h=U(h[2*k]).split(/\s/);g+=x(U(h[0]),!0);2===h.length&&
|
||||
(g+=" "+U(h[1]));this[a]=b=g}!1!==d&&(null===b||b===t?this.$$element.removeAttr(e):this.$$element.attr(e,b));(a=this.$$observers)&&s(a[f],function(a){try{a(b)}catch(d){c(d)}})},$observe:function(a,b){var c=this,d=c.$$observers||(c.$$observers=ha()),e=d[a]||(d[a]=[]);e.push(b);v.$evalAsync(function(){!e.$$inter&&c.hasOwnProperty(a)&&b(c[a])});return function(){Xa(e,b)}}};var Aa=b.startSymbol(),ka=b.endSymbol(),Sc="{{"==Aa||"}}"==ka?pa:function(a){return a.replace(/\{\{/g,Aa).replace(/}}/g,ka)},fb=
|
||||
/^ngAttr[A-Z]/;E.$$addBindingInfo=k?function(a,b){var c=a.data("$binding")||[];D(b)?c=c.concat(b):c.push(b);a.data("$binding",c)}:H;E.$$addBindingClass=k?function(a){P(a,"ng-binding")}:H;E.$$addScopeInfo=k?function(a,b,c,d){a.data(c?d?"$isolateScopeNoTemplate":"$isolateScope":"$scope",b)}:H;E.$$addScopeClass=k?function(a,b){P(a,b?"ng-isolate-scope":"ng-scope")}:H;return E}]}function ya(b){return cb(b.replace(Rc,""))}function Uc(b,a){var c="",d=b.split(/\s+/),e=a.split(/\s+/),f=0;a:for(;f<d.length;f++){for(var g=
|
||||
d[f],h=0;h<e.length;h++)if(g==e[h])continue a;c+=(0<c.length?" ":"")+g}return c}function Tc(b){b=B(b);var a=b.length;if(1>=a)return b;for(;a--;)8===b[a].nodeType&&rf.call(b,a,1);return b}function Fe(){var b={},a=!1,c=/^(\S+)(\s+as\s+(\w+))?$/;this.register=function(a,c){Ma(a,"controller");I(a)?z(b,a):b[a]=c};this.allowGlobals=function(){a=!0};this.$get=["$injector","$window",function(d,e){function f(a,b,c,d){if(!a||!I(a.$scope))throw T("$controller")("noscp",d,b);a.$scope[b]=c}return function(g,h,
|
||||
l,k){var m,n,q;l=!0===l;k&&F(k)&&(q=k);F(g)&&(k=g.match(c),n=k[1],q=q||k[3],g=b.hasOwnProperty(n)?b[n]:vc(h.$scope,n,!0)||(a?vc(e,n,!0):t),sb(g,n,!0));if(l)return l=(D(g)?g[g.length-1]:g).prototype,m=Object.create(l||null),q&&f(h,q,m,n||g.name),z(function(){d.invoke(g,m,h,n);return m},{instance:m,identifier:q});m=d.instantiate(g,h,n);q&&f(h,q,m,n||g.name);return m}}]}function Ge(){this.$get=["$window",function(b){return B(b.document)}]}function He(){this.$get=["$log",function(b){return function(a,
|
||||
c){b.error.apply(b,arguments)}}]}function Yb(b,a){if(F(b)){var c=b.replace(sf,"").trim();if(c){var d=a("Content-Type");(d=d&&0===d.indexOf(Vc))||(d=(d=c.match(tf))&&uf[d[0]].test(c));d&&(b=oc(c))}}return b}function Wc(b){var a=ha(),c,d,e;if(!b)return a;s(b.split("\n"),function(b){e=b.indexOf(":");c=Q(U(b.substr(0,e)));d=U(b.substr(e+1));c&&(a[c]=a[c]?a[c]+", "+d:d)});return a}function Xc(b){var a=I(b)?b:t;return function(c){a||(a=Wc(b));return c?(c=a[Q(c)],void 0===c&&(c=null),c):a}}function Yc(b,
|
||||
a,c,d){if(G(d))return d(b,a,c);s(d,function(d){b=d(b,a,c)});return b}function Ke(){var b=this.defaults={transformResponse:[Yb],transformRequest:[function(a){return I(a)&&"[object File]"!==Da.call(a)&&"[object Blob]"!==Da.call(a)&&"[object FormData]"!==Da.call(a)?$a(a):a}],headers:{common:{Accept:"application/json, text/plain, */*"},post:ra(Zb),put:ra(Zb),patch:ra(Zb)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN"},a=!1;this.useApplyAsync=function(b){return y(b)?(a=!!b,this):a};var c=this.interceptors=
|
||||
[];this.$get=["$httpBackend","$browser","$cacheFactory","$rootScope","$q","$injector",function(d,e,f,g,h,l){function k(a){function c(a){var b=z({},a);b.data=a.data?Yc(a.data,a.headers,a.status,e.transformResponse):a.data;a=a.status;return 200<=a&&300>a?b:h.reject(b)}function d(a){var b,c={};s(a,function(a,d){G(a)?(b=a(),null!=b&&(c[d]=b)):c[d]=a});return c}if(!ga.isObject(a))throw T("$http")("badreq",a);var e=z({method:"get",transformRequest:b.transformRequest,transformResponse:b.transformResponse},
|
||||
a);e.headers=function(a){var c=b.headers,e=z({},a.headers),f,g,c=z({},c.common,c[Q(a.method)]);a:for(f in c){a=Q(f);for(g in e)if(Q(g)===a)continue a;e[f]=c[f]}return d(e)}(a);e.method=ub(e.method);var f=[function(a){var d=a.headers,e=Yc(a.data,Xc(d),t,a.transformRequest);A(e)&&s(d,function(a,b){"content-type"===Q(b)&&delete d[b]});A(a.withCredentials)&&!A(b.withCredentials)&&(a.withCredentials=b.withCredentials);return m(a,e).then(c,c)},t],g=h.when(e);for(s(u,function(a){(a.request||a.requestError)&&
|
||||
f.unshift(a.request,a.requestError);(a.response||a.responseError)&&f.push(a.response,a.responseError)});f.length;){a=f.shift();var l=f.shift(),g=g.then(a,l)}g.success=function(a){g.then(function(b){a(b.data,b.status,b.headers,e)});return g};g.error=function(a){g.then(null,function(b){a(b.data,b.status,b.headers,e)});return g};return g}function m(c,f){function l(b,c,d,e){function f(){m(c,b,d,e)}P&&(200<=b&&300>b?P.put(X,[b,c,Wc(d),e]):P.remove(X));a?g.$applyAsync(f):(f(),g.$$phase||g.$apply())}function m(a,
|
||||
b,d,e){b=Math.max(b,0);(200<=b&&300>b?C.resolve:C.reject)({data:a,status:b,headers:Xc(d),config:c,statusText:e})}function w(a){m(a.data,a.status,ra(a.headers()),a.statusText)}function u(){var a=k.pendingRequests.indexOf(c);-1!==a&&k.pendingRequests.splice(a,1)}var C=h.defer(),x=C.promise,P,E,s=c.headers,X=n(c.url,c.params);k.pendingRequests.push(c);x.then(u,u);!c.cache&&!b.cache||!1===c.cache||"GET"!==c.method&&"JSONP"!==c.method||(P=I(c.cache)?c.cache:I(b.cache)?b.cache:q);P&&(E=P.get(X),y(E)?E&&
|
||||
G(E.then)?E.then(w,w):D(E)?m(E[1],E[0],ra(E[2]),E[3]):m(E,200,{},"OK"):P.put(X,x));A(E)&&((E=Zc(c.url)?e.cookies()[c.xsrfCookieName||b.xsrfCookieName]:t)&&(s[c.xsrfHeaderName||b.xsrfHeaderName]=E),d(c.method,X,f,l,s,c.timeout,c.withCredentials,c.responseType));return x}function n(a,b){if(!b)return a;var c=[];Ed(b,function(a,b){null===a||A(a)||(D(a)||(a=[a]),s(a,function(a){I(a)&&(a=qa(a)?a.toISOString():$a(a));c.push(Fa(b)+"="+Fa(a))}))});0<c.length&&(a+=(-1==a.indexOf("?")?"?":"&")+c.join("&"));
|
||||
return a}var q=f("$http"),u=[];s(c,function(a){u.unshift(F(a)?l.get(a):l.invoke(a))});k.pendingRequests=[];(function(a){s(arguments,function(a){k[a]=function(b,c){return k(z(c||{},{method:a,url:b}))}})})("get","delete","head","jsonp");(function(a){s(arguments,function(a){k[a]=function(b,c,d){return k(z(d||{},{method:a,url:b,data:c}))}})})("post","put","patch");k.defaults=b;return k}]}function vf(){return new M.XMLHttpRequest}function Le(){this.$get=["$browser","$window","$document",function(b,a,c){return wf(b,
|
||||
vf,b.defer,a.angular.callbacks,c[0])}]}function wf(b,a,c,d,e){function f(a,b,c){var f=e.createElement("script"),m=null;f.type="text/javascript";f.src=a;f.async=!0;m=function(a){f.removeEventListener("load",m,!1);f.removeEventListener("error",m,!1);e.body.removeChild(f);f=null;var g=-1,u="unknown";a&&("load"!==a.type||d[b].called||(a={type:"error"}),u=a.type,g="error"===a.type?404:200);c&&c(g,u)};f.addEventListener("load",m,!1);f.addEventListener("error",m,!1);e.body.appendChild(f);return m}return function(e,
|
||||
h,l,k,m,n,q,u){function r(){v&&v();w&&w.abort()}function O(a,d,e,f,g){C!==t&&c.cancel(C);v=w=null;a(d,e,f,g);b.$$completeOutstandingRequest(H)}b.$$incOutstandingRequestCount();h=h||b.url();if("jsonp"==Q(e)){var p="_"+(d.counter++).toString(36);d[p]=function(a){d[p].data=a;d[p].called=!0};var v=f(h.replace("JSON_CALLBACK","angular.callbacks."+p),p,function(a,b){O(k,a,d[p].data,"",b);d[p]=H})}else{var w=a();w.open(e,h,!0);s(m,function(a,b){y(a)&&w.setRequestHeader(b,a)});w.onload=function(){var a=w.statusText||
|
||||
"",b="response"in w?w.response:w.responseText,c=1223===w.status?204:w.status;0===c&&(c=b?200:"file"==Ba(h).protocol?404:0);O(k,c,b,w.getAllResponseHeaders(),a)};e=function(){O(k,-1,null,null,"")};w.onerror=e;w.onabort=e;q&&(w.withCredentials=!0);if(u)try{w.responseType=u}catch(L){if("json"!==u)throw L;}w.send(l||null)}if(0<n)var C=c(r,n);else n&&G(n.then)&&n.then(r)}}function Ie(){var b="{{",a="}}";this.startSymbol=function(a){return a?(b=a,this):b};this.endSymbol=function(b){return b?(a=b,this):
|
||||
a};this.$get=["$parse","$exceptionHandler","$sce",function(c,d,e){function f(a){return"\\\\\\"+a}function g(f,g,u,r){function O(c){return c.replace(k,b).replace(m,a)}function p(a){try{var b=a;a=u?e.getTrusted(u,b):e.valueOf(b);var c;if(r&&!y(a))c=a;else if(null==a)c="";else{switch(typeof a){case "string":break;case "number":a=""+a;break;default:a=$a(a)}c=a}return c}catch(g){c=$b("interr",f,g.toString()),d(c)}}r=!!r;for(var v,w,L=0,C=[],x=[],P=f.length,E=[],s=[];L<P;)if(-1!=(v=f.indexOf(b,L))&&-1!=
|
||||
(w=f.indexOf(a,v+h)))L!==v&&E.push(O(f.substring(L,v))),L=f.substring(v+h,w),C.push(L),x.push(c(L,p)),L=w+l,s.push(E.length),E.push("");else{L!==P&&E.push(O(f.substring(L)));break}if(u&&1<E.length)throw $b("noconcat",f);if(!g||C.length){var X=function(a){for(var b=0,c=C.length;b<c;b++){if(r&&A(a[b]))return;E[s[b]]=a[b]}return E.join("")};return z(function(a){var b=0,c=C.length,e=Array(c);try{for(;b<c;b++)e[b]=x[b](a);return X(e)}catch(g){a=$b("interr",f,g.toString()),d(a)}},{exp:f,expressions:C,$$watchDelegate:function(a,
|
||||
b,c){var d;return a.$watchGroup(x,function(c,e){var f=X(c);G(b)&&b.call(this,f,c!==e?d:f,a);d=f},c)}})}}var h=b.length,l=a.length,k=new RegExp(b.replace(/./g,f),"g"),m=new RegExp(a.replace(/./g,f),"g");g.startSymbol=function(){return b};g.endSymbol=function(){return a};return g}]}function Je(){this.$get=["$rootScope","$window","$q","$$q",function(b,a,c,d){function e(e,h,l,k){var m=a.setInterval,n=a.clearInterval,q=0,u=y(k)&&!k,r=(u?d:c).defer(),O=r.promise;l=y(l)?l:0;O.then(null,null,e);O.$$intervalId=
|
||||
m(function(){r.notify(q++);0<l&&q>=l&&(r.resolve(q),n(O.$$intervalId),delete f[O.$$intervalId]);u||b.$apply()},h);f[O.$$intervalId]=r;return O}var f={};e.cancel=function(b){return b&&b.$$intervalId in f?(f[b.$$intervalId].reject("canceled"),a.clearInterval(b.$$intervalId),delete f[b.$$intervalId],!0):!1};return e}]}function Rd(){this.$get=function(){return{id:"en-us",NUMBER_FORMATS:{DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{minInt:1,minFrac:0,maxFrac:3,posPre:"",posSuf:"",negPre:"-",negSuf:"",gSize:3,
|
||||
lgSize:3},{minInt:1,minFrac:2,maxFrac:2,posPre:"\u00a4",posSuf:"",negPre:"(\u00a4",negSuf:")",gSize:3,lgSize:3}],CURRENCY_SYM:"$"},DATETIME_FORMATS:{MONTH:"January February March April May June July August September October November December".split(" "),SHORTMONTH:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),DAY:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),SHORTDAY:"Sun Mon Tue Wed Thu Fri Sat".split(" "),AMPMS:["AM","PM"],medium:"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a",
|
||||
fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",mediumDate:"MMM d, y",shortDate:"M/d/yy",mediumTime:"h:mm:ss a",shortTime:"h:mm a"},pluralCat:function(b){return 1===b?"one":"other"}}}}function ac(b){b=b.split("/");for(var a=b.length;a--;)b[a]=qb(b[a]);return b.join("/")}function $c(b,a){var c=Ba(b);a.$$protocol=c.protocol;a.$$host=c.hostname;a.$$port=ba(c.port)||xf[c.protocol]||null}function ad(b,a){var c="/"!==b.charAt(0);c&&(b="/"+b);var d=Ba(b);a.$$path=decodeURIComponent(c&&"/"===d.pathname.charAt(0)?
|
||||
d.pathname.substring(1):d.pathname);a.$$search=qc(d.search);a.$$hash=decodeURIComponent(d.hash);a.$$path&&"/"!=a.$$path.charAt(0)&&(a.$$path="/"+a.$$path)}function za(b,a){if(0===a.indexOf(b))return a.substr(b.length)}function Ha(b){var a=b.indexOf("#");return-1==a?b:b.substr(0,a)}function bd(b){return b.replace(/(#.+)|#$/,"$1")}function bc(b){return b.substr(0,Ha(b).lastIndexOf("/")+1)}function cc(b,a){this.$$html5=!0;a=a||"";var c=bc(b);$c(b,this);this.$$parse=function(a){var b=za(c,a);if(!F(b))throw Fb("ipthprfx",
|
||||
a,c);ad(b,this);this.$$path||(this.$$path="/");this.$$compose()};this.$$compose=function(){var a=Nb(this.$$search),b=this.$$hash?"#"+qb(this.$$hash):"";this.$$url=ac(this.$$path)+(a?"?"+a:"")+b;this.$$absUrl=c+this.$$url.substr(1)};this.$$parseLinkUrl=function(d,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;(f=za(b,d))!==t?(g=f,g=(f=za(a,f))!==t?c+(za("/",f)||f):b+g):(f=za(c,d))!==t?g=c+f:c==d+"/"&&(g=c);g&&this.$$parse(g);return!!g}}function dc(b,a){var c=bc(b);$c(b,this);this.$$parse=
|
||||
function(d){d=za(b,d)||za(c,d);var e;"#"===d.charAt(0)?(e=za(a,d),A(e)&&(e=d)):e=this.$$html5?d:"";ad(e,this);d=this.$$path;var f=/^\/[A-Z]:(\/.*)/;0===e.indexOf(b)&&(e=e.replace(b,""));f.exec(e)||(d=(e=f.exec(d))?e[1]:d);this.$$path=d;this.$$compose()};this.$$compose=function(){var c=Nb(this.$$search),e=this.$$hash?"#"+qb(this.$$hash):"";this.$$url=ac(this.$$path)+(c?"?"+c:"")+e;this.$$absUrl=b+(this.$$url?a+this.$$url:"")};this.$$parseLinkUrl=function(a,c){return Ha(b)==Ha(a)?(this.$$parse(a),!0):
|
||||
!1}}function cd(b,a){this.$$html5=!0;dc.apply(this,arguments);var c=bc(b);this.$$parseLinkUrl=function(d,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;b==Ha(d)?f=d:(g=za(c,d))?f=b+a+g:c===d+"/"&&(f=c);f&&this.$$parse(f);return!!f};this.$$compose=function(){var c=Nb(this.$$search),e=this.$$hash?"#"+qb(this.$$hash):"";this.$$url=ac(this.$$path)+(c?"?"+c:"")+e;this.$$absUrl=b+a+this.$$url}}function Gb(b){return function(){return this[b]}}function dd(b,a){return function(c){if(A(c))return this[b];
|
||||
this[b]=a(c);this.$$compose();return this}}function Me(){var b="",a={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(a){return y(a)?(b=a,this):b};this.html5Mode=function(b){return Wa(b)?(a.enabled=b,this):I(b)?(Wa(b.enabled)&&(a.enabled=b.enabled),Wa(b.requireBase)&&(a.requireBase=b.requireBase),Wa(b.rewriteLinks)&&(a.rewriteLinks=b.rewriteLinks),this):a};this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(c,d,e,f,g){function h(a,b,c){var e=k.url(),
|
||||
f=k.$$state;try{d.url(a,b,c),k.$$state=d.state()}catch(g){throw k.url(e),k.$$state=f,g;}}function l(a,b){c.$broadcast("$locationChangeSuccess",k.absUrl(),a,k.$$state,b)}var k,m;m=d.baseHref();var n=d.url(),q;if(a.enabled){if(!m&&a.requireBase)throw Fb("nobase");q=n.substring(0,n.indexOf("/",n.indexOf("//")+2))+(m||"/");m=e.history?cc:cd}else q=Ha(n),m=dc;k=new m(q,"#"+b);k.$$parseLinkUrl(n,n);k.$$state=d.state();var u=/^\s*(javascript|mailto):/i;f.on("click",function(b){if(a.rewriteLinks&&!b.ctrlKey&&
|
||||
!b.metaKey&&!b.shiftKey&&2!=b.which&&2!=b.button){for(var e=B(b.target);"a"!==ua(e[0]);)if(e[0]===f[0]||!(e=e.parent())[0])return;var h=e.prop("href"),l=e.attr("href")||e.attr("xlink:href");I(h)&&"[object SVGAnimatedString]"===h.toString()&&(h=Ba(h.animVal).href);u.test(h)||!h||e.attr("target")||b.isDefaultPrevented()||!k.$$parseLinkUrl(h,l)||(b.preventDefault(),k.absUrl()!=d.url()&&(c.$apply(),g.angular["ff-684208-preventDefault"]=!0))}});k.absUrl()!=n&&d.url(k.absUrl(),!0);var r=!0;d.onUrlChange(function(a,
|
||||
b){c.$evalAsync(function(){var d=k.absUrl(),e=k.$$state,f;k.$$parse(a);k.$$state=b;f=c.$broadcast("$locationChangeStart",a,d,b,e).defaultPrevented;k.absUrl()===a&&(f?(k.$$parse(d),k.$$state=e,h(d,!1,e)):(r=!1,l(d,e)))});c.$$phase||c.$digest()});c.$watch(function(){var a=bd(d.url()),b=bd(k.absUrl()),f=d.state(),g=k.$$replace,q=a!==b||k.$$html5&&e.history&&f!==k.$$state;if(r||q)r=!1,c.$evalAsync(function(){var b=k.absUrl(),d=c.$broadcast("$locationChangeStart",b,a,k.$$state,f).defaultPrevented;k.absUrl()===
|
||||
b&&(d?(k.$$parse(a),k.$$state=f):(q&&h(b,g,f===k.$$state?null:k.$$state),l(a,f)))});k.$$replace=!1});return k}]}function Ne(){var b=!0,a=this;this.debugEnabled=function(a){return y(a)?(b=a,this):b};this.$get=["$window",function(c){function d(a){a instanceof Error&&(a.stack?a=a.message&&-1===a.stack.indexOf(a.message)?"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&&(a=a.message+"\n"+a.sourceURL+":"+a.line));return a}function e(a){var b=c.console||{},e=b[a]||b.log||H;a=!1;try{a=!!e.apply}catch(l){}return a?
|
||||
function(){var a=[];s(arguments,function(b){a.push(d(b))});return e.apply(b,a)}:function(a,b){e(a,null==b?"":b)}}return{log:e("log"),info:e("info"),warn:e("warn"),error:e("error"),debug:function(){var c=e("debug");return function(){b&&c.apply(a,arguments)}}()}}]}function ta(b,a){if("__defineGetter__"===b||"__defineSetter__"===b||"__lookupGetter__"===b||"__lookupSetter__"===b||"__proto__"===b)throw la("isecfld",a);return b}function ma(b,a){if(b){if(b.constructor===b)throw la("isecfn",a);if(b.window===
|
||||
b)throw la("isecwindow",a);if(b.children&&(b.nodeName||b.prop&&b.attr&&b.find))throw la("isecdom",a);if(b===Object)throw la("isecobj",a);}return b}function ec(b){return b.constant}function gb(b,a,c,d,e){ma(b,e);ma(a,e);c=c.split(".");for(var f,g=0;1<c.length;g++){f=ta(c.shift(),e);var h=0===g&&a&&a[f]||b[f];h||(h={},b[f]=h);b=ma(h,e)}f=ta(c.shift(),e);ma(b[f],e);return b[f]=d}function Qa(b){return"constructor"==b}function ed(b,a,c,d,e,f,g){ta(b,f);ta(a,f);ta(c,f);ta(d,f);ta(e,f);var h=function(a){return ma(a,
|
||||
f)},l=g||Qa(b)?h:pa,k=g||Qa(a)?h:pa,m=g||Qa(c)?h:pa,n=g||Qa(d)?h:pa,q=g||Qa(e)?h:pa;return function(f,g){var h=g&&g.hasOwnProperty(b)?g:f;if(null==h)return h;h=l(h[b]);if(!a)return h;if(null==h)return t;h=k(h[a]);if(!c)return h;if(null==h)return t;h=m(h[c]);if(!d)return h;if(null==h)return t;h=n(h[d]);return e?null==h?t:h=q(h[e]):h}}function yf(b,a){return function(c,d){return b(c,d,ma,a)}}function zf(b,a,c){var d=a.expensiveChecks,e=d?Af:Bf,f=e[b];if(f)return f;var g=b.split("."),h=g.length;if(a.csp)f=
|
||||
6>h?ed(g[0],g[1],g[2],g[3],g[4],c,d):function(a,b){var e=0,f;do f=ed(g[e++],g[e++],g[e++],g[e++],g[e++],c,d)(a,b),b=t,a=f;while(e<h);return f};else{var l="";d&&(l+="s = eso(s, fe);\nl = eso(l, fe);\n");var k=d;s(g,function(a,b){ta(a,c);var e=(b?"s":'((l&&l.hasOwnProperty("'+a+'"))?l:s)')+"."+a;if(d||Qa(a))e="eso("+e+", fe)",k=!0;l+="if(s == null) return undefined;\ns="+e+";\n"});l+="return s;";a=new Function("s","l","eso","fe",l);a.toString=da(l);k&&(a=yf(a,c));f=a}f.sharedGetter=!0;f.assign=function(a,
|
||||
c,d){return gb(a,d,b,c,b)};return e[b]=f}function fc(b){return G(b.valueOf)?b.valueOf():Cf.call(b)}function Oe(){var b=ha(),a=ha();this.$get=["$filter","$sniffer",function(c,d){function e(a){var b=a;a.sharedGetter&&(b=function(b,c){return a(b,c)},b.literal=a.literal,b.constant=a.constant,b.assign=a.assign);return b}function f(a,b){for(var c=0,d=a.length;c<d;c++){var e=a[c];e.constant||(e.inputs?f(e.inputs,b):-1===b.indexOf(e)&&b.push(e))}return b}function g(a,b){return null==a||null==b?a===b:"object"===
|
||||
typeof a&&(a=fc(a),"object"===typeof a)?!1:a===b||a!==a&&b!==b}function h(a,b,c,d){var e=d.$$inputs||(d.$$inputs=f(d.inputs,[])),h;if(1===e.length){var l=g,e=e[0];return a.$watch(function(a){var b=e(a);g(b,l)||(h=d(a),l=b&&fc(b));return h},b,c)}for(var k=[],q=0,n=e.length;q<n;q++)k[q]=g;return a.$watch(function(a){for(var b=!1,c=0,f=e.length;c<f;c++){var l=e[c](a);if(b||(b=!g(l,k[c])))k[c]=l&&fc(l)}b&&(h=d(a));return h},b,c)}function l(a,b,c,d){var e,f;return e=a.$watch(function(a){return d(a)},function(a,
|
||||
c,d){f=a;G(b)&&b.apply(this,arguments);y(a)&&d.$$postDigest(function(){y(f)&&e()})},c)}function k(a,b,c,d){function e(a){var b=!0;s(a,function(a){y(a)||(b=!1)});return b}var f,g;return f=a.$watch(function(a){return d(a)},function(a,c,d){g=a;G(b)&&b.call(this,a,c,d);e(a)&&d.$$postDigest(function(){e(g)&&f()})},c)}function m(a,b,c,d){var e;return e=a.$watch(function(a){return d(a)},function(a,c,d){G(b)&&b.apply(this,arguments);e()},c)}function n(a,b){if(!b)return a;var c=a.$$watchDelegate,c=c!==k&&
|
||||
c!==l?function(c,d){var e=a(c,d);return b(e,c,d)}:function(c,d){var e=a(c,d),f=b(e,c,d);return y(e)?f:e};a.$$watchDelegate&&a.$$watchDelegate!==h?c.$$watchDelegate=a.$$watchDelegate:b.$stateful||(c.$$watchDelegate=h,c.inputs=[a]);return c}var q={csp:d.csp,expensiveChecks:!1},u={csp:d.csp,expensiveChecks:!0};return function(d,f,g){var v,w,L;switch(typeof d){case "string":L=d=d.trim();var C=g?a:b;v=C[L];v||(":"===d.charAt(0)&&":"===d.charAt(1)&&(w=!0,d=d.substring(2)),g=g?u:q,v=new gc(g),v=(new hb(v,
|
||||
c,g)).parse(d),v.constant?v.$$watchDelegate=m:w?(v=e(v),v.$$watchDelegate=v.literal?k:l):v.inputs&&(v.$$watchDelegate=h),C[L]=v);return n(v,f);case "function":return n(d,f);default:return n(H,f)}}}]}function Qe(){this.$get=["$rootScope","$exceptionHandler",function(b,a){return fd(function(a){b.$evalAsync(a)},a)}]}function Re(){this.$get=["$browser","$exceptionHandler",function(b,a){return fd(function(a){b.defer(a)},a)}]}function fd(b,a){function c(a,b,c){function d(b){return function(c){e||(e=!0,
|
||||
b.call(a,c))}}var e=!1;return[d(b),d(c)]}function d(){this.$$state={status:0}}function e(a,b){return function(c){b.call(a,c)}}function f(c){!c.processScheduled&&c.pending&&(c.processScheduled=!0,b(function(){var b,d,e;e=c.pending;c.processScheduled=!1;c.pending=t;for(var f=0,g=e.length;f<g;++f){d=e[f][0];b=e[f][c.status];try{G(b)?d.resolve(b(c.value)):1===c.status?d.resolve(c.value):d.reject(c.value)}catch(h){d.reject(h),a(h)}}}))}function g(){this.promise=new d;this.resolve=e(this,this.resolve);
|
||||
this.reject=e(this,this.reject);this.notify=e(this,this.notify)}var h=T("$q",TypeError);d.prototype={then:function(a,b,c){var d=new g;this.$$state.pending=this.$$state.pending||[];this.$$state.pending.push([d,a,b,c]);0<this.$$state.status&&f(this.$$state);return d.promise},"catch":function(a){return this.then(null,a)},"finally":function(a,b){return this.then(function(b){return k(b,!0,a)},function(b){return k(b,!1,a)},b)}};g.prototype={resolve:function(a){this.promise.$$state.status||(a===this.promise?
|
||||
this.$$reject(h("qcycle",a)):this.$$resolve(a))},$$resolve:function(b){var d,e;e=c(this,this.$$resolve,this.$$reject);try{if(I(b)||G(b))d=b&&b.then;G(d)?(this.promise.$$state.status=-1,d.call(b,e[0],e[1],this.notify)):(this.promise.$$state.value=b,this.promise.$$state.status=1,f(this.promise.$$state))}catch(g){e[1](g),a(g)}},reject:function(a){this.promise.$$state.status||this.$$reject(a)},$$reject:function(a){this.promise.$$state.value=a;this.promise.$$state.status=2;f(this.promise.$$state)},notify:function(c){var d=
|
||||
this.promise.$$state.pending;0>=this.promise.$$state.status&&d&&d.length&&b(function(){for(var b,e,f=0,g=d.length;f<g;f++){e=d[f][0];b=d[f][3];try{e.notify(G(b)?b(c):c)}catch(h){a(h)}}})}};var l=function(a,b){var c=new g;b?c.resolve(a):c.reject(a);return c.promise},k=function(a,b,c){var d=null;try{G(c)&&(d=c())}catch(e){return l(e,!1)}return d&&G(d.then)?d.then(function(){return l(a,b)},function(a){return l(a,!1)}):l(a,b)},m=function(a,b,c,d){var e=new g;e.resolve(a);return e.promise.then(b,c,d)},
|
||||
n=function u(a){if(!G(a))throw h("norslvr",a);if(!(this instanceof u))return new u(a);var b=new g;a(function(a){b.resolve(a)},function(a){b.reject(a)});return b.promise};n.defer=function(){return new g};n.reject=function(a){var b=new g;b.reject(a);return b.promise};n.when=m;n.all=function(a){var b=new g,c=0,d=D(a)?[]:{};s(a,function(a,e){c++;m(a).then(function(a){d.hasOwnProperty(e)||(d[e]=a,--c||b.resolve(d))},function(a){d.hasOwnProperty(e)||b.reject(a)})});0===c&&b.resolve(d);return b.promise};
|
||||
return n}function $e(){this.$get=["$window","$timeout",function(b,a){var c=b.requestAnimationFrame||b.webkitRequestAnimationFrame,d=b.cancelAnimationFrame||b.webkitCancelAnimationFrame||b.webkitCancelRequestAnimationFrame,e=!!c,f=e?function(a){var b=c(a);return function(){d(b)}}:function(b){var c=a(b,16.66,!1);return function(){a.cancel(c)}};f.supported=e;return f}]}function Pe(){var b=10,a=T("$rootScope"),c=null,d=null;this.digestTtl=function(a){arguments.length&&(b=a);return b};this.$get=["$injector",
|
||||
"$exceptionHandler","$parse","$browser",function(e,f,g,h){function l(){this.$id=++nb;this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null;this.$root=this;this.$$destroyed=!1;this.$$listeners={};this.$$listenerCount={};this.$$isolateBindings=null}function k(b){if(r.$$phase)throw a("inprog",r.$$phase);r.$$phase=b}function m(a,b,c){do a.$$listenerCount[c]-=b,0===a.$$listenerCount[c]&&delete a.$$listenerCount[c];while(a=a.$parent)}function n(){}
|
||||
function q(){for(;v.length;)try{v.shift()()}catch(a){f(a)}d=null}function u(){null===d&&(d=h.defer(function(){r.$apply(q)}))}l.prototype={constructor:l,$new:function(a,b){function c(){d.$$destroyed=!0}var d;b=b||this;a?(d=new l,d.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=function(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null;this.$$listeners={};this.$$listenerCount={};this.$id=++nb;this.$$ChildScope=null},this.$$ChildScope.prototype=this),d=new this.$$ChildScope);
|
||||
d.$parent=b;d.$$prevSibling=b.$$childTail;b.$$childHead?(b.$$childTail.$$nextSibling=d,b.$$childTail=d):b.$$childHead=b.$$childTail=d;(a||b!=this)&&d.$on("$destroy",c);return d},$watch:function(a,b,d){var e=g(a);if(e.$$watchDelegate)return e.$$watchDelegate(this,b,d,e);var f=this.$$watchers,h={fn:b,last:n,get:e,exp:a,eq:!!d};c=null;G(b)||(h.fn=H);f||(f=this.$$watchers=[]);f.unshift(h);return function(){Xa(f,h);c=null}},$watchGroup:function(a,b){function c(){h=!1;l?(l=!1,b(e,e,g)):b(e,d,g)}var d=Array(a.length),
|
||||
e=Array(a.length),f=[],g=this,h=!1,l=!0;if(!a.length){var k=!0;g.$evalAsync(function(){k&&b(e,e,g)});return function(){k=!1}}if(1===a.length)return this.$watch(a[0],function(a,c,f){e[0]=a;d[0]=c;b(e,a===c?e:d,f)});s(a,function(a,b){var l=g.$watch(a,function(a,f){e[b]=a;d[b]=f;h||(h=!0,g.$evalAsync(c))});f.push(l)});return function(){for(;f.length;)f.shift()()}},$watchCollection:function(a,b){function c(a){e=a;var b,d,g,h;if(!A(e)){if(I(e))if(Ta(e))for(f!==q&&(f=q,u=f.length=0,k++),a=e.length,u!==
|
||||
a&&(k++,f.length=u=a),b=0;b<a;b++)h=f[b],g=e[b],d=h!==h&&g!==g,d||h===g||(k++,f[b]=g);else{f!==m&&(f=m={},u=0,k++);a=0;for(b in e)e.hasOwnProperty(b)&&(a++,g=e[b],h=f[b],b in f?(d=h!==h&&g!==g,d||h===g||(k++,f[b]=g)):(u++,f[b]=g,k++));if(u>a)for(b in k++,f)e.hasOwnProperty(b)||(u--,delete f[b])}else f!==e&&(f=e,k++);return k}}c.$stateful=!0;var d=this,e,f,h,l=1<b.length,k=0,n=g(a,c),q=[],m={},p=!0,u=0;return this.$watch(n,function(){p?(p=!1,b(e,e,d)):b(e,h,d);if(l)if(I(e))if(Ta(e)){h=Array(e.length);
|
||||
for(var a=0;a<e.length;a++)h[a]=e[a]}else for(a in h={},e)rc.call(e,a)&&(h[a]=e[a]);else h=e})},$digest:function(){var e,g,l,m,u,v,s=b,t,W=[],y,J;k("$digest");h.$$checkUrlChange();this===r&&null!==d&&(h.defer.cancel(d),q());c=null;do{v=!1;for(t=this;O.length;){try{J=O.shift(),J.scope.$eval(J.expression,J.locals)}catch(B){f(B)}c=null}a:do{if(m=t.$$watchers)for(u=m.length;u--;)try{if(e=m[u])if((g=e.get(t))!==(l=e.last)&&!(e.eq?fa(g,l):"number"===typeof g&&"number"===typeof l&&isNaN(g)&&isNaN(l)))v=
|
||||
!0,c=e,e.last=e.eq?Ea(g,null):g,e.fn(g,l===n?g:l,t),5>s&&(y=4-s,W[y]||(W[y]=[]),W[y].push({msg:G(e.exp)?"fn: "+(e.exp.name||e.exp.toString()):e.exp,newVal:g,oldVal:l}));else if(e===c){v=!1;break a}}catch(A){f(A)}if(!(m=t.$$childHead||t!==this&&t.$$nextSibling))for(;t!==this&&!(m=t.$$nextSibling);)t=t.$parent}while(t=m);if((v||O.length)&&!s--)throw r.$$phase=null,a("infdig",b,W);}while(v||O.length);for(r.$$phase=null;p.length;)try{p.shift()()}catch(ca){f(ca)}},$destroy:function(){if(!this.$$destroyed){var a=
|
||||
this.$parent;this.$broadcast("$destroy");this.$$destroyed=!0;if(this!==r){for(var b in this.$$listenerCount)m(this,this.$$listenerCount[b],b);a.$$childHead==this&&(a.$$childHead=this.$$nextSibling);a.$$childTail==this&&(a.$$childTail=this.$$prevSibling);this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling);this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling);this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=H;this.$on=this.$watch=this.$watchGroup=
|
||||
function(){return H};this.$$listeners={};this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=this.$root=this.$$watchers=null}}},$eval:function(a,b){return g(a)(this,b)},$evalAsync:function(a,b){r.$$phase||O.length||h.defer(function(){O.length&&r.$digest()});O.push({scope:this,expression:a,locals:b})},$$postDigest:function(a){p.push(a)},$apply:function(a){try{return k("$apply"),this.$eval(a)}catch(b){f(b)}finally{r.$$phase=null;try{r.$digest()}catch(c){throw f(c),c;
|
||||
}}},$applyAsync:function(a){function b(){c.$eval(a)}var c=this;a&&v.push(b);u()},$on:function(a,b){var c=this.$$listeners[a];c||(this.$$listeners[a]=c=[]);c.push(b);var d=this;do d.$$listenerCount[a]||(d.$$listenerCount[a]=0),d.$$listenerCount[a]++;while(d=d.$parent);var e=this;return function(){var d=c.indexOf(b);-1!==d&&(c[d]=null,m(e,1,a))}},$emit:function(a,b){var c=[],d,e=this,g=!1,h={name:a,targetScope:e,stopPropagation:function(){g=!0},preventDefault:function(){h.defaultPrevented=!0},defaultPrevented:!1},
|
||||
l=Ya([h],arguments,1),k,m;do{d=e.$$listeners[a]||c;h.currentScope=e;k=0;for(m=d.length;k<m;k++)if(d[k])try{d[k].apply(null,l)}catch(n){f(n)}else d.splice(k,1),k--,m--;if(g)return h.currentScope=null,h;e=e.$parent}while(e);h.currentScope=null;return h},$broadcast:function(a,b){var c=this,d=this,e={name:a,targetScope:this,preventDefault:function(){e.defaultPrevented=!0},defaultPrevented:!1};if(!this.$$listenerCount[a])return e;for(var g=Ya([e],arguments,1),h,l;c=d;){e.currentScope=c;d=c.$$listeners[a]||
|
||||
[];h=0;for(l=d.length;h<l;h++)if(d[h])try{d[h].apply(null,g)}catch(k){f(k)}else d.splice(h,1),h--,l--;if(!(d=c.$$listenerCount[a]&&c.$$childHead||c!==this&&c.$$nextSibling))for(;c!==this&&!(d=c.$$nextSibling);)c=c.$parent}e.currentScope=null;return e}};var r=new l,O=r.$$asyncQueue=[],p=r.$$postDigestQueue=[],v=r.$$applyAsyncQueue=[];return r}]}function Sd(){var b=/^\s*(https?|ftp|mailto|tel|file):/,a=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(a){return y(a)?
|
||||
(b=a,this):b};this.imgSrcSanitizationWhitelist=function(b){return y(b)?(a=b,this):a};this.$get=function(){return function(c,d){var e=d?a:b,f;f=Ba(c).href;return""===f||f.match(e)?c:"unsafe:"+f}}}function Df(b){if("self"===b)return b;if(F(b)){if(-1<b.indexOf("***"))throw Ca("iwcard",b);b=gd(b).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*");return new RegExp("^"+b+"$")}if(ob(b))return new RegExp("^"+b.source+"$");throw Ca("imatcher");}function hd(b){var a=[];y(b)&&s(b,function(b){a.push(Df(b))});
|
||||
return a}function Te(){this.SCE_CONTEXTS=na;var b=["self"],a=[];this.resourceUrlWhitelist=function(a){arguments.length&&(b=hd(a));return b};this.resourceUrlBlacklist=function(b){arguments.length&&(a=hd(b));return a};this.$get=["$injector",function(c){function d(a,b){return"self"===a?Zc(b):!!a.exec(b.href)}function e(a){var b=function(a){this.$$unwrapTrustedValue=function(){return a}};a&&(b.prototype=new a);b.prototype.valueOf=function(){return this.$$unwrapTrustedValue()};b.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()};
|
||||
return b}var f=function(a){throw Ca("unsafe");};c.has("$sanitize")&&(f=c.get("$sanitize"));var g=e(),h={};h[na.HTML]=e(g);h[na.CSS]=e(g);h[na.URL]=e(g);h[na.JS]=e(g);h[na.RESOURCE_URL]=e(h[na.URL]);return{trustAs:function(a,b){var c=h.hasOwnProperty(a)?h[a]:null;if(!c)throw Ca("icontext",a,b);if(null===b||b===t||""===b)return b;if("string"!==typeof b)throw Ca("itype",a);return new c(b)},getTrusted:function(c,e){if(null===e||e===t||""===e)return e;var g=h.hasOwnProperty(c)?h[c]:null;if(g&&e instanceof
|
||||
g)return e.$$unwrapTrustedValue();if(c===na.RESOURCE_URL){var g=Ba(e.toString()),n,q,u=!1;n=0;for(q=b.length;n<q;n++)if(d(b[n],g)){u=!0;break}if(u)for(n=0,q=a.length;n<q;n++)if(d(a[n],g)){u=!1;break}if(u)return e;throw Ca("insecurl",e.toString());}if(c===na.HTML)return f(e);throw Ca("unsafe");},valueOf:function(a){return a instanceof g?a.$$unwrapTrustedValue():a}}}]}function Se(){var b=!0;this.enabled=function(a){arguments.length&&(b=!!a);return b};this.$get=["$parse","$sceDelegate",function(a,c){if(b&&
|
||||
8>Ra)throw Ca("iequirks");var d=ra(na);d.isEnabled=function(){return b};d.trustAs=c.trustAs;d.getTrusted=c.getTrusted;d.valueOf=c.valueOf;b||(d.trustAs=d.getTrusted=function(a,b){return b},d.valueOf=pa);d.parseAs=function(b,c){var e=a(c);return e.literal&&e.constant?e:a(c,function(a){return d.getTrusted(b,a)})};var e=d.parseAs,f=d.getTrusted,g=d.trustAs;s(na,function(a,b){var c=Q(b);d[cb("parse_as_"+c)]=function(b){return e(a,b)};d[cb("get_trusted_"+c)]=function(b){return f(a,b)};d[cb("trust_as_"+
|
||||
c)]=function(b){return g(a,b)}});return d}]}function Ue(){this.$get=["$window","$document",function(b,a){var c={},d=ba((/android (\d+)/.exec(Q((b.navigator||{}).userAgent))||[])[1]),e=/Boxee/i.test((b.navigator||{}).userAgent),f=a[0]||{},g,h=/^(Moz|webkit|ms)(?=[A-Z])/,l=f.body&&f.body.style,k=!1,m=!1;if(l){for(var n in l)if(k=h.exec(n)){g=k[0];g=g.substr(0,1).toUpperCase()+g.substr(1);break}g||(g="WebkitOpacity"in l&&"webkit");k=!!("transition"in l||g+"Transition"in l);m=!!("animation"in l||g+"Animation"in
|
||||
l);!d||k&&m||(k=F(f.body.style.webkitTransition),m=F(f.body.style.webkitAnimation))}return{history:!(!b.history||!b.history.pushState||4>d||e),hasEvent:function(a){if("input"===a&&11>=Ra)return!1;if(A(c[a])){var b=f.createElement("div");c[a]="on"+a in b}return c[a]},csp:ab(),vendorPrefix:g,transitions:k,animations:m,android:d}}]}function We(){this.$get=["$templateCache","$http","$q",function(b,a,c){function d(e,f){d.totalPendingRequests++;var g=a.defaults&&a.defaults.transformResponse;D(g)?g=g.filter(function(a){return a!==
|
||||
Yb}):g===Yb&&(g=null);return a.get(e,{cache:b,transformResponse:g}).finally(function(){d.totalPendingRequests--}).then(function(a){return a.data},function(a){if(!f)throw ja("tpload",e);return c.reject(a)})}d.totalPendingRequests=0;return d}]}function Xe(){this.$get=["$rootScope","$browser","$location",function(b,a,c){return{findBindings:function(a,b,c){a=a.getElementsByClassName("ng-binding");var g=[];s(a,function(a){var d=ga.element(a).data("$binding");d&&s(d,function(d){c?(new RegExp("(^|\\s)"+
|
||||
gd(b)+"(\\s|\\||$)")).test(d)&&g.push(a):-1!=d.indexOf(b)&&g.push(a)})});return g},findModels:function(a,b,c){for(var g=["ng-","data-ng-","ng\\:"],h=0;h<g.length;++h){var l=a.querySelectorAll("["+g[h]+"model"+(c?"=":"*=")+'"'+b+'"]');if(l.length)return l}},getLocation:function(){return c.url()},setLocation:function(a){a!==c.url()&&(c.url(a),b.$digest())},whenStable:function(b){a.notifyWhenNoOutstandingRequests(b)}}}]}function Ye(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",
|
||||
function(b,a,c,d,e){function f(f,l,k){var m=y(k)&&!k,n=(m?d:c).defer(),q=n.promise;l=a.defer(function(){try{n.resolve(f())}catch(a){n.reject(a),e(a)}finally{delete g[q.$$timeoutId]}m||b.$apply()},l);q.$$timeoutId=l;g[l]=n;return q}var g={};f.cancel=function(b){return b&&b.$$timeoutId in g?(g[b.$$timeoutId].reject("canceled"),delete g[b.$$timeoutId],a.defer.cancel(b.$$timeoutId)):!1};return f}]}function Ba(b){Ra&&(Z.setAttribute("href",b),b=Z.href);Z.setAttribute("href",b);return{href:Z.href,protocol:Z.protocol?
|
||||
Z.protocol.replace(/:$/,""):"",host:Z.host,search:Z.search?Z.search.replace(/^\?/,""):"",hash:Z.hash?Z.hash.replace(/^#/,""):"",hostname:Z.hostname,port:Z.port,pathname:"/"===Z.pathname.charAt(0)?Z.pathname:"/"+Z.pathname}}function Zc(b){b=F(b)?Ba(b):b;return b.protocol===id.protocol&&b.host===id.host}function Ze(){this.$get=da(M)}function Dc(b){function a(c,d){if(I(c)){var e={};s(c,function(b,c){e[c]=a(c,b)});return e}return b.factory(c+"Filter",d)}this.register=a;this.$get=["$injector",function(a){return function(b){return a.get(b+
|
||||
"Filter")}}];a("currency",jd);a("date",kd);a("filter",Ef);a("json",Ff);a("limitTo",Gf);a("lowercase",Hf);a("number",ld);a("orderBy",md);a("uppercase",If)}function Ef(){return function(b,a,c){if(!D(b))return b;var d;switch(typeof a){case "function":break;case "boolean":case "number":case "string":d=!0;case "object":a=Jf(a,c,d);break;default:return b}return b.filter(a)}}function Jf(b,a,c){var d=I(b)&&"$"in b;!0===a?a=fa:G(a)||(a=function(a,b){if(I(a)||I(b))return!1;a=Q(""+a);b=Q(""+b);return-1!==a.indexOf(b)});
|
||||
return function(e){return d&&!I(e)?Ia(e,b.$,a,!1):Ia(e,b,a,c)}}function Ia(b,a,c,d,e){var f=typeof b,g=typeof a;if("string"===g&&"!"===a.charAt(0))return!Ia(b,a.substring(1),c,d);if(D(b))return b.some(function(b){return Ia(b,a,c,d)});switch(f){case "object":var h;if(d){for(h in b)if("$"!==h.charAt(0)&&Ia(b[h],a,c,!0))return!0;return e?!1:Ia(b,a,c,!1)}if("object"===g){for(h in a)if(e=a[h],!G(e)&&(f="$"===h,!Ia(f?b:b[h],e,c,f,f)))return!1;return!0}return c(b,a);case "function":return!1;default:return c(b,
|
||||
a)}}function jd(b){var a=b.NUMBER_FORMATS;return function(b,d,e){A(d)&&(d=a.CURRENCY_SYM);A(e)&&(e=a.PATTERNS[1].maxFrac);return null==b?b:nd(b,a.PATTERNS[1],a.GROUP_SEP,a.DECIMAL_SEP,e).replace(/\u00A4/g,d)}}function ld(b){var a=b.NUMBER_FORMATS;return function(b,d){return null==b?b:nd(b,a.PATTERNS[0],a.GROUP_SEP,a.DECIMAL_SEP,d)}}function nd(b,a,c,d,e){if(!isFinite(b)||I(b))return"";var f=0>b;b=Math.abs(b);var g=b+"",h="",l=[],k=!1;if(-1!==g.indexOf("e")){var m=g.match(/([\d\.]+)e(-?)(\d+)/);m&&
|
||||
"-"==m[2]&&m[3]>e+1?b=0:(h=g,k=!0)}if(k)0<e&&1>b&&(h=b.toFixed(e),b=parseFloat(h));else{g=(g.split(od)[1]||"").length;A(e)&&(e=Math.min(Math.max(a.minFrac,g),a.maxFrac));b=+(Math.round(+(b.toString()+"e"+e)).toString()+"e"+-e);var g=(""+b).split(od),k=g[0],g=g[1]||"",n=0,q=a.lgSize,u=a.gSize;if(k.length>=q+u)for(n=k.length-q,m=0;m<n;m++)0===(n-m)%u&&0!==m&&(h+=c),h+=k.charAt(m);for(m=n;m<k.length;m++)0===(k.length-m)%q&&0!==m&&(h+=c),h+=k.charAt(m);for(;g.length<e;)g+="0";e&&"0"!==e&&(h+=d+g.substr(0,
|
||||
e))}0===b&&(f=!1);l.push(f?a.negPre:a.posPre,h,f?a.negSuf:a.posSuf);return l.join("")}function Hb(b,a,c){var d="";0>b&&(d="-",b=-b);for(b=""+b;b.length<a;)b="0"+b;c&&(b=b.substr(b.length-a));return d+b}function $(b,a,c,d){c=c||0;return function(e){e=e["get"+b]();if(0<c||e>-c)e+=c;0===e&&-12==c&&(e=12);return Hb(e,a,d)}}function Ib(b,a){return function(c,d){var e=c["get"+b](),f=ub(a?"SHORT"+b:b);return d[f][e]}}function pd(b){var a=(new Date(b,0,1)).getDay();return new Date(b,0,(4>=a?5:12)-a)}function qd(b){return function(a){var c=
|
||||
pd(a.getFullYear());a=+new Date(a.getFullYear(),a.getMonth(),a.getDate()+(4-a.getDay()))-+c;a=1+Math.round(a/6048E5);return Hb(a,b)}}function kd(b){function a(a){var b;if(b=a.match(c)){a=new Date(0);var f=0,g=0,h=b[8]?a.setUTCFullYear:a.setFullYear,l=b[8]?a.setUTCHours:a.setHours;b[9]&&(f=ba(b[9]+b[10]),g=ba(b[9]+b[11]));h.call(a,ba(b[1]),ba(b[2])-1,ba(b[3]));f=ba(b[4]||0)-f;g=ba(b[5]||0)-g;h=ba(b[6]||0);b=Math.round(1E3*parseFloat("0."+(b[7]||0)));l.call(a,f,g,h,b)}return a}var c=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;
|
||||
return function(c,e,f){var g="",h=[],l,k;e=e||"mediumDate";e=b.DATETIME_FORMATS[e]||e;F(c)&&(c=Kf.test(c)?ba(c):a(c));V(c)&&(c=new Date(c));if(!qa(c))return c;for(;e;)(k=Lf.exec(e))?(h=Ya(h,k,1),e=h.pop()):(h.push(e),e=null);f&&"UTC"===f&&(c=new Date(c.getTime()),c.setMinutes(c.getMinutes()+c.getTimezoneOffset()));s(h,function(a){l=Mf[a];g+=l?l(c,b.DATETIME_FORMATS):a.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return g}}function Ff(){return function(b,a){A(a)&&(a=2);return $a(b,a)}}function Gf(){return function(b,
|
||||
a){V(b)&&(b=b.toString());return D(b)||F(b)?(a=Infinity===Math.abs(Number(a))?Number(a):ba(a))?0<a?b.slice(0,a):b.slice(a):F(b)?"":[]:b}}function md(b){return function(a,c,d){function e(a,b){return b?function(b,c){return a(c,b)}:a}function f(a){switch(typeof a){case "number":case "boolean":case "string":return!0;default:return!1}}function g(a){return null===a?"null":"function"===typeof a.valueOf&&(a=a.valueOf(),f(a))||"function"===typeof a.toString&&(a=a.toString(),f(a))?a:""}function h(a,b){var c=
|
||||
typeof a,d=typeof b;c===d&&"object"===c&&(a=g(a),b=g(b));return c===d?("string"===c&&(a=a.toLowerCase(),b=b.toLowerCase()),a===b?0:a<b?-1:1):c<d?-1:1}if(!Ta(a))return a;c=D(c)?c:[c];0===c.length&&(c=["+"]);c=c.map(function(a){var c=!1,d=a||pa;if(F(a)){if("+"==a.charAt(0)||"-"==a.charAt(0))c="-"==a.charAt(0),a=a.substring(1);if(""===a)return e(h,c);d=b(a);if(d.constant){var f=d();return e(function(a,b){return h(a[f],b[f])},c)}}return e(function(a,b){return h(d(a),d(b))},c)});return Za.call(a).sort(e(function(a,
|
||||
b){for(var d=0;d<c.length;d++){var e=c[d](a,b);if(0!==e)return e}return 0},d))}}function Ja(b){G(b)&&(b={link:b});b.restrict=b.restrict||"AC";return da(b)}function rd(b,a,c,d,e){var f=this,g=[],h=f.$$parentForm=b.parent().controller("form")||Jb;f.$error={};f.$$success={};f.$pending=t;f.$name=e(a.name||a.ngForm||"")(c);f.$dirty=!1;f.$pristine=!0;f.$valid=!0;f.$invalid=!1;f.$submitted=!1;h.$addControl(f);f.$rollbackViewValue=function(){s(g,function(a){a.$rollbackViewValue()})};f.$commitViewValue=function(){s(g,
|
||||
function(a){a.$commitViewValue()})};f.$addControl=function(a){Ma(a.$name,"input");g.push(a);a.$name&&(f[a.$name]=a)};f.$$renameControl=function(a,b){var c=a.$name;f[c]===a&&delete f[c];f[b]=a;a.$name=b};f.$removeControl=function(a){a.$name&&f[a.$name]===a&&delete f[a.$name];s(f.$pending,function(b,c){f.$setValidity(c,null,a)});s(f.$error,function(b,c){f.$setValidity(c,null,a)});s(f.$$success,function(b,c){f.$setValidity(c,null,a)});Xa(g,a)};sd({ctrl:this,$element:b,set:function(a,b,c){var d=a[b];
|
||||
d?-1===d.indexOf(c)&&d.push(c):a[b]=[c]},unset:function(a,b,c){var d=a[b];d&&(Xa(d,c),0===d.length&&delete a[b])},parentForm:h,$animate:d});f.$setDirty=function(){d.removeClass(b,Sa);d.addClass(b,Kb);f.$dirty=!0;f.$pristine=!1;h.$setDirty()};f.$setPristine=function(){d.setClass(b,Sa,Kb+" ng-submitted");f.$dirty=!1;f.$pristine=!0;f.$submitted=!1;s(g,function(a){a.$setPristine()})};f.$setUntouched=function(){s(g,function(a){a.$setUntouched()})};f.$setSubmitted=function(){d.addClass(b,"ng-submitted");
|
||||
f.$submitted=!0;h.$setSubmitted()}}function hc(b){b.$formatters.push(function(a){return b.$isEmpty(a)?a:a.toString()})}function ib(b,a,c,d,e,f){var g=Q(a[0].type);if(!e.android){var h=!1;a.on("compositionstart",function(a){h=!0});a.on("compositionend",function(){h=!1;l()})}var l=function(b){k&&(f.defer.cancel(k),k=null);if(!h){var e=a.val();b=b&&b.type;"password"===g||c.ngTrim&&"false"===c.ngTrim||(e=U(e));(d.$viewValue!==e||""===e&&d.$$hasNativeValidators)&&d.$setViewValue(e,b)}};if(e.hasEvent("input"))a.on("input",
|
||||
l);else{var k,m=function(a,b,c){k||(k=f.defer(function(){k=null;b&&b.value===c||l(a)}))};a.on("keydown",function(a){var b=a.keyCode;91===b||15<b&&19>b||37<=b&&40>=b||m(a,this,this.value)});if(e.hasEvent("paste"))a.on("paste cut",m)}a.on("change",l);d.$render=function(){a.val(d.$isEmpty(d.$viewValue)?"":d.$viewValue)}}function Lb(b,a){return function(c,d){var e,f;if(qa(c))return c;if(F(c)){'"'==c.charAt(0)&&'"'==c.charAt(c.length-1)&&(c=c.substring(1,c.length-1));if(Nf.test(c))return new Date(c);b.lastIndex=
|
||||
0;if(e=b.exec(c))return e.shift(),f=d?{yyyy:d.getFullYear(),MM:d.getMonth()+1,dd:d.getDate(),HH:d.getHours(),mm:d.getMinutes(),ss:d.getSeconds(),sss:d.getMilliseconds()/1E3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},s(e,function(b,c){c<a.length&&(f[a[c]]=+b)}),new Date(f.yyyy,f.MM-1,f.dd,f.HH,f.mm,f.ss||0,1E3*f.sss||0)}return NaN}}function jb(b,a,c,d){return function(e,f,g,h,l,k,m){function n(a){return a&&!(a.getTime&&a.getTime()!==a.getTime())}function q(a){return y(a)?qa(a)?a:c(a):t}td(e,f,g,h);
|
||||
ib(e,f,g,h,l,k);var u=h&&h.$options&&h.$options.timezone,r;h.$$parserName=b;h.$parsers.push(function(b){return h.$isEmpty(b)?null:a.test(b)?(b=c(b,r),"UTC"===u&&b.setMinutes(b.getMinutes()-b.getTimezoneOffset()),b):t});h.$formatters.push(function(a){if(a&&!qa(a))throw Mb("datefmt",a);if(n(a)){if((r=a)&&"UTC"===u){var b=6E4*r.getTimezoneOffset();r=new Date(r.getTime()+b)}return m("date")(a,d,u)}r=null;return""});if(y(g.min)||g.ngMin){var s;h.$validators.min=function(a){return!n(a)||A(s)||c(a)>=s};
|
||||
g.$observe("min",function(a){s=q(a);h.$validate()})}if(y(g.max)||g.ngMax){var p;h.$validators.max=function(a){return!n(a)||A(p)||c(a)<=p};g.$observe("max",function(a){p=q(a);h.$validate()})}}}function td(b,a,c,d){(d.$$hasNativeValidators=I(a[0].validity))&&d.$parsers.push(function(b){var c=a.prop("validity")||{};return c.badInput&&!c.typeMismatch?t:b})}function ud(b,a,c,d,e){if(y(d)){b=b(d);if(!b.constant)throw T("ngModel")("constexpr",c,d);return b(a)}return e}function ic(b,a){b="ngClass"+b;return["$animate",
|
||||
function(c){function d(a,b){var c=[],d=0;a:for(;d<a.length;d++){for(var e=a[d],m=0;m<b.length;m++)if(e==b[m])continue a;c.push(e)}return c}function e(a){if(!D(a)){if(F(a))return a.split(" ");if(I(a)){var b=[];s(a,function(a,c){a&&(b=b.concat(c.split(" ")))});return b}}return a}return{restrict:"AC",link:function(f,g,h){function l(a,b){var c=g.data("$classCounts")||{},d=[];s(a,function(a){if(0<b||c[a])c[a]=(c[a]||0)+b,c[a]===+(0<b)&&d.push(a)});g.data("$classCounts",c);return d.join(" ")}function k(b){if(!0===
|
||||
a||f.$index%2===a){var k=e(b||[]);if(!m){var u=l(k,1);h.$addClass(u)}else if(!fa(b,m)){var r=e(m),u=d(k,r),k=d(r,k),u=l(u,1),k=l(k,-1);u&&u.length&&c.addClass(g,u);k&&k.length&&c.removeClass(g,k)}}m=ra(b)}var m;f.$watch(h[b],k,!0);h.$observe("class",function(a){k(f.$eval(h[b]))});"ngClass"!==b&&f.$watch("$index",function(c,d){var g=c&1;if(g!==(d&1)){var k=e(f.$eval(h[b]));g===a?(g=l(k,1),h.$addClass(g)):(g=l(k,-1),h.$removeClass(g))}})}}}]}function sd(b){function a(a,b){b&&!f[a]?(k.addClass(e,a),
|
||||
f[a]=!0):!b&&f[a]&&(k.removeClass(e,a),f[a]=!1)}function c(b,c){b=b?"-"+tc(b,"-"):"";a(kb+b,!0===c);a(vd+b,!1===c)}var d=b.ctrl,e=b.$element,f={},g=b.set,h=b.unset,l=b.parentForm,k=b.$animate;f[vd]=!(f[kb]=e.hasClass(kb));d.$setValidity=function(b,e,f){e===t?(d.$pending||(d.$pending={}),g(d.$pending,b,f)):(d.$pending&&h(d.$pending,b,f),wd(d.$pending)&&(d.$pending=t));Wa(e)?e?(h(d.$error,b,f),g(d.$$success,b,f)):(g(d.$error,b,f),h(d.$$success,b,f)):(h(d.$error,b,f),h(d.$$success,b,f));d.$pending?(a(xd,
|
||||
!0),d.$valid=d.$invalid=t,c("",null)):(a(xd,!1),d.$valid=wd(d.$error),d.$invalid=!d.$valid,c("",d.$valid));e=d.$pending&&d.$pending[b]?t:d.$error[b]?!1:d.$$success[b]?!0:null;c(b,e);l.$setValidity(b,e,d)}}function wd(b){if(b)for(var a in b)return!1;return!0}var Of=/^\/(.+)\/([a-z]*)$/,Q=function(b){return F(b)?b.toLowerCase():b},rc=Object.prototype.hasOwnProperty,ub=function(b){return F(b)?b.toUpperCase():b},Ra,B,sa,Za=[].slice,rf=[].splice,Pf=[].push,Da=Object.prototype.toString,Ka=T("ng"),ga=M.angular||
|
||||
(M.angular={}),bb,nb=0;Ra=Y.documentMode;H.$inject=[];pa.$inject=[];var D=Array.isArray,U=function(b){return F(b)?b.trim():b},gd=function(b){return b.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},ab=function(){if(y(ab.isActive_))return ab.isActive_;var b=!(!Y.querySelector("[ng-csp]")&&!Y.querySelector("[data-ng-csp]"));if(!b)try{new Function("")}catch(a){b=!0}return ab.isActive_=b},rb=["ng-","data-ng-","ng:","x-ng-"],Md=/[A-Z]/g,uc=!1,Pb,oa=1,pb=3,Qd={full:"1.3.11",major:1,
|
||||
minor:3,dot:11,codeName:"spiffy-manatee"};R.expando="ng339";var zb=R.cache={},hf=1;R._data=function(b){return this.cache[b[this.expando]]||{}};var cf=/([\:\-\_]+(.))/g,df=/^moz([A-Z])/,Qf={mouseleave:"mouseout",mouseenter:"mouseover"},Sb=T("jqLite"),gf=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,Rb=/<|&#?\w+;/,ef=/<([\w:]+)/,ff=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ia={option:[1,'<select multiple="multiple">',"</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>",
|
||||
"</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ia.optgroup=ia.option;ia.tbody=ia.tfoot=ia.colgroup=ia.caption=ia.thead;ia.th=ia.td;var La=R.prototype={ready:function(b){function a(){c||(c=!0,b())}var c=!1;"complete"===Y.readyState?setTimeout(a):(this.on("DOMContentLoaded",a),R(M).on("load",a))},toString:function(){var b=[];s(this,function(a){b.push(""+a)});return"["+b.join(", ")+"]"},eq:function(b){return 0<=
|
||||
b?B(this[b]):B(this[this.length+b])},length:0,push:Pf,sort:[].sort,splice:[].splice},Eb={};s("multiple selected checked disabled readOnly required open".split(" "),function(b){Eb[Q(b)]=b});var Mc={};s("input select option textarea button form details".split(" "),function(b){Mc[b]=!0});var Nc={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};s({data:Ub,removeData:xb},function(b,a){R[a]=b});s({data:Ub,inheritedData:Db,scope:function(b){return B.data(b,"$scope")||
|
||||
Db(b.parentNode||b,["$isolateScope","$scope"])},isolateScope:function(b){return B.data(b,"$isolateScope")||B.data(b,"$isolateScopeNoTemplate")},controller:Ic,injector:function(b){return Db(b,"$injector")},removeAttr:function(b,a){b.removeAttribute(a)},hasClass:Ab,css:function(b,a,c){a=cb(a);if(y(c))b.style[a]=c;else return b.style[a]},attr:function(b,a,c){var d=Q(a);if(Eb[d])if(y(c))c?(b[a]=!0,b.setAttribute(a,d)):(b[a]=!1,b.removeAttribute(d));else return b[a]||(b.attributes.getNamedItem(a)||H).specified?
|
||||
d:t;else if(y(c))b.setAttribute(a,c);else if(b.getAttribute)return b=b.getAttribute(a,2),null===b?t:b},prop:function(b,a,c){if(y(c))b[a]=c;else return b[a]},text:function(){function b(a,b){if(A(b)){var d=a.nodeType;return d===oa||d===pb?a.textContent:""}a.textContent=b}b.$dv="";return b}(),val:function(b,a){if(A(a)){if(b.multiple&&"select"===ua(b)){var c=[];s(b.options,function(a){a.selected&&c.push(a.value||a.text)});return 0===c.length?null:c}return b.value}b.value=a},html:function(b,a){if(A(a))return b.innerHTML;
|
||||
wb(b,!0);b.innerHTML=a},empty:Jc},function(b,a){R.prototype[a]=function(a,d){var e,f,g=this.length;if(b!==Jc&&(2==b.length&&b!==Ab&&b!==Ic?a:d)===t){if(I(a)){for(e=0;e<g;e++)if(b===Ub)b(this[e],a);else for(f in a)b(this[e],f,a[f]);return this}e=b.$dv;g=e===t?Math.min(g,1):g;for(f=0;f<g;f++){var h=b(this[f],a,d);e=e?e+h:h}return e}for(e=0;e<g;e++)b(this[e],a,d);return this}});s({removeData:xb,on:function a(c,d,e,f){if(y(f))throw Sb("onargs");if(Ec(c)){var g=yb(c,!0);f=g.events;var h=g.handle;h||(h=
|
||||
g.handle=lf(c,f));for(var g=0<=d.indexOf(" ")?d.split(" "):[d],l=g.length;l--;){d=g[l];var k=f[d];k||(f[d]=[],"mouseenter"===d||"mouseleave"===d?a(c,Qf[d],function(a){var c=a.relatedTarget;c&&(c===this||this.contains(c))||h(a,d)}):"$destroy"!==d&&c.addEventListener(d,h,!1),k=f[d]);k.push(e)}}},off:Hc,one:function(a,c,d){a=B(a);a.on(c,function f(){a.off(c,d);a.off(c,f)});a.on(c,d)},replaceWith:function(a,c){var d,e=a.parentNode;wb(a);s(new R(c),function(c){d?e.insertBefore(c,d.nextSibling):e.replaceChild(c,
|
||||
a);d=c})},children:function(a){var c=[];s(a.childNodes,function(a){a.nodeType===oa&&c.push(a)});return c},contents:function(a){return a.contentDocument||a.childNodes||[]},append:function(a,c){var d=a.nodeType;if(d===oa||11===d){c=new R(c);for(var d=0,e=c.length;d<e;d++)a.appendChild(c[d])}},prepend:function(a,c){if(a.nodeType===oa){var d=a.firstChild;s(new R(c),function(c){a.insertBefore(c,d)})}},wrap:function(a,c){c=B(c).eq(0).clone()[0];var d=a.parentNode;d&&d.replaceChild(c,a);c.appendChild(a)},
|
||||
remove:Kc,detach:function(a){Kc(a,!0)},after:function(a,c){var d=a,e=a.parentNode;c=new R(c);for(var f=0,g=c.length;f<g;f++){var h=c[f];e.insertBefore(h,d.nextSibling);d=h}},addClass:Cb,removeClass:Bb,toggleClass:function(a,c,d){c&&s(c.split(" "),function(c){var f=d;A(f)&&(f=!Ab(a,c));(f?Cb:Bb)(a,c)})},parent:function(a){return(a=a.parentNode)&&11!==a.nodeType?a:null},next:function(a){return a.nextElementSibling},find:function(a,c){return a.getElementsByTagName?a.getElementsByTagName(c):[]},clone:Tb,
|
||||
triggerHandler:function(a,c,d){var e,f,g=c.type||c,h=yb(a);if(h=(h=h&&h.events)&&h[g])e={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return!0===this.defaultPrevented},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return!0===this.immediatePropagationStopped},stopPropagation:H,type:g,target:a},c.type&&(e=z(e,c)),c=ra(h),f=d?[e].concat(d):[e],s(c,function(c){e.isImmediatePropagationStopped()||c.apply(a,
|
||||
f)})}},function(a,c){R.prototype[c]=function(c,e,f){for(var g,h=0,l=this.length;h<l;h++)A(g)?(g=a(this[h],c,e,f),y(g)&&(g=B(g))):Gc(g,a(this[h],c,e,f));return y(g)?g:this};R.prototype.bind=R.prototype.on;R.prototype.unbind=R.prototype.off});db.prototype={put:function(a,c){this[Na(a,this.nextUid)]=c},get:function(a){return this[Na(a,this.nextUid)]},remove:function(a){var c=this[a=Na(a,this.nextUid)];delete this[a];return c}};var Pc=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,nf=/,/,of=/^\s*(_?)(\S+?)\1\s*$/,
|
||||
Oc=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,Ga=T("$injector");Ob.$$annotate=Vb;var Rf=T("$animate"),Ce=["$provide",function(a){this.$$selectors={};this.register=function(c,d){var e=c+"-animation";if(c&&"."!=c.charAt(0))throw Rf("notcsel",c);this.$$selectors[c.substr(1)]=e;a.factory(e,d)};this.classNameFilter=function(a){1===arguments.length&&(this.$$classNameFilter=a instanceof RegExp?a:null);return this.$$classNameFilter};this.$get=["$$q","$$asyncCallback","$rootScope",function(a,d,e){function f(d){var f,
|
||||
g=a.defer();g.promise.$$cancelFn=function(){f&&f()};e.$$postDigest(function(){f=d(function(){g.resolve()})});return g.promise}function g(a,c){var d=[],e=[],f=ha();s((a.attr("class")||"").split(/\s+/),function(a){f[a]=!0});s(c,function(a,c){var g=f[c];!1===a&&g?e.push(c):!0!==a||g||d.push(c)});return 0<d.length+e.length&&[d.length?d:null,e.length?e:null]}function h(a,c,d){for(var e=0,f=c.length;e<f;++e)a[c[e]]=d}function l(){m||(m=a.defer(),d(function(){m.resolve();m=null}));return m.promise}function k(a,
|
||||
c){if(ga.isObject(c)){var d=z(c.from||{},c.to||{});a.css(d)}}var m;return{animate:function(a,c,d){k(a,{from:c,to:d});return l()},enter:function(a,c,d,e){k(a,e);d?d.after(a):c.prepend(a);return l()},leave:function(a,c){a.remove();return l()},move:function(a,c,d,e){return this.enter(a,c,d,e)},addClass:function(a,c,d){return this.setClass(a,c,[],d)},$$addClassImmediately:function(a,c,d){a=B(a);c=F(c)?c:D(c)?c.join(" "):"";s(a,function(a){Cb(a,c)});k(a,d);return l()},removeClass:function(a,c,d){return this.setClass(a,
|
||||
[],c,d)},$$removeClassImmediately:function(a,c,d){a=B(a);c=F(c)?c:D(c)?c.join(" "):"";s(a,function(a){Bb(a,c)});k(a,d);return l()},setClass:function(a,c,d,e){var k=this,l=!1;a=B(a);var m=a.data("$$animateClasses");m?e&&m.options&&(m.options=ga.extend(m.options||{},e)):(m={classes:{},options:e},l=!0);e=m.classes;c=D(c)?c:c.split(" ");d=D(d)?d:d.split(" ");h(e,c,!0);h(e,d,!1);l&&(m.promise=f(function(c){var d=a.data("$$animateClasses");a.removeData("$$animateClasses");if(d){var e=g(a,d.classes);e&&
|
||||
k.$$setClassImmediately(a,e[0],e[1],d.options)}c()}),a.data("$$animateClasses",m));return m.promise},$$setClassImmediately:function(a,c,d,e){c&&this.$$addClassImmediately(a,c);d&&this.$$removeClassImmediately(a,d);k(a,e);return l()},enabled:H,cancel:H}}]}],ja=T("$compile");wc.$inject=["$provide","$$sanitizeUriProvider"];var Rc=/^((?:x|data)[\:\-_])/i,Vc="application/json",Zb={"Content-Type":Vc+";charset=utf-8"},tf=/^\[|^\{(?!\{)/,uf={"[":/]$/,"{":/}$/},sf=/^\)\]\}',?\n/,$b=T("$interpolate"),Sf=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,
|
||||
xf={http:80,https:443,ftp:21},Fb=T("$location"),Tf={$$html5:!1,$$replace:!1,absUrl:Gb("$$absUrl"),url:function(a){if(A(a))return this.$$url;var c=Sf.exec(a);(c[1]||""===a)&&this.path(decodeURIComponent(c[1]));(c[2]||c[1]||""===a)&&this.search(c[3]||"");this.hash(c[5]||"");return this},protocol:Gb("$$protocol"),host:Gb("$$host"),port:Gb("$$port"),path:dd("$$path",function(a){a=null!==a?a.toString():"";return"/"==a.charAt(0)?a:"/"+a}),search:function(a,c){switch(arguments.length){case 0:return this.$$search;
|
||||
case 1:if(F(a)||V(a))a=a.toString(),this.$$search=qc(a);else if(I(a))a=Ea(a,{}),s(a,function(c,e){null==c&&delete a[e]}),this.$$search=a;else throw Fb("isrcharg");break;default:A(c)||null===c?delete this.$$search[a]:this.$$search[a]=c}this.$$compose();return this},hash:dd("$$hash",function(a){return null!==a?a.toString():""}),replace:function(){this.$$replace=!0;return this}};s([cd,dc,cc],function(a){a.prototype=Object.create(Tf);a.prototype.state=function(c){if(!arguments.length)return this.$$state;
|
||||
if(a!==cc||!this.$$html5)throw Fb("nostate");this.$$state=A(c)?null:c;return this}});var la=T("$parse"),Uf=Function.prototype.call,Vf=Function.prototype.apply,Wf=Function.prototype.bind,lb=ha();s({"null":function(){return null},"true":function(){return!0},"false":function(){return!1},undefined:function(){}},function(a,c){a.constant=a.literal=a.sharedGetter=!0;lb[c]=a});lb["this"]=function(a){return a};lb["this"].sharedGetter=!0;var mb=z(ha(),{"+":function(a,c,d,e){d=d(a,c);e=e(a,c);return y(d)?y(e)?
|
||||
d+e:d:y(e)?e:t},"-":function(a,c,d,e){d=d(a,c);e=e(a,c);return(y(d)?d:0)-(y(e)?e:0)},"*":function(a,c,d,e){return d(a,c)*e(a,c)},"/":function(a,c,d,e){return d(a,c)/e(a,c)},"%":function(a,c,d,e){return d(a,c)%e(a,c)},"===":function(a,c,d,e){return d(a,c)===e(a,c)},"!==":function(a,c,d,e){return d(a,c)!==e(a,c)},"==":function(a,c,d,e){return d(a,c)==e(a,c)},"!=":function(a,c,d,e){return d(a,c)!=e(a,c)},"<":function(a,c,d,e){return d(a,c)<e(a,c)},">":function(a,c,d,e){return d(a,c)>e(a,c)},"<=":function(a,
|
||||
c,d,e){return d(a,c)<=e(a,c)},">=":function(a,c,d,e){return d(a,c)>=e(a,c)},"&&":function(a,c,d,e){return d(a,c)&&e(a,c)},"||":function(a,c,d,e){return d(a,c)||e(a,c)},"!":function(a,c,d){return!d(a,c)},"=":!0,"|":!0}),Xf={n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'},gc=function(a){this.options=a};gc.prototype={constructor:gc,lex:function(a){this.text=a;this.index=0;for(this.tokens=[];this.index<this.text.length;)if(a=this.text.charAt(this.index),'"'===a||"'"===a)this.readString(a);else if(this.isNumber(a)||
|
||||
"."===a&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdent(a))this.readIdent();else if(this.is(a,"(){}[].,;:?"))this.tokens.push({index:this.index,text:a}),this.index++;else if(this.isWhitespace(a))this.index++;else{var c=a+this.peek(),d=c+this.peek(2),e=mb[c],f=mb[d];mb[a]||e||f?(a=f?d:e?c:a,this.tokens.push({index:this.index,text:a,operator:!0}),this.index+=a.length):this.throwError("Unexpected next character ",this.index,this.index+1)}return this.tokens},is:function(a,c){return-1!==
|
||||
c.indexOf(a)},peek:function(a){a=a||1;return this.index+a<this.text.length?this.text.charAt(this.index+a):!1},isNumber:function(a){return"0"<=a&&"9">=a&&"string"===typeof a},isWhitespace:function(a){return" "===a||"\r"===a||"\t"===a||"\n"===a||"\v"===a||"\u00a0"===a},isIdent:function(a){return"a"<=a&&"z">=a||"A"<=a&&"Z">=a||"_"===a||"$"===a},isExpOperator:function(a){return"-"===a||"+"===a||this.isNumber(a)},throwError:function(a,c,d){d=d||this.index;c=y(c)?"s "+c+"-"+this.index+" ["+this.text.substring(c,
|
||||
d)+"]":" "+d;throw la("lexerr",a,c,this.text);},readNumber:function(){for(var a="",c=this.index;this.index<this.text.length;){var d=Q(this.text.charAt(this.index));if("."==d||this.isNumber(d))a+=d;else{var e=this.peek();if("e"==d&&this.isExpOperator(e))a+=d;else if(this.isExpOperator(d)&&e&&this.isNumber(e)&&"e"==a.charAt(a.length-1))a+=d;else if(!this.isExpOperator(d)||e&&this.isNumber(e)||"e"!=a.charAt(a.length-1))break;else this.throwError("Invalid exponent")}this.index++}this.tokens.push({index:c,
|
||||
text:a,constant:!0,value:Number(a)})},readIdent:function(){for(var a=this.index;this.index<this.text.length;){var c=this.text.charAt(this.index);if(!this.isIdent(c)&&!this.isNumber(c))break;this.index++}this.tokens.push({index:a,text:this.text.slice(a,this.index),identifier:!0})},readString:function(a){var c=this.index;this.index++;for(var d="",e=a,f=!1;this.index<this.text.length;){var g=this.text.charAt(this.index),e=e+g;if(f)"u"===g?(f=this.text.substring(this.index+1,this.index+5),f.match(/[\da-f]{4}/i)||
|
||||
this.throwError("Invalid unicode escape [\\u"+f+"]"),this.index+=4,d+=String.fromCharCode(parseInt(f,16))):d+=Xf[g]||g,f=!1;else if("\\"===g)f=!0;else{if(g===a){this.index++;this.tokens.push({index:c,text:e,constant:!0,value:d});return}d+=g}this.index++}this.throwError("Unterminated quote",c)}};var hb=function(a,c,d){this.lexer=a;this.$filter=c;this.options=d};hb.ZERO=z(function(){return 0},{sharedGetter:!0,constant:!0});hb.prototype={constructor:hb,parse:function(a){this.text=a;this.tokens=this.lexer.lex(a);
|
||||
a=this.statements();0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]);a.literal=!!a.literal;a.constant=!!a.constant;return a},primary:function(){var a;this.expect("(")?(a=this.filterChain(),this.consume(")")):this.expect("[")?a=this.arrayDeclaration():this.expect("{")?a=this.object():this.peek().identifier&&this.peek().text in lb?a=lb[this.consume().text]:this.peek().identifier?a=this.identifier():this.peek().constant?a=this.constant():this.throwError("not a primary expression",
|
||||
this.peek());for(var c,d;c=this.expect("(","[",".");)"("===c.text?(a=this.functionCall(a,d),d=null):"["===c.text?(d=a,a=this.objectIndex(a)):"."===c.text?(d=a,a=this.fieldAccess(a)):this.throwError("IMPOSSIBLE");return a},throwError:function(a,c){throw la("syntax",c.text,a,c.index+1,this.text,this.text.substring(c.index));},peekToken:function(){if(0===this.tokens.length)throw la("ueoe",this.text);return this.tokens[0]},peek:function(a,c,d,e){return this.peekAhead(0,a,c,d,e)},peekAhead:function(a,
|
||||
c,d,e,f){if(this.tokens.length>a){a=this.tokens[a];var g=a.text;if(g===c||g===d||g===e||g===f||!(c||d||e||f))return a}return!1},expect:function(a,c,d,e){return(a=this.peek(a,c,d,e))?(this.tokens.shift(),a):!1},consume:function(a){if(0===this.tokens.length)throw la("ueoe",this.text);var c=this.expect(a);c||this.throwError("is unexpected, expecting ["+a+"]",this.peek());return c},unaryFn:function(a,c){var d=mb[a];return z(function(a,f){return d(a,f,c)},{constant:c.constant,inputs:[c]})},binaryFn:function(a,
|
||||
c,d,e){var f=mb[c];return z(function(c,e){return f(c,e,a,d)},{constant:a.constant&&d.constant,inputs:!e&&[a,d]})},identifier:function(){for(var a=this.consume().text;this.peek(".")&&this.peekAhead(1).identifier&&!this.peekAhead(2,"(");)a+=this.consume().text+this.consume().text;return zf(a,this.options,this.text)},constant:function(){var a=this.consume().value;return z(function(){return a},{constant:!0,literal:!0})},statements:function(){for(var a=[];;)if(0<this.tokens.length&&!this.peek("}",")",
|
||||
";","]")&&a.push(this.filterChain()),!this.expect(";"))return 1===a.length?a[0]:function(c,d){for(var e,f=0,g=a.length;f<g;f++)e=a[f](c,d);return e}},filterChain:function(){for(var a=this.expression();this.expect("|");)a=this.filter(a);return a},filter:function(a){var c=this.$filter(this.consume().text),d,e;if(this.peek(":"))for(d=[],e=[];this.expect(":");)d.push(this.expression());var f=[a].concat(d||[]);return z(function(f,h){var l=a(f,h);if(e){e[0]=l;for(l=d.length;l--;)e[l+1]=d[l](f,h);return c.apply(t,
|
||||
e)}return c(l)},{constant:!c.$stateful&&f.every(ec),inputs:!c.$stateful&&f})},expression:function(){return this.assignment()},assignment:function(){var a=this.ternary(),c,d;return(d=this.expect("="))?(a.assign||this.throwError("implies assignment but ["+this.text.substring(0,d.index)+"] can not be assigned to",d),c=this.ternary(),z(function(d,f){return a.assign(d,c(d,f),f)},{inputs:[a,c]})):a},ternary:function(){var a=this.logicalOR(),c;if(this.expect("?")&&(c=this.assignment(),this.consume(":"))){var d=
|
||||
this.assignment();return z(function(e,f){return a(e,f)?c(e,f):d(e,f)},{constant:a.constant&&c.constant&&d.constant})}return a},logicalOR:function(){for(var a=this.logicalAND(),c;c=this.expect("||");)a=this.binaryFn(a,c.text,this.logicalAND(),!0);return a},logicalAND:function(){for(var a=this.equality(),c;c=this.expect("&&");)a=this.binaryFn(a,c.text,this.equality(),!0);return a},equality:function(){for(var a=this.relational(),c;c=this.expect("==","!=","===","!==");)a=this.binaryFn(a,c.text,this.relational());
|
||||
return a},relational:function(){for(var a=this.additive(),c;c=this.expect("<",">","<=",">=");)a=this.binaryFn(a,c.text,this.additive());return a},additive:function(){for(var a=this.multiplicative(),c;c=this.expect("+","-");)a=this.binaryFn(a,c.text,this.multiplicative());return a},multiplicative:function(){for(var a=this.unary(),c;c=this.expect("*","/","%");)a=this.binaryFn(a,c.text,this.unary());return a},unary:function(){var a;return this.expect("+")?this.primary():(a=this.expect("-"))?this.binaryFn(hb.ZERO,
|
||||
a.text,this.unary()):(a=this.expect("!"))?this.unaryFn(a.text,this.unary()):this.primary()},fieldAccess:function(a){var c=this.identifier();return z(function(d,e,f){d=f||a(d,e);return null==d?t:c(d)},{assign:function(d,e,f){var g=a(d,f);g||a.assign(d,g={},f);return c.assign(g,e)}})},objectIndex:function(a){var c=this.text,d=this.expression();this.consume("]");return z(function(e,f){var g=a(e,f),h=d(e,f);ta(h,c);return g?ma(g[h],c):t},{assign:function(e,f,g){var h=ta(d(e,g),c),l=ma(a(e,g),c);l||a.assign(e,
|
||||
l={},g);return l[h]=f}})},functionCall:function(a,c){var d=[];if(")"!==this.peekToken().text){do d.push(this.expression());while(this.expect(","))}this.consume(")");var e=this.text,f=d.length?[]:null;return function(g,h){var l=c?c(g,h):y(c)?t:g,k=a(g,h,l)||H;if(f)for(var m=d.length;m--;)f[m]=ma(d[m](g,h),e);ma(l,e);if(k){if(k.constructor===k)throw la("isecfn",e);if(k===Uf||k===Vf||k===Wf)throw la("isecff",e);}l=k.apply?k.apply(l,f):k(f[0],f[1],f[2],f[3],f[4]);return ma(l,e)}},arrayDeclaration:function(){var a=
|
||||
[];if("]"!==this.peekToken().text){do{if(this.peek("]"))break;a.push(this.expression())}while(this.expect(","))}this.consume("]");return z(function(c,d){for(var e=[],f=0,g=a.length;f<g;f++)e.push(a[f](c,d));return e},{literal:!0,constant:a.every(ec),inputs:a})},object:function(){var a=[],c=[];if("}"!==this.peekToken().text){do{if(this.peek("}"))break;var d=this.consume();d.constant?a.push(d.value):d.identifier?a.push(d.text):this.throwError("invalid key",d);this.consume(":");c.push(this.expression())}while(this.expect(","))
|
||||
}this.consume("}");return z(function(d,f){for(var g={},h=0,l=c.length;h<l;h++)g[a[h]]=c[h](d,f);return g},{literal:!0,constant:c.every(ec),inputs:c})}};var Bf=ha(),Af=ha(),Cf=Object.prototype.valueOf,Ca=T("$sce"),na={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},ja=T("$compile"),Z=Y.createElement("a"),id=Ba(M.location.href);Dc.$inject=["$provide"];jd.$inject=["$locale"];ld.$inject=["$locale"];var od=".",Mf={yyyy:$("FullYear",4),yy:$("FullYear",2,0,!0),y:$("FullYear",1),MMMM:Ib("Month"),
|
||||
MMM:Ib("Month",!0),MM:$("Month",2,1),M:$("Month",1,1),dd:$("Date",2),d:$("Date",1),HH:$("Hours",2),H:$("Hours",1),hh:$("Hours",2,-12),h:$("Hours",1,-12),mm:$("Minutes",2),m:$("Minutes",1),ss:$("Seconds",2),s:$("Seconds",1),sss:$("Milliseconds",3),EEEE:Ib("Day"),EEE:Ib("Day",!0),a:function(a,c){return 12>a.getHours()?c.AMPMS[0]:c.AMPMS[1]},Z:function(a){a=-1*a.getTimezoneOffset();return a=(0<=a?"+":"")+(Hb(Math[0<a?"floor":"ceil"](a/60),2)+Hb(Math.abs(a%60),2))},ww:qd(2),w:qd(1)},Lf=/((?:[^yMdHhmsaZEw']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|w+))(.*)/,
|
||||
Kf=/^\-?\d+$/;kd.$inject=["$locale"];var Hf=da(Q),If=da(ub);md.$inject=["$parse"];var Td=da({restrict:"E",compile:function(a,c){if(!c.href&&!c.xlinkHref&&!c.name)return function(a,c){if("a"===c[0].nodeName.toLowerCase()){var f="[object SVGAnimatedString]"===Da.call(c.prop("href"))?"xlink:href":"href";c.on("click",function(a){c.attr(f)||a.preventDefault()})}}}}),vb={};s(Eb,function(a,c){if("multiple"!=a){var d=ya("ng-"+c);vb[d]=function(){return{restrict:"A",priority:100,link:function(a,f,g){a.$watch(g[d],
|
||||
function(a){g.$set(c,!!a)})}}}}});s(Nc,function(a,c){vb[c]=function(){return{priority:100,link:function(a,e,f){if("ngPattern"===c&&"/"==f.ngPattern.charAt(0)&&(e=f.ngPattern.match(Of))){f.$set("ngPattern",new RegExp(e[1],e[2]));return}a.$watch(f[c],function(a){f.$set(c,a)})}}}});s(["src","srcset","href"],function(a){var c=ya("ng-"+a);vb[c]=function(){return{priority:99,link:function(d,e,f){var g=a,h=a;"href"===a&&"[object SVGAnimatedString]"===Da.call(e.prop("href"))&&(h="xlinkHref",f.$attr[h]="xlink:href",
|
||||
g=null);f.$observe(c,function(c){c?(f.$set(h,c),Ra&&g&&e.prop(g,f[h])):"href"===a&&f.$set(h,null)})}}}});var Jb={$addControl:H,$$renameControl:function(a,c){a.$name=c},$removeControl:H,$setValidity:H,$setDirty:H,$setPristine:H,$setSubmitted:H};rd.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var yd=function(a){return["$timeout",function(c){return{name:"form",restrict:a?"EAC":"E",controller:rd,compile:function(a){a.addClass(Sa).addClass(kb);return{pre:function(a,d,g,h){if(!("action"in
|
||||
g)){var l=function(c){a.$apply(function(){h.$commitViewValue();h.$setSubmitted()});c.preventDefault()};d[0].addEventListener("submit",l,!1);d.on("$destroy",function(){c(function(){d[0].removeEventListener("submit",l,!1)},0,!1)})}var k=h.$$parentForm,m=h.$name;m&&(gb(a,null,m,h,m),g.$observe(g.name?"name":"ngForm",function(c){m!==c&&(gb(a,null,m,t,m),m=c,gb(a,null,m,h,m),k.$$renameControl(h,m))}));d.on("$destroy",function(){k.$removeControl(h);m&&gb(a,null,m,t,m);z(h,Jb)})}}}}}]},Ud=yd(),ge=yd(!0),
|
||||
Nf=/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/,Yf=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,Zf=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,$f=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,zd=/^(\d{4})-(\d{2})-(\d{2})$/,Ad=/^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,jc=/^(\d{4})-W(\d\d)$/,Bd=/^(\d{4})-(\d\d)$/,Cd=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Dd=
|
||||
{text:function(a,c,d,e,f,g){ib(a,c,d,e,f,g);hc(e)},date:jb("date",zd,Lb(zd,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":jb("datetimelocal",Ad,Lb(Ad,"yyyy MM dd HH mm ss sss".split(" ")),"yyyy-MM-ddTHH:mm:ss.sss"),time:jb("time",Cd,Lb(Cd,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:jb("week",jc,function(a,c){if(qa(a))return a;if(F(a)){jc.lastIndex=0;var d=jc.exec(a);if(d){var e=+d[1],f=+d[2],g=d=0,h=0,l=0,k=pd(e),f=7*(f-1);c&&(d=c.getHours(),g=c.getMinutes(),h=c.getSeconds(),l=c.getMilliseconds());
|
||||
return new Date(e,0,k.getDate()+f,d,g,h,l)}}return NaN},"yyyy-Www"),month:jb("month",Bd,Lb(Bd,["yyyy","MM"]),"yyyy-MM"),number:function(a,c,d,e,f,g){td(a,c,d,e);ib(a,c,d,e,f,g);e.$$parserName="number";e.$parsers.push(function(a){return e.$isEmpty(a)?null:$f.test(a)?parseFloat(a):t});e.$formatters.push(function(a){if(!e.$isEmpty(a)){if(!V(a))throw Mb("numfmt",a);a=a.toString()}return a});if(d.min||d.ngMin){var h;e.$validators.min=function(a){return e.$isEmpty(a)||A(h)||a>=h};d.$observe("min",function(a){y(a)&&
|
||||
!V(a)&&(a=parseFloat(a,10));h=V(a)&&!isNaN(a)?a:t;e.$validate()})}if(d.max||d.ngMax){var l;e.$validators.max=function(a){return e.$isEmpty(a)||A(l)||a<=l};d.$observe("max",function(a){y(a)&&!V(a)&&(a=parseFloat(a,10));l=V(a)&&!isNaN(a)?a:t;e.$validate()})}},url:function(a,c,d,e,f,g){ib(a,c,d,e,f,g);hc(e);e.$$parserName="url";e.$validators.url=function(a,c){var d=a||c;return e.$isEmpty(d)||Yf.test(d)}},email:function(a,c,d,e,f,g){ib(a,c,d,e,f,g);hc(e);e.$$parserName="email";e.$validators.email=function(a,
|
||||
c){var d=a||c;return e.$isEmpty(d)||Zf.test(d)}},radio:function(a,c,d,e){A(d.name)&&c.attr("name",++nb);c.on("click",function(a){c[0].checked&&e.$setViewValue(d.value,a&&a.type)});e.$render=function(){c[0].checked=d.value==e.$viewValue};d.$observe("value",e.$render)},checkbox:function(a,c,d,e,f,g,h,l){var k=ud(l,a,"ngTrueValue",d.ngTrueValue,!0),m=ud(l,a,"ngFalseValue",d.ngFalseValue,!1);c.on("click",function(a){e.$setViewValue(c[0].checked,a&&a.type)});e.$render=function(){c[0].checked=e.$viewValue};
|
||||
e.$isEmpty=function(a){return!1===a};e.$formatters.push(function(a){return fa(a,k)});e.$parsers.push(function(a){return a?k:m})},hidden:H,button:H,submit:H,reset:H,file:H},xc=["$browser","$sniffer","$filter","$parse",function(a,c,d,e){return{restrict:"E",require:["?ngModel"],link:{pre:function(f,g,h,l){l[0]&&(Dd[Q(h.type)]||Dd.text)(f,g,h,l[0],c,a,d,e)}}}}],ag=/^(true|false|\d+)$/,ye=function(){return{restrict:"A",priority:100,compile:function(a,c){return ag.test(c.ngValue)?function(a,c,f){f.$set("value",
|
||||
a.$eval(f.ngValue))}:function(a,c,f){a.$watch(f.ngValue,function(a){f.$set("value",a)})}}}},Zd=["$compile",function(a){return{restrict:"AC",compile:function(c){a.$$addBindingClass(c);return function(c,e,f){a.$$addBindingInfo(e,f.ngBind);e=e[0];c.$watch(f.ngBind,function(a){e.textContent=a===t?"":a})}}}}],ae=["$interpolate","$compile",function(a,c){return{compile:function(d){c.$$addBindingClass(d);return function(d,f,g){d=a(f.attr(g.$attr.ngBindTemplate));c.$$addBindingInfo(f,d.expressions);f=f[0];
|
||||
g.$observe("ngBindTemplate",function(a){f.textContent=a===t?"":a})}}}}],$d=["$sce","$parse","$compile",function(a,c,d){return{restrict:"A",compile:function(e,f){var g=c(f.ngBindHtml),h=c(f.ngBindHtml,function(a){return(a||"").toString()});d.$$addBindingClass(e);return function(c,e,f){d.$$addBindingInfo(e,f.ngBindHtml);c.$watch(h,function(){e.html(a.getTrustedHtml(g(c))||"")})}}}}],xe=da({restrict:"A",require:"ngModel",link:function(a,c,d,e){e.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}),
|
||||
be=ic("",!0),de=ic("Odd",0),ce=ic("Even",1),ee=Ja({compile:function(a,c){c.$set("ngCloak",t);a.removeClass("ng-cloak")}}),fe=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],Cc={},bg={blur:!0,focus:!0};s("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(a){var c=ya("ng-"+a);Cc[c]=["$parse","$rootScope",function(d,e){return{restrict:"A",compile:function(f,g){var h=
|
||||
d(g[c],null,!0);return function(c,d){d.on(a,function(d){var f=function(){h(c,{$event:d})};bg[a]&&e.$$phase?c.$evalAsync(f):c.$apply(f)})}}}}]});var ie=["$animate",function(a){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(c,d,e,f,g){var h,l,k;c.$watch(e.ngIf,function(c){c?l||g(function(c,f){l=f;c[c.length++]=Y.createComment(" end ngIf: "+e.ngIf+" ");h={clone:c};a.enter(c,d.parent(),d)}):(k&&(k.remove(),k=null),l&&(l.$destroy(),l=null),h&&(k=
|
||||
tb(h.clone),a.leave(k).then(function(){k=null}),h=null))})}}}],je=["$templateRequest","$anchorScroll","$animate","$sce",function(a,c,d,e){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:ga.noop,compile:function(f,g){var h=g.ngInclude||g.src,l=g.onload||"",k=g.autoscroll;return function(f,g,q,s,r){var t=0,p,v,w,L=function(){v&&(v.remove(),v=null);p&&(p.$destroy(),p=null);w&&(d.leave(w).then(function(){v=null}),v=w,w=null)};f.$watch(e.parseAsResourceUrl(h),function(e){var h=
|
||||
function(){!y(k)||k&&!f.$eval(k)||c()},q=++t;e?(a(e,!0).then(function(a){if(q===t){var c=f.$new();s.template=a;a=r(c,function(a){L();d.enter(a,null,g).then(h)});p=c;w=a;p.$emit("$includeContentLoaded",e);f.$eval(l)}},function(){q===t&&(L(),f.$emit("$includeContentError",e))}),f.$emit("$includeContentRequested",e)):(L(),s.template=null)})}}}}],Ae=["$compile",function(a){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(c,d,e,f){/SVG/.test(d[0].toString())?(d.empty(),a(Fc(f.template,
|
||||
Y).childNodes)(c,function(a){d.append(a)},{futureParentElement:d})):(d.html(f.template),a(d.contents())(c))}}}],ke=Ja({priority:450,compile:function(){return{pre:function(a,c,d){a.$eval(d.ngInit)}}}}),we=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(a,c,d,e){var f=c.attr(d.$attr.ngList)||", ",g="false"!==d.ngTrim,h=g?U(f):f;e.$parsers.push(function(a){if(!A(a)){var c=[];a&&s(a.split(h),function(a){a&&c.push(g?U(a):a)});return c}});e.$formatters.push(function(a){return D(a)?
|
||||
a.join(f):t});e.$isEmpty=function(a){return!a||!a.length}}}},kb="ng-valid",vd="ng-invalid",Sa="ng-pristine",Kb="ng-dirty",xd="ng-pending",Mb=new T("ngModel"),cg=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(a,c,d,e,f,g,h,l,k,m){this.$modelValue=this.$viewValue=Number.NaN;this.$$rawModelValue=t;this.$validators={};this.$asyncValidators={};this.$parsers=[];this.$formatters=[];this.$viewChangeListeners=[];this.$untouched=!0;
|
||||
this.$touched=!1;this.$pristine=!0;this.$dirty=!1;this.$valid=!0;this.$invalid=!1;this.$error={};this.$$success={};this.$pending=t;this.$name=m(d.name||"",!1)(a);var n=f(d.ngModel),q=n.assign,u=n,r=q,O=null,p=this;this.$$setOptions=function(a){if((p.$options=a)&&a.getterSetter){var c=f(d.ngModel+"()"),g=f(d.ngModel+"($$$p)");u=function(a){var d=n(a);G(d)&&(d=c(a));return d};r=function(a,c){G(n(a))?g(a,{$$$p:p.$modelValue}):q(a,p.$modelValue)}}else if(!n.assign)throw Mb("nonassign",d.ngModel,va(e));
|
||||
};this.$render=H;this.$isEmpty=function(a){return A(a)||""===a||null===a||a!==a};var v=e.inheritedData("$formController")||Jb,w=0;sd({ctrl:this,$element:e,set:function(a,c){a[c]=!0},unset:function(a,c){delete a[c]},parentForm:v,$animate:g});this.$setPristine=function(){p.$dirty=!1;p.$pristine=!0;g.removeClass(e,Kb);g.addClass(e,Sa)};this.$setDirty=function(){p.$dirty=!0;p.$pristine=!1;g.removeClass(e,Sa);g.addClass(e,Kb);v.$setDirty()};this.$setUntouched=function(){p.$touched=!1;p.$untouched=!0;g.setClass(e,
|
||||
"ng-untouched","ng-touched")};this.$setTouched=function(){p.$touched=!0;p.$untouched=!1;g.setClass(e,"ng-touched","ng-untouched")};this.$rollbackViewValue=function(){h.cancel(O);p.$viewValue=p.$$lastCommittedViewValue;p.$render()};this.$validate=function(){if(!V(p.$modelValue)||!isNaN(p.$modelValue)){var a=p.$$rawModelValue,c=p.$valid,d=p.$modelValue,e=p.$options&&p.$options.allowInvalid;p.$$runValidators(p.$error[p.$$parserName||"parse"]?!1:t,a,p.$$lastCommittedViewValue,function(f){e||c===f||(p.$modelValue=
|
||||
f?a:t,p.$modelValue!==d&&p.$$writeModelToScope())})}};this.$$runValidators=function(a,c,d,e){function f(){var a=!0;s(p.$validators,function(e,f){var g=e(c,d);a=a&&g;h(f,g)});return a?!0:(s(p.$asyncValidators,function(a,c){h(c,null)}),!1)}function g(){var a=[],e=!0;s(p.$asyncValidators,function(f,g){var l=f(c,d);if(!l||!G(l.then))throw Mb("$asyncValidators",l);h(g,t);a.push(l.then(function(){h(g,!0)},function(a){e=!1;h(g,!1)}))});a.length?k.all(a).then(function(){l(e)},H):l(!0)}function h(a,c){m===
|
||||
w&&p.$setValidity(a,c)}function l(a){m===w&&e(a)}w++;var m=w;(function(a){var c=p.$$parserName||"parse";if(a===t)h(c,null);else if(h(c,a),!a)return s(p.$validators,function(a,c){h(c,null)}),s(p.$asyncValidators,function(a,c){h(c,null)}),!1;return!0})(a)?f()?g():l(!1):l(!1)};this.$commitViewValue=function(){var a=p.$viewValue;h.cancel(O);if(p.$$lastCommittedViewValue!==a||""===a&&p.$$hasNativeValidators)p.$$lastCommittedViewValue=a,p.$pristine&&this.$setDirty(),this.$$parseAndValidate()};this.$$parseAndValidate=
|
||||
function(){var c=p.$$lastCommittedViewValue,d=A(c)?t:!0;if(d)for(var e=0;e<p.$parsers.length;e++)if(c=p.$parsers[e](c),A(c)){d=!1;break}V(p.$modelValue)&&isNaN(p.$modelValue)&&(p.$modelValue=u(a));var f=p.$modelValue,g=p.$options&&p.$options.allowInvalid;p.$$rawModelValue=c;g&&(p.$modelValue=c,p.$modelValue!==f&&p.$$writeModelToScope());p.$$runValidators(d,c,p.$$lastCommittedViewValue,function(a){g||(p.$modelValue=a?c:t,p.$modelValue!==f&&p.$$writeModelToScope())})};this.$$writeModelToScope=function(){r(a,
|
||||
p.$modelValue);s(p.$viewChangeListeners,function(a){try{a()}catch(d){c(d)}})};this.$setViewValue=function(a,c){p.$viewValue=a;p.$options&&!p.$options.updateOnDefault||p.$$debounceViewValueCommit(c)};this.$$debounceViewValueCommit=function(c){var d=0,e=p.$options;e&&y(e.debounce)&&(e=e.debounce,V(e)?d=e:V(e[c])?d=e[c]:V(e["default"])&&(d=e["default"]));h.cancel(O);d?O=h(function(){p.$commitViewValue()},d):l.$$phase?p.$commitViewValue():a.$apply(function(){p.$commitViewValue()})};a.$watch(function(){var c=
|
||||
u(a);if(c!==p.$modelValue){p.$modelValue=p.$$rawModelValue=c;for(var d=p.$formatters,e=d.length,f=c;e--;)f=d[e](f);p.$viewValue!==f&&(p.$viewValue=p.$$lastCommittedViewValue=f,p.$render(),p.$$runValidators(t,c,f,H))}return c})}],ve=["$rootScope",function(a){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:cg,priority:1,compile:function(c){c.addClass(Sa).addClass("ng-untouched").addClass(kb);return{pre:function(a,c,f,g){var h=g[0],l=g[1]||Jb;h.$$setOptions(g[2]&&g[2].$options);
|
||||
l.$addControl(h);f.$observe("name",function(a){h.$name!==a&&l.$$renameControl(h,a)});a.$on("$destroy",function(){l.$removeControl(h)})},post:function(c,e,f,g){var h=g[0];if(h.$options&&h.$options.updateOn)e.on(h.$options.updateOn,function(a){h.$$debounceViewValueCommit(a&&a.type)});e.on("blur",function(e){h.$touched||(a.$$phase?c.$evalAsync(h.$setTouched):c.$apply(h.$setTouched))})}}}}}],dg=/(\s+|^)default(\s+|$)/,ze=function(){return{restrict:"A",controller:["$scope","$attrs",function(a,c){var d=
|
||||
this;this.$options=a.$eval(c.ngModelOptions);this.$options.updateOn!==t?(this.$options.updateOnDefault=!1,this.$options.updateOn=U(this.$options.updateOn.replace(dg,function(){d.$options.updateOnDefault=!0;return" "}))):this.$options.updateOnDefault=!0}]}},le=Ja({terminal:!0,priority:1E3}),me=["$locale","$interpolate",function(a,c){var d=/{}/g,e=/^when(Minus)?(.+)$/;return{restrict:"EA",link:function(f,g,h){function l(a){g.text(a||"")}var k=h.count,m=h.$attr.when&&g.attr(h.$attr.when),n=h.offset||
|
||||
0,q=f.$eval(m)||{},u={},m=c.startSymbol(),r=c.endSymbol(),t=m+k+"-"+n+r,p=ga.noop,v;s(h,function(a,c){var d=e.exec(c);d&&(d=(d[1]?"-":"")+Q(d[2]),q[d]=g.attr(h.$attr[c]))});s(q,function(a,e){u[e]=c(a.replace(d,t))});f.$watch(k,function(c){c=parseFloat(c);var d=isNaN(c);d||c in q||(c=a.pluralCat(c-n));c===v||d&&isNaN(v)||(p(),p=f.$watch(u[c],l),v=c)})}}}],ne=["$parse","$animate",function(a,c){var d=T("ngRepeat"),e=function(a,c,d,e,k,m,n){a[d]=e;k&&(a[k]=m);a.$index=c;a.$first=0===c;a.$last=c===n-1;
|
||||
a.$middle=!(a.$first||a.$last);a.$odd=!(a.$even=0===(c&1))};return{restrict:"A",multiElement:!0,transclude:"element",priority:1E3,terminal:!0,$$tlb:!0,compile:function(f,g){var h=g.ngRepeat,l=Y.createComment(" end ngRepeat: "+h+" "),k=h.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!k)throw d("iexp",h);var m=k[1],n=k[2],q=k[3],u=k[4],k=m.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/);if(!k)throw d("iidexp",m);var r=k[3]||k[1],
|
||||
y=k[2];if(q&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(q)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(q)))throw d("badident",q);var p,v,w,A,z={$id:Na};u?p=a(u):(w=function(a,c){return Na(c)},A=function(a){return a});return function(a,f,g,k,m){p&&(v=function(c,d,e){y&&(z[y]=c);z[r]=d;z.$index=e;return p(a,z)});var u=ha();a.$watchCollection(n,function(g){var k,p,n=f[0],E,z=ha(),H,S,N,D,G,C,I;q&&(a[q]=g);if(Ta(g))G=g,p=v||w;else{p=v||A;G=[];for(I in g)g.hasOwnProperty(I)&&
|
||||
"$"!=I.charAt(0)&&G.push(I);G.sort()}H=G.length;I=Array(H);for(k=0;k<H;k++)if(S=g===G?k:G[k],N=g[S],D=p(S,N,k),u[D])C=u[D],delete u[D],z[D]=C,I[k]=C;else{if(z[D])throw s(I,function(a){a&&a.scope&&(u[a.id]=a)}),d("dupes",h,D,N);I[k]={id:D,scope:t,clone:t};z[D]=!0}for(E in u){C=u[E];D=tb(C.clone);c.leave(D);if(D[0].parentNode)for(k=0,p=D.length;k<p;k++)D[k].$$NG_REMOVED=!0;C.scope.$destroy()}for(k=0;k<H;k++)if(S=g===G?k:G[k],N=g[S],C=I[k],C.scope){E=n;do E=E.nextSibling;while(E&&E.$$NG_REMOVED);C.clone[0]!=
|
||||
E&&c.move(tb(C.clone),null,B(n));n=C.clone[C.clone.length-1];e(C.scope,k,r,N,y,S,H)}else m(function(a,d){C.scope=d;var f=l.cloneNode(!1);a[a.length++]=f;c.enter(a,null,B(n));n=f;C.clone=a;z[C.id]=C;e(C.scope,k,r,N,y,S,H)});u=z})}}}}],oe=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(c,d,e){c.$watch(e.ngShow,function(c){a[c?"removeClass":"addClass"](d,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],he=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(c,
|
||||
d,e){c.$watch(e.ngHide,function(c){a[c?"addClass":"removeClass"](d,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],pe=Ja(function(a,c,d){a.$watchCollection(d.ngStyle,function(a,d){d&&a!==d&&s(d,function(a,d){c.css(d,"")});a&&c.css(a)})}),qe=["$animate",function(a){return{restrict:"EA",require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(c,d,e,f){var g=[],h=[],l=[],k=[],m=function(a,c){return function(){a.splice(c,1)}};c.$watch(e.ngSwitch||e.on,function(c){var d,e;d=0;
|
||||
for(e=l.length;d<e;++d)a.cancel(l[d]);d=l.length=0;for(e=k.length;d<e;++d){var r=tb(h[d].clone);k[d].$destroy();(l[d]=a.leave(r)).then(m(l,d))}h.length=0;k.length=0;(g=f.cases["!"+c]||f.cases["?"])&&s(g,function(c){c.transclude(function(d,e){k.push(e);var f=c.element;d[d.length++]=Y.createComment(" end ngSwitchWhen: ");h.push({clone:d});a.enter(d,f.parent(),f)})})})}}}],re=Ja({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,c,d,e,f){e.cases["!"+d.ngSwitchWhen]=
|
||||
e.cases["!"+d.ngSwitchWhen]||[];e.cases["!"+d.ngSwitchWhen].push({transclude:f,element:c})}}),se=Ja({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,c,d,e,f){e.cases["?"]=e.cases["?"]||[];e.cases["?"].push({transclude:f,element:c})}}),ue=Ja({restrict:"EAC",link:function(a,c,d,e,f){if(!f)throw T("ngTransclude")("orphan",va(c));f(function(a){c.empty();c.append(a)})}}),Vd=["$templateCache",function(a){return{restrict:"E",terminal:!0,compile:function(c,d){"text/ng-template"==
|
||||
d.type&&a.put(d.id,c[0].text)}}}],eg=T("ngOptions"),te=da({restrict:"A",terminal:!0}),Wd=["$compile","$parse",function(a,c){var d=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,e={$setViewValue:H};return{restrict:"E",require:["select","?ngModel"],controller:["$element","$scope","$attrs",function(a,c,d){var l=this,k={},m=e,n;l.databound=d.ngModel;
|
||||
l.init=function(a,c,d){m=a;n=d};l.addOption=function(c,d){Ma(c,'"option value"');k[c]=!0;m.$viewValue==c&&(a.val(c),n.parent()&&n.remove());d&&d[0].hasAttribute("selected")&&(d[0].selected=!0)};l.removeOption=function(a){this.hasOption(a)&&(delete k[a],m.$viewValue===a&&this.renderUnknownOption(a))};l.renderUnknownOption=function(c){c="? "+Na(c)+" ?";n.val(c);a.prepend(n);a.val(c);n.prop("selected",!0)};l.hasOption=function(a){return k.hasOwnProperty(a)};c.$on("$destroy",function(){l.renderUnknownOption=
|
||||
H})}],link:function(e,g,h,l){function k(a,c,d,e){d.$render=function(){var a=d.$viewValue;e.hasOption(a)?(C.parent()&&C.remove(),c.val(a),""===a&&p.prop("selected",!0)):A(a)&&p?c.val(""):e.renderUnknownOption(a)};c.on("change",function(){a.$apply(function(){C.parent()&&C.remove();d.$setViewValue(c.val())})})}function m(a,c,d){var e;d.$render=function(){var a=new db(d.$viewValue);s(c.find("option"),function(c){c.selected=y(a.get(c.value))})};a.$watch(function(){fa(e,d.$viewValue)||(e=ra(d.$viewValue),
|
||||
d.$render())});c.on("change",function(){a.$apply(function(){var a=[];s(c.find("option"),function(c){c.selected&&a.push(c.value)});d.$setViewValue(a)})})}function n(e,f,g){function h(a,c,d){T[x]=d;G&&(T[G]=c);return a(e,T)}function k(a){var c;if(u)if(M&&D(a)){c=new db([]);for(var d=0;d<a.length;d++)c.put(h(M,null,a[d]),!0)}else c=new db(a);else M&&(a=h(M,null,a));return function(d,e){var f;f=M?M:B?B:F;return u?y(c.remove(h(f,d,e))):a===h(f,d,e)}}function l(){v||(e.$$postDigest(p),v=!0)}function m(a,
|
||||
c,d){a[c]=a[c]||0;a[c]+=d?1:-1}function p(){v=!1;var a={"":[]},c=[""],d,l,n,r,t;n=g.$viewValue;r=P(e)||[];var B=G?Object.keys(r).sort():r,x,A,D,F,N={};t=k(n);var J=!1,U,V;Q={};for(F=0;D=B.length,F<D;F++){x=F;if(G&&(x=B[F],"$"===x.charAt(0)))continue;A=r[x];d=h(I,x,A)||"";(l=a[d])||(l=a[d]=[],c.push(d));d=t(x,A);J=J||d;A=h(C,x,A);A=y(A)?A:"";V=M?M(e,T):G?B[F]:F;M&&(Q[V]=x);l.push({id:V,label:A,selected:d})}u||(z||null===n?a[""].unshift({id:"",label:"",selected:!J}):J||a[""].unshift({id:"?",label:"",
|
||||
selected:!0}));x=0;for(B=c.length;x<B;x++){d=c[x];l=a[d];R.length<=x?(n={element:H.clone().attr("label",d),label:l.label},r=[n],R.push(r),f.append(n.element)):(r=R[x],n=r[0],n.label!=d&&n.element.attr("label",n.label=d));J=null;F=0;for(D=l.length;F<D;F++)d=l[F],(t=r[F+1])?(J=t.element,t.label!==d.label&&(m(N,t.label,!1),m(N,d.label,!0),J.text(t.label=d.label),J.prop("label",t.label)),t.id!==d.id&&J.val(t.id=d.id),J[0].selected!==d.selected&&(J.prop("selected",t.selected=d.selected),Ra&&J.prop("selected",
|
||||
t.selected))):(""===d.id&&z?U=z:(U=w.clone()).val(d.id).prop("selected",d.selected).attr("selected",d.selected).prop("label",d.label).text(d.label),r.push(t={element:U,label:d.label,id:d.id,selected:d.selected}),m(N,d.label,!0),J?J.after(U):n.element.append(U),J=U);for(F++;r.length>F;)d=r.pop(),m(N,d.label,!1),d.element.remove()}for(;R.length>x;){l=R.pop();for(F=1;F<l.length;++F)m(N,l[F].label,!1);l[0].element.remove()}s(N,function(a,c){0<a?q.addOption(c):0>a&&q.removeOption(c)})}var n;if(!(n=r.match(d)))throw eg("iexp",
|
||||
r,va(f));var C=c(n[2]||n[1]),x=n[4]||n[6],A=/ as /.test(n[0])&&n[1],B=A?c(A):null,G=n[5],I=c(n[3]||""),F=c(n[2]?n[1]:x),P=c(n[7]),M=n[8]?c(n[8]):null,Q={},R=[[{element:f,label:""}]],T={};z&&(a(z)(e),z.removeClass("ng-scope"),z.remove());f.empty();f.on("change",function(){e.$apply(function(){var a=P(e)||[],c;if(u)c=[],s(f.val(),function(d){d=M?Q[d]:d;c.push("?"===d?t:""===d?null:h(B?B:F,d,a[d]))});else{var d=M?Q[f.val()]:f.val();c="?"===d?t:""===d?null:h(B?B:F,d,a[d])}g.$setViewValue(c);p()})});g.$render=
|
||||
p;e.$watchCollection(P,l);e.$watchCollection(function(){var a=P(e),c;if(a&&D(a)){c=Array(a.length);for(var d=0,f=a.length;d<f;d++)c[d]=h(C,d,a[d])}else if(a)for(d in c={},a)a.hasOwnProperty(d)&&(c[d]=h(C,d,a[d]));return c},l);u&&e.$watchCollection(function(){return g.$modelValue},l)}if(l[1]){var q=l[0];l=l[1];var u=h.multiple,r=h.ngOptions,z=!1,p,v=!1,w=B(Y.createElement("option")),H=B(Y.createElement("optgroup")),C=w.clone();h=0;for(var x=g.children(),G=x.length;h<G;h++)if(""===x[h].value){p=z=x.eq(h);
|
||||
break}q.init(l,z,C);u&&(l.$isEmpty=function(a){return!a||0===a.length});r?n(e,g,l):u?m(e,g,l):k(e,g,l,q)}}}}],Yd=["$interpolate",function(a){var c={addOption:H,removeOption:H};return{restrict:"E",priority:100,compile:function(d,e){if(A(e.value)){var f=a(d.text(),!0);f||e.$set("value",d.text())}return function(a,d,e){var k=d.parent(),m=k.data("$selectController")||k.parent().data("$selectController");m&&m.databound||(m=c);f?a.$watch(f,function(a,c){e.$set("value",a);c!==a&&m.removeOption(c);m.addOption(a,
|
||||
d)}):m.addOption(e.value,d);d.on("$destroy",function(){m.removeOption(e.value)})}}}}],Xd=da({restrict:"E",terminal:!1}),zc=function(){return{restrict:"A",require:"?ngModel",link:function(a,c,d,e){e&&(d.required=!0,e.$validators.required=function(a,c){return!d.required||!e.$isEmpty(c)},d.$observe("required",function(){e.$validate()}))}}},yc=function(){return{restrict:"A",require:"?ngModel",link:function(a,c,d,e){if(e){var f,g=d.ngPattern||d.pattern;d.$observe("pattern",function(a){F(a)&&0<a.length&&
|
||||
(a=new RegExp("^"+a+"$"));if(a&&!a.test)throw T("ngPattern")("noregexp",g,a,va(c));f=a||t;e.$validate()});e.$validators.pattern=function(a){return e.$isEmpty(a)||A(f)||f.test(a)}}}}},Bc=function(){return{restrict:"A",require:"?ngModel",link:function(a,c,d,e){if(e){var f=-1;d.$observe("maxlength",function(a){a=ba(a);f=isNaN(a)?-1:a;e.$validate()});e.$validators.maxlength=function(a,c){return 0>f||e.$isEmpty(a)||c.length<=f}}}}},Ac=function(){return{restrict:"A",require:"?ngModel",link:function(a,c,
|
||||
d,e){if(e){var f=0;d.$observe("minlength",function(a){f=ba(a)||0;e.$validate()});e.$validators.minlength=function(a,c){return e.$isEmpty(c)||c.length>=f}}}}};M.angular.bootstrap?console.log("WARNING: Tried to load angular more than once."):(Nd(),Pd(ga),B(Y).ready(function(){Jd(Y,sc)}))})(window,document);!window.angular.$$csp()&&window.angular.element(document).find("head").prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}</style>');
|
||||
//# sourceMappingURL=angular.min.js.map
|
28
js/app.js
Normal file
28
js/app.js
Normal file
@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Please see the included README.md file for license terms and conditions.
|
||||
*/
|
||||
|
||||
|
||||
// This file is a suggested starting place for your code.
|
||||
// It is completely optional and not required.
|
||||
// Note the reference that includes it in the index.html file.
|
||||
|
||||
|
||||
/*jslint browser:true, devel:true, white:true, vars:true */
|
||||
/*global $:false, intel:false app:false, dev:false, cordova:false */
|
||||
|
||||
|
||||
|
||||
// This file contains your event handlers, the center of your application.
|
||||
// NOTE: see app.initEvents() in init-app.js for event handler initialization code.
|
||||
|
||||
// function myEventHandler() {
|
||||
// "use strict" ;
|
||||
// // ...event handler code here...
|
||||
// }
|
||||
|
||||
|
||||
// ...additional event handlers here...
|
||||
|
||||
var wave = {};
|
||||
|
12127
js/dygraph-combined-dev.js
Normal file
12127
js/dygraph-combined-dev.js
Normal file
File diff suppressed because it is too large
Load Diff
6
js/dygraph-combined.js
Normal file
6
js/dygraph-combined.js
Normal file
File diff suppressed because one or more lines are too long
51
js/ie-emulation-modes-warning.js
Normal file
51
js/ie-emulation-modes-warning.js
Normal file
@ -0,0 +1,51 @@
|
||||
// NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT
|
||||
// IT'S JUST JUNK FOR OUR DOCS!
|
||||
// ++++++++++++++++++++++++++++++++++++++++++
|
||||
/*!
|
||||
* Copyright 2014 Twitter, Inc.
|
||||
*
|
||||
* Licensed under the Creative Commons Attribution 3.0 Unported License. For
|
||||
* details, see http://creativecommons.org/licenses/by/3.0/.
|
||||
*/
|
||||
// Intended to prevent false-positive bug reports about Bootstrap not working properly in old versions of IE due to folks testing using IE's unreliable emulation modes.
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
function emulatedIEMajorVersion() {
|
||||
var groups = /MSIE ([0-9.]+)/.exec(window.navigator.userAgent)
|
||||
if (groups === null) {
|
||||
return null
|
||||
}
|
||||
var ieVersionNum = parseInt(groups[1], 10)
|
||||
var ieMajorVersion = Math.floor(ieVersionNum)
|
||||
return ieMajorVersion
|
||||
}
|
||||
|
||||
function actualNonEmulatedIEMajorVersion() {
|
||||
// Detects the actual version of IE in use, even if it's in an older-IE emulation mode.
|
||||
// IE JavaScript conditional compilation docs: http://msdn.microsoft.com/en-us/library/ie/121hztk3(v=vs.94).aspx
|
||||
// @cc_on docs: http://msdn.microsoft.com/en-us/library/ie/8ka90k2e(v=vs.94).aspx
|
||||
var jscriptVersion = new Function('/*@cc_on return @_jscript_version; @*/')() // jshint ignore:line
|
||||
if (jscriptVersion === undefined) {
|
||||
return 11 // IE11+ not in emulation mode
|
||||
}
|
||||
if (jscriptVersion < 9) {
|
||||
return 8 // IE8 (or lower; haven't tested on IE<8)
|
||||
}
|
||||
return jscriptVersion // IE9 or IE10 in any mode, or IE11 in non-IE11 mode
|
||||
}
|
||||
|
||||
var ua = window.navigator.userAgent
|
||||
if (ua.indexOf('Opera') > -1 || ua.indexOf('Presto') > -1) {
|
||||
return // Opera, which might pretend to be IE
|
||||
}
|
||||
var emulated = emulatedIEMajorVersion()
|
||||
if (emulated === null) {
|
||||
return // Not IE
|
||||
}
|
||||
var nonEmulated = actualNonEmulatedIEMajorVersion()
|
||||
|
||||
if (emulated !== nonEmulated) {
|
||||
window.alert('WARNING: You appear to be using IE' + nonEmulated + ' in IE' + emulated + ' emulation mode.\nIE emulation modes can behave significantly differently from ACTUAL older versions of IE.\nPLEASE DON\'T FILE BOOTSTRAP BUGS based on testing in IE emulation modes!')
|
||||
}
|
||||
})();
|
22
js/ie10-viewport-bug-workaround.js
Normal file
22
js/ie10-viewport-bug-workaround.js
Normal file
@ -0,0 +1,22 @@
|
||||
/*!
|
||||
* IE10 viewport hack for Surface/desktop Windows 8 bug
|
||||
* Copyright 2014 Twitter, Inc.
|
||||
* Licensed under the Creative Commons Attribution 3.0 Unported License. For
|
||||
* details, see http://creativecommons.org/licenses/by/3.0/.
|
||||
*/
|
||||
|
||||
// See the Getting Started docs for more information:
|
||||
// http://getbootstrap.com/getting-started/#support-ie10-width
|
||||
|
||||
(function () {
|
||||
'use strict';
|
||||
if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
|
||||
var msViewportStyle = document.createElement('style')
|
||||
msViewportStyle.appendChild(
|
||||
document.createTextNode(
|
||||
'@-ms-viewport{width:auto!important}'
|
||||
)
|
||||
)
|
||||
document.querySelector('head').appendChild(msViewportStyle)
|
||||
}
|
||||
})();
|
95
js/index_user_scripts.js
Normal file
95
js/index_user_scripts.js
Normal file
@ -0,0 +1,95 @@
|
||||
(function()
|
||||
{
|
||||
"use strict";
|
||||
/*
|
||||
hook up event handlers
|
||||
*/
|
||||
function register_event_handlers()
|
||||
{
|
||||
|
||||
|
||||
/* button .uib_w_2 */
|
||||
$(document).on("click", ".uib_w_2", function(evt)
|
||||
{
|
||||
var x = $("#inp1").val().split(/[\s,;\t\r\n]+/);
|
||||
wave.sigData = new Float64Array(x.length);
|
||||
wave.sigLength = x.length;
|
||||
var i;
|
||||
for(i = 0;i < x.length;i++) {
|
||||
wave.sigData[i] = parseFloat(x[i]);
|
||||
}
|
||||
alert(wave.sigData[2]);
|
||||
displayPage();
|
||||
});
|
||||
|
||||
/* button .uib_w_4 */
|
||||
$(document).on("click", ".uib_w_4", function(evt)
|
||||
{
|
||||
var fileinput = document.getElementById('finp1');
|
||||
var finp1 = fileinput.files[0];
|
||||
var reader = new FileReader();
|
||||
|
||||
reader.onload = function(e) {
|
||||
var x = reader.result.split(/[\s,;\t\r\n]+/);
|
||||
wave.sigData = new Float64Array(x.length);
|
||||
wave.sigLength = x.length;
|
||||
var i;
|
||||
for(i = 0;i < x.length;i++) {
|
||||
wave.sigData[i] = parseFloat(x[i]);
|
||||
}
|
||||
alert(wave.sigData[0]);
|
||||
displayPage();
|
||||
}
|
||||
|
||||
reader.readAsText(finp1);
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
document.addEventListener("app.Ready", register_event_handlers, false);
|
||||
})();
|
||||
|
||||
$(document).ready(function(){
|
||||
$('#testsig1').change(function(){
|
||||
var value = $(this).val();
|
||||
var urlx = null;
|
||||
if (value == "ECG") {
|
||||
urlx = "https://raw.githubusercontent.com/rafat/rafat.github.io/master/sites/wavelib/data/ecg.txt";
|
||||
} else if (value == "Heavisine") {
|
||||
urlx = "https://raw.githubusercontent.com/rafat/rafat.github.io/master/sites/wavelib/data/heavisine.txt";
|
||||
} else if (value == "Piecewise Regular 256") {
|
||||
urlx = "https://raw.githubusercontent.com/rafat/rafat.github.io/master/sites/wavelib/data/pieceregular.txt";
|
||||
} else if (value == "Piecewise Regular 2048") {
|
||||
urlx = "https://raw.githubusercontent.com/rafat/rafat.github.io/master/sites/wavelib/data/pieceregular2048.txt";
|
||||
} else if (value == "Piecewise Polynomial") {
|
||||
urlx = "https://raw.githubusercontent.com/rafat/rafat.github.io/master/sites/wavelib/data/piecepoly.txt";
|
||||
} else if (value == "Noisy Bumps") {
|
||||
urlx = "https://raw.githubusercontent.com/rafat/rafat.github.io/master/sites/wavelib/data/noisybumps.txt";
|
||||
} else if (value == "Noisy Heavisine") {
|
||||
urlx = "https://raw.githubusercontent.com/rafat/rafat.github.io/master/sites/wavelib/data/noisyheavisine.txt";
|
||||
} else {
|
||||
alert("Please Select A Signal To Proceed.");
|
||||
}
|
||||
|
||||
console.log(urlx);
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: urlx,
|
||||
success: function(data) {
|
||||
var x = data.split(/[\s,;\t\r\n]+/);
|
||||
wave.sigData = new Float64Array(x.length);
|
||||
wave.sigLength = x.length;
|
||||
var i;
|
||||
for(i = 0;i < x.length;i++) {
|
||||
wave.sigData[i] = parseFloat(x[i]);
|
||||
}
|
||||
console.log(wave.sigLength);
|
||||
alert(wave.sigData[0]);
|
||||
displayPage();
|
||||
},
|
||||
error: function() {
|
||||
alert("Signal cannot be loaded. Please try again.")
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
1754
js/ngfile.js
Normal file
1754
js/ngfile.js
Normal file
File diff suppressed because it is too large
Load Diff
90269
js/plotly.js
Normal file
90269
js/plotly.js
Normal file
File diff suppressed because it is too large
Load Diff
44
js/plotly.min.js
vendored
Normal file
44
js/plotly.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
7329
js/ui-bootstrap-tpls.js
Normal file
7329
js/ui-bootstrap-tpls.js
Normal file
File diff suppressed because it is too large
Load Diff
30708
js/wavebak.js
Normal file
30708
js/wavebak.js
Normal file
File diff suppressed because one or more lines are too long
31106
js/wavelet.js
Normal file
31106
js/wavelet.js
Normal file
File diff suppressed because one or more lines are too long
17
js/wavelib.bak3.js
Normal file
17
js/wavelib.bak3.js
Normal file
File diff suppressed because one or more lines are too long
17
js/wavelib.js
Normal file
17
js/wavelib.js
Normal file
File diff suppressed because one or more lines are too long
296
js/wavewrapper.js
Normal file
296
js/wavewrapper.js
Normal file
@ -0,0 +1,296 @@
|
||||
var flength = function (str) {
|
||||
filtlength = Module.cwrap('filtlength', 'number', ['string']);
|
||||
return filtlength(str);
|
||||
};
|
||||
|
||||
function zeroArray(length) {
|
||||
var array = [];
|
||||
for (var i = 0; i < length; i++) {
|
||||
array[i] = 0;
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
function sigdata() {
|
||||
var sigdata = [ -18.3237,-18.2232,-18.0974,-17.9410,-17.7480,-17.5113,-17.2230,-16.8744,-16.4558,-15.9565,-15.3653,-14.6701,-13.8586,-12.9182,
|
||||
-11.8363,-10.6008,-9.2006,-7.6257,-5.8680,-3.9217,-1.7839,0.5452,3.0614,5.7562,8.6167,11.6252,14.7591,17.9909,21.2884,24.6155,27.9319,
|
||||
31.1947,34.3587,37.3775,40.2049,42.7957,13.2164,14.2125,15.0317,15.6595,16.0845,16.2990,16.2990,16.0845,15.6595,15.0317,14.2125,13.2164,
|
||||
12.0608,10.7654,9.3517,34.3587,31.1947,27.9319,24.6155,21.2884,17.9909,14.7591,11.6252,8.6167,5.7562,3.0614,0.5452,-1.7839,-3.9217,-5.8680,
|
||||
-7.6257,-9.2006,-10.6008,-11.8363,-12.9182,-13.8586,-14.6701,-15.3653,-15.9565,-16.4558,-16.8744,-17.2230,-17.5113,-17.7480,-17.9410,-18.0974,
|
||||
-18.2232,-18.3237,-18.4035,-18.0080,-17.8889,-17.7403,-17.5533,-17.3156,-17.0102,-16.6129,-16.0884,-15.3848,-14.4239,-13.0840,-11.1708,-8.3634,
|
||||
-4.1098,2.5833,13.6048,32.7934,28.0187,10.9660,1.0776,-4.9459,-8.7354,-11.1225,-12.4865,-12.8019,-11.2050,-3.3124,1.8995,-11.3573,-15.0684,
|
||||
-16.5028,-17.1937,-17.5831,-17.8288,-17.9968,-18.1185,-18.2103,-18.2818,-18.3388,-18.3849,-18.4229,-18.4545,-18.4810,-17.4642,-17.2104,-16.9033,
|
||||
-16.5317,-16.0822,-15.5384,-14.8804,-14.0844,-13.1214,-11.9563,-10.5467,-8.8414,-6.7782,-4.2822,-1.2624,2.3911,6.8111,12.1585,18.6280,26.4549,
|
||||
35.9241,35.9241,26.4549,18.6280,12.1585,6.8111,2.3911,-1.2624,-4.2822,-6.7782,-8.8414,-10.5467,-11.9563,-13.1214,-14.0844,-14.8804,-15.5384,
|
||||
-16.0822,-16.5317,-16.9033,-17.2104,-17.4642,-18.6741,-18.6741,-18.6741,-18.6741,-18.6741,-18.6741,-18.6741,-18.6741,-18.6741,-18.6741,-18.6741,
|
||||
-18.6741,6.3259,6.3259,6.3259,6.3259,6.3259,6.3259,6.3259,6.3259,6.3259,6.3259,6.3259,6.3259,6.3259,6.3259,6.3259,6.3259,6.3259,6.3259,6.3259,
|
||||
6.3259,6.3259,6.3259,6.3259,6.3259,34.8066,34.6752,34.5285,34.3645,34.1812,33.9763,33.7474,33.4917,33.2058,32.8863,32.5294,32.1304,31.6846,31.1864,
|
||||
30.6296,30.0074,29.3121,28.5350,27.6667,26.6963,25.6118,24.3999,23.0456,21.5322,19.8408,17.9507,15.8385,13.4781,10.8403,7.8925,4.5982,0.9168,-3.1972,
|
||||
-7.7947,-12.932,-18.6741,-18.6741,-18.6741,-18.6741,-18.6741,-18.6741,-18.6741,-18.6741,-18.6741,-18.6741,-18.6741,-18.6741,-18.6741,-18.6741,-18.3237];
|
||||
return sigdata;
|
||||
}
|
||||
|
||||
var fcoef = function (str) {
|
||||
fcoef = Module.cwrap('filtcoef', 'number', ['string', 'number', 'number', 'number', 'number']);
|
||||
var length = flength(str);
|
||||
var lpd = new Float64Array(length);
|
||||
var hpd = new Float64Array(length);
|
||||
var lpr = new Float64Array(length);
|
||||
var hpr = new Float64Array(length);
|
||||
var lbl = new Uint8Array(length);
|
||||
for (var i = 0; i < length; ++i) {
|
||||
lpd[i] = hpd[i] = lpr[i] = hpr[i] = 0.0;
|
||||
lbl[i] = i;
|
||||
}
|
||||
var size = 8 * length;
|
||||
var ptr1 = Module._malloc(size);
|
||||
var ptr2 = Module._malloc(size);
|
||||
var ptr3 = Module._malloc(size);
|
||||
var ptr4 = Module._malloc(size);
|
||||
var buf1 = new Uint8Array(Module.HEAPU8.buffer, ptr1, size);
|
||||
var buf2 = new Uint8Array(Module.HEAPU8.buffer, ptr2, size);
|
||||
var buf3 = new Uint8Array(Module.HEAPU8.buffer, ptr3, size);
|
||||
var buf4 = new Uint8Array(Module.HEAPU8.buffer, ptr4, size);
|
||||
buf1.set(new Uint8Array(lpd.buffer));
|
||||
buf2.set(new Uint8Array(hpd.buffer));
|
||||
buf3.set(new Uint8Array(lpr.buffer));
|
||||
buf4.set(new Uint8Array(hpr.buffer));
|
||||
var t = fcoef(str, buf1.byteOffset, buf2.byteOffset, buf3.byteOffset, buf4.byteOffset);
|
||||
var lpd = new Float64Array(buf1.buffer, buf1.byteOffset, length);
|
||||
var hpd = new Float64Array(buf2.buffer, buf2.byteOffset, length);
|
||||
var lpr = new Float64Array(buf3.buffer, buf3.byteOffset, length);
|
||||
var hpr = new Float64Array(buf4.buffer, buf4.byteOffset, length);
|
||||
|
||||
Module._free(buf1);
|
||||
Module._free(buf2);
|
||||
Module._free(buf3);
|
||||
Module._free(buf4);
|
||||
console.log(lpd);
|
||||
console.log(hpd);
|
||||
console.log(lpr);
|
||||
console.log(hpr);
|
||||
|
||||
$('#canvas-holder').append("<div class='row' />");
|
||||
$('#canvas-holder').append("<div class='row' />");
|
||||
|
||||
for (var i = 0; i < 2; ++i) {
|
||||
$('.row').append("<div class='col-md-6' />");
|
||||
}
|
||||
|
||||
var newCanvas = $('<canvas/>',{
|
||||
id: 'canvas1'
|
||||
});
|
||||
$('.col-md-6:eq(0)').append(newCanvas);
|
||||
|
||||
var newCanvas2 = $('<canvas/>',{
|
||||
id: 'canvas2'
|
||||
});
|
||||
$('.col-md-6:eq(1)').append(newCanvas2);
|
||||
|
||||
var newCanvas3 = $('<canvas/>',{
|
||||
id: 'canvas3'
|
||||
});
|
||||
$('.col-md-6:eq(2)').append(newCanvas3);
|
||||
|
||||
var newCanvas4 = $('<canvas/>',{
|
||||
id: 'canvas4'
|
||||
});
|
||||
$('.col-md-6:eq(3)').append(newCanvas4);
|
||||
|
||||
var barChartData = {
|
||||
labels: lbl,
|
||||
datasets: [
|
||||
{
|
||||
fillColor: "rgba(255,0,0,0.5)",
|
||||
strokeColor: "rgba(255,0,0,0.8)",
|
||||
highlightFill: "rgba(255,0,0,0.75)",
|
||||
highlightStroke: "rgba(255,0,0,1)",
|
||||
data: lpd
|
||||
},
|
||||
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
var barChartData2 = {
|
||||
labels: lbl,
|
||||
datasets: [
|
||||
{
|
||||
fillColor: "rgba(0,0,255,0.5)",
|
||||
strokeColor: "rgba(0,0,255,0.8)",
|
||||
highlightFill: "rgba(0,0,255,0.75)",
|
||||
highlightStroke: "rgba(0,0,255,1)",
|
||||
data: hpd
|
||||
},
|
||||
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
var barChartData3 = {
|
||||
labels: lbl,
|
||||
datasets: [
|
||||
{
|
||||
fillColor: "rgba(255,0,0,0.5)",
|
||||
strokeColor: "rgba(255,0,0,0.8)",
|
||||
highlightFill: "rgba(255,0,0,0.75)",
|
||||
highlightStroke: "rgba(255,0,0,1)",
|
||||
data: lpr
|
||||
},
|
||||
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
var barChartData4 = {
|
||||
labels: lbl,
|
||||
datasets: [
|
||||
{
|
||||
fillColor: "rgba(0,0,255,0.5)",
|
||||
strokeColor: "rgba(0,0,255,0.8)",
|
||||
highlightFill: "rgba(0,0,255,0.75)",
|
||||
highlightStroke: "rgba(0,0,255,1)",
|
||||
data: hpr
|
||||
},
|
||||
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
window.onload = function () {
|
||||
var ctx = document.getElementById("canvas1").getContext("2d");
|
||||
window.myBar = new Chart(ctx).Bar(barChartData, {
|
||||
responsive: true
|
||||
});
|
||||
var ctx2 = document.getElementById("canvas2").getContext("2d");
|
||||
window.myBar = new Chart(ctx2).Bar(barChartData2, {
|
||||
responsive: true
|
||||
});
|
||||
var ctx3 = document.getElementById("canvas3").getContext("2d");
|
||||
window.myBar = new Chart(ctx3).Bar(barChartData3, {
|
||||
responsive: true
|
||||
});
|
||||
var ctx4 = document.getElementById("canvas4").getContext("2d");
|
||||
window.myBar = new Chart(ctx4).Bar(barChartData4, {
|
||||
responsive: true
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
var frontpage = function () {
|
||||
//$('#canvas-holder').append("<img src='img/3dgausswave.png' />");
|
||||
$('#canvas-holder').append("<div class='row' />");
|
||||
//$('#canvas-holder').append("<div class='row' />");
|
||||
//for (var i = 0; i < 2; ++i) {
|
||||
// $('.row').append("<div class='col-md-6' />");
|
||||
//}
|
||||
//$('.col-md-6').append("<img src='img/3dgauss.jpg' />");
|
||||
//$row.append("<div class='col-md-6' />").append("<img src='img/3dgauss.jpg' />");
|
||||
$('.row').append("<div class='col-md-3' />");
|
||||
$('.row').append("<div class='col-md-6' />");
|
||||
$('.row').append("<div class='col-md-3' />");
|
||||
var sig = sigdata();
|
||||
var length = sig.length;
|
||||
var lbl = [];
|
||||
|
||||
for (i = 0; i < length; ++i) {
|
||||
lbl[i] = i;
|
||||
}
|
||||
|
||||
var sigChartData = {
|
||||
labels: lbl,
|
||||
datasets: [
|
||||
{
|
||||
label: "Input Signal",
|
||||
fillColor: "rgba(151,187,205,0.2)",
|
||||
strokeColor: "rgba(151,187,205,1)",
|
||||
pointColor: "rgba(151,187,205,1)",
|
||||
pointStrokeColor: "#fff",
|
||||
pointHighlightFill: "#fff",
|
||||
pointHighlightStroke: "rgba(151,187,205,1)",
|
||||
data: sig
|
||||
},
|
||||
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
var newCanvas = $('<canvas/>',{
|
||||
id: 'canvas1'
|
||||
});
|
||||
$('.col-md-6').append(newCanvas);
|
||||
|
||||
window.onload = function () {
|
||||
var ctx = document.getElementById("canvas1").getContext("2d");
|
||||
window.myBar = new Chart(ctx).Line(sigChartData, {
|
||||
responsive: true
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var frontpage2 = function () {
|
||||
//$('#canvas-holder').append("<img src='img/3dgausswave.png' />");
|
||||
$('#canvas-holder').append("<div class='row' />");
|
||||
//$('#canvas-holder').append("<div class='row' />");
|
||||
//for (var i = 0; i < 2; ++i) {
|
||||
// $('.row').append("<div class='col-md-6' />");
|
||||
//}
|
||||
//$('.col-md-6').append("<img src='img/3dgauss.jpg' />");
|
||||
//$row.append("<div class='col-md-6' />").append("<img src='img/3dgauss.jpg' />");
|
||||
$('.row').append("<div class='col-md-4' />");
|
||||
$('.row').append("<div class='col-md-4' />");
|
||||
$('.row').append("<div class='col-md-4' />");
|
||||
var sig = sigdata();
|
||||
var length = sig.length;
|
||||
var lbl = [];
|
||||
|
||||
for (i = 0; i < length; ++i) {
|
||||
lbl[i] = [i, sig[i]];
|
||||
}
|
||||
$('.starter-template').empty();
|
||||
$('.starter-template').append("<div id='graph' style='margin:0 auto' />");
|
||||
|
||||
g = new Dygraph(document.getElementById("graph"),
|
||||
lbl,
|
||||
{
|
||||
legend: 'always',
|
||||
color: '#3399ff',
|
||||
animatedZooms: true,
|
||||
title: 'Input'
|
||||
});
|
||||
|
||||
$('.col-md-4:eq(0)').append("<div class='input-group' />");
|
||||
$('.input-group').append("<input type='text' class='form-control' placeholder='Paste Data....' />");
|
||||
$('.input-group').append("<span class='input-group-btn' />");
|
||||
$('.input-group-btn').append("<button class='btn btn-default' type='button' value='GO'>GO</button>");
|
||||
|
||||
$('.col-md-4:eq(1)').append("<form role='form' class='form1' />");
|
||||
$('.form1').append("<div class='form-group' />");
|
||||
$('.form-group').append("<label />").text("Wavelet Family");
|
||||
|
||||
}
|
||||
|
||||
var displayPage = function() {
|
||||
//window.open('display.html','_self');
|
||||
document.location.href = 'display.html';
|
||||
$(document).ready(function() {
|
||||
var lbl = [];
|
||||
for (i = 0; i < wave.sigLength; ++i) {
|
||||
lbl[i] = [i, wave.sigData[i]];
|
||||
}
|
||||
console.log(lbl[0]);
|
||||
alert("Page Changed");
|
||||
g = new Dygraph(document.getElementById("graph1"),
|
||||
lbl,
|
||||
{
|
||||
legend: 'always',
|
||||
color: '#3399ff',
|
||||
animatedZooms: true,
|
||||
title: 'Input'
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
}
|
18
method.html
Normal file
18
method.html
Normal file
@ -0,0 +1,18 @@
|
||||
<div class="row marketing">
|
||||
<div class="col-md-3"></div>
|
||||
<div class="col-md-6 col-sm-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<button class="btn btn-primary btn-block"><span class="glyphicon glyphicon-hand-down pull-left" data-position="left">
|
||||
</span>Selection</button>
|
||||
<select class="wide-control form-control default" data-ng-model="transform" data-ng-change="setTransform()" id="wavevalue">
|
||||
<option value=""> Make A Selection </option>
|
||||
<option>Discrete Wavelet Transform</option>
|
||||
<option>Continuous Wavelet Transform</option>
|
||||
<option>Wavelet Denoising (BETA)</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3"></div>
|
||||
</div>
|
3
report.html
Normal file
3
report.html
Normal file
@ -0,0 +1,3 @@
|
||||
<div class="row marketing">
|
||||
|
||||
</div>
|
@ -1,55 +0,0 @@
|
||||
# 设定源文件文件夹
|
||||
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)
|
||||
|
||||
# 设置库文件的输出地址
|
||||
set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
|
||||
|
||||
# 设置编译选项
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3")
|
||||
|
||||
set(CONFIG_FILE_PATH lib/cmake/${PROJECT_NAME})
|
||||
|
||||
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 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)
|
@ -204,7 +204,5 @@ void conv_fft(const conv_object obj,fft_type *inp1,fft_type *inp2,fft_type *oup)
|
||||
|
||||
|
||||
void free_conv(conv_object object) {
|
||||
free_real_fft(object->fobj);
|
||||
free_real_fft(object->iobj);
|
||||
free(object);
|
||||
}
|
||||
|
10
src/conv.h
10
src/conv.h
@ -17,8 +17,18 @@ extern "C" {
|
||||
#define MIN(a,b) (((a)<(b))?(a):(b))
|
||||
#define MAX(a,b) (((a)>(b))?(a):(b))
|
||||
|
||||
typedef struct conv_set* conv_object;
|
||||
|
||||
conv_object conv_init(int N, int L);
|
||||
|
||||
struct conv_set{
|
||||
fft_real_object fobj;
|
||||
fft_real_object iobj;
|
||||
int ilen1;
|
||||
int ilen2;
|
||||
int clen;
|
||||
};
|
||||
|
||||
int factorf(int M);
|
||||
|
||||
int findnext(int M);
|
||||
|
398
src/cwt.c
398
src/cwt.c
@ -1,398 +0,0 @@
|
||||
/*
|
||||
Copyright (c) 2015, Rafat Hussain
|
||||
*/
|
||||
/*
|
||||
This code is a C translation ( with some modifications) of Wavelet Software provided by
|
||||
C. Torrence and G. Compo, and is available at URL: http://atoc.colorado.edu/research/wavelets/''.
|
||||
*/
|
||||
|
||||
#include "cwt.h"
|
||||
|
||||
double factorial(int N) {
|
||||
static const double fact[41] = { 1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800, 39916800, 479001600, 6227020800, 87178291200, 1307674368000,
|
||||
20922789888000, 355687428096000, 6402373705728000, 121645100408832000, 2432902008176640000, 51090942171709440000.0, 1124000727777607680000.0,
|
||||
25852016738884976640000.0, 620448401733239439360000.0, 15511210043330985984000000.0, 403291461126605635584000000.0, 10888869450418352160768000000.0,
|
||||
304888344611713860501504000000.0, 8841761993739701954543616000000.0, 265252859812191058636308480000000.0, 8222838654177922817725562880000000.0,
|
||||
263130836933693530167218012160000000.0, 8683317618811886495518194401280000000.0, 295232799039604140847618609643520000000.0, 10333147966386144929666651337523200000000.0,
|
||||
371993326789901217467999448150835200000000.0, 13763753091226345046315979581580902400000000.0, 523022617466601111760007224100074291200000000.0,
|
||||
20397882081197443358640281739902897356800000000.0, 815915283247897734345611269596115894272000000000.0 };
|
||||
|
||||
if (N > 40 || N < 0) {
|
||||
printf("This program is only valid for 0 <= N <= 40 \n");
|
||||
return -1.0;
|
||||
}
|
||||
|
||||
return fact[N];
|
||||
|
||||
}
|
||||
static void wave_function(int nk, double dt,int mother, double param,double scale1, double *kwave, double pi,double *period1,
|
||||
double *coi1, fft_data *daughter) {
|
||||
|
||||
double norm, expnt, fourier_factor;
|
||||
int k, m;
|
||||
double temp;
|
||||
int sign,re;
|
||||
|
||||
|
||||
if (mother == 0) {
|
||||
//MORLET
|
||||
if (param < 0.0) {
|
||||
param = 6.0;
|
||||
}
|
||||
norm = sqrt(2.0*pi*scale1 / dt)*pow(pi,-0.25);
|
||||
|
||||
for (k = 1; k <= nk / 2 + 1; ++k) {
|
||||
temp = (scale1*kwave[k-1] - param);
|
||||
expnt = -0.5 * temp * temp;
|
||||
daughter[k - 1].re = norm * exp(expnt);
|
||||
daughter[k - 1].im = 0.0;
|
||||
}
|
||||
for (k = nk / 2 + 2; k <= nk; ++k) {
|
||||
daughter[k - 1].re = daughter[k - 1].im = 0.0;
|
||||
}
|
||||
fourier_factor = (4.0*pi) / (param + sqrt(2.0 + param*param));
|
||||
*period1 = scale1*fourier_factor;
|
||||
*coi1 = fourier_factor / sqrt(2.0);
|
||||
}
|
||||
else if (mother == 1) {
|
||||
// PAUL
|
||||
if (param < 0.0) {
|
||||
param = 4.0;
|
||||
}
|
||||
m = (int)param;
|
||||
norm = sqrt(2.0*pi*scale1 / dt)*(pow(2.0,(double)m) / sqrt((double)(m*factorial(2 * m - 1))));
|
||||
for (k = 1; k <= nk / 2 + 1; ++k) {
|
||||
temp = scale1 * kwave[k - 1];
|
||||
expnt = - temp;
|
||||
daughter[k - 1].re = norm * pow(temp,(double)m) * exp(expnt);
|
||||
daughter[k - 1].im = 0.0;
|
||||
}
|
||||
for (k = nk / 2 + 2; k <= nk; ++k) {
|
||||
daughter[k - 1].re = daughter[k - 1].im = 0.0;
|
||||
}
|
||||
fourier_factor = (4.0*pi) / (2.0 * m + 1.0);
|
||||
*period1 = scale1*fourier_factor;
|
||||
*coi1 = fourier_factor * sqrt(2.0);
|
||||
}
|
||||
else if (mother == 2) {
|
||||
if (param < 0.0) {
|
||||
param = 2.0;
|
||||
}
|
||||
m = (int)param;
|
||||
|
||||
if (m % 2 == 0) {
|
||||
re = 1;
|
||||
}
|
||||
else {
|
||||
re = 0;
|
||||
}
|
||||
|
||||
if (m % 4 == 0 || m % 4 == 1) {
|
||||
sign = -1;
|
||||
}
|
||||
else {
|
||||
sign = 1;
|
||||
}
|
||||
|
||||
|
||||
norm = sqrt(2.0*pi*scale1 / dt)*sqrt(1.0 / cwt_gamma(m + 0.50));
|
||||
norm *= sign;
|
||||
|
||||
if (re == 1) {
|
||||
for (k = 1; k <= nk; ++k) {
|
||||
temp = scale1 * kwave[k - 1];
|
||||
daughter[k - 1].re = norm*pow(temp,(double)m)*exp(-0.50*pow(temp,2.0));
|
||||
daughter[k - 1].im = 0.0;
|
||||
}
|
||||
}
|
||||
else if (re == 0) {
|
||||
for (k = 1; k <= nk; ++k) {
|
||||
temp = scale1 * kwave[k - 1];
|
||||
daughter[k - 1].re = 0.0;
|
||||
daughter[k - 1].im = norm*pow(temp, (double)m)*exp(-0.50*pow(temp, 2.0));
|
||||
}
|
||||
}
|
||||
fourier_factor = (2.0*pi) * sqrt(2.0 / (2.0 * m + 1.0));
|
||||
*period1 = scale1*fourier_factor;
|
||||
*coi1 = fourier_factor / sqrt(2.0);
|
||||
}
|
||||
}
|
||||
|
||||
void cwavelet(const double *y, int N, double dt, int mother, double param, double s0, double dj, int jtot, int npad,
|
||||
double *wave, double *scale, double *period, double *coi) {
|
||||
|
||||
int i, j, k, iter;
|
||||
double ymean, freq1, pi, period1, coi1;
|
||||
double tmp1, tmp2;
|
||||
double scale1;
|
||||
double *kwave;
|
||||
fft_object obj, iobj;
|
||||
fft_data *ypad, *yfft,*daughter;
|
||||
|
||||
(void)s0; (void)dj; /* yes, we need these parameters unused */
|
||||
|
||||
pi = 4.0 * atan(1.0);
|
||||
|
||||
if (npad < N) {
|
||||
printf("npad must be >= N \n");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
obj = fft_init(npad, 1);
|
||||
iobj = fft_init(npad, -1);
|
||||
|
||||
ypad = (fft_data*)malloc(sizeof(fft_data)* npad);
|
||||
yfft = (fft_data*)malloc(sizeof(fft_data)* npad);
|
||||
daughter = (fft_data*)malloc(sizeof(fft_data)* npad);
|
||||
kwave = (double*)malloc(sizeof(double)* npad);
|
||||
|
||||
ymean = 0.0;
|
||||
|
||||
for (i = 0; i < N; ++i) {
|
||||
ymean += y[i];
|
||||
}
|
||||
|
||||
ymean /= N;
|
||||
|
||||
for (i = 0; i < N; ++i) {
|
||||
ypad[i].re = y[i] - ymean;
|
||||
ypad[i].im = 0.0;
|
||||
}
|
||||
|
||||
for (i = N; i < npad; ++i) {
|
||||
ypad[i].re = ypad[i].im = 0.0;
|
||||
}
|
||||
|
||||
|
||||
// Find FFT of the input y (ypad)
|
||||
|
||||
fft_exec(obj, ypad, yfft);
|
||||
|
||||
for (i = 0; i < npad; ++i) {
|
||||
yfft[i].re /= (double) npad;
|
||||
yfft[i].im /= (double) npad;
|
||||
}
|
||||
|
||||
|
||||
//Construct the wavenumber array
|
||||
|
||||
freq1 = 2.0*pi / ((double)npad*dt);
|
||||
kwave[0] = 0.0;
|
||||
|
||||
for (i = 1; i < npad / 2 + 1; ++i) {
|
||||
kwave[i] = i * freq1;
|
||||
}
|
||||
|
||||
for (i = npad / 2 + 1; i < npad; ++i) {
|
||||
kwave[i] = -kwave[npad - i ];
|
||||
}
|
||||
|
||||
|
||||
// Main loop
|
||||
|
||||
for (j = 1; j <= jtot; ++j) {
|
||||
scale1 = scale[j - 1];// = s0*pow(2.0, (double)(j - 1)*dj);
|
||||
wave_function(npad, dt, mother, param, scale1, kwave, pi,&period1,&coi1, daughter);
|
||||
period[j - 1] = period1;
|
||||
for (k = 0; k < npad; ++k) {
|
||||
tmp1 = daughter[k].re * yfft[k].re - daughter[k].im * yfft[k].im;
|
||||
tmp2 = daughter[k].re * yfft[k].im + daughter[k].im * yfft[k].re;
|
||||
daughter[k].re = tmp1;
|
||||
daughter[k].im = tmp2;
|
||||
}
|
||||
fft_exec(iobj, daughter, ypad);
|
||||
iter = 2 * (j - 1) * N;
|
||||
for (i = 0; i < N; ++i) {
|
||||
wave[iter + 2 * i] = ypad[i].re;
|
||||
wave[iter + 2 * i + 1] = ypad[i].im;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for (i = 1; i <= (N + 1) / 2; ++i) {
|
||||
coi[i - 1] = coi1 * dt * ((double)i - 1.0);
|
||||
coi[N - i] = coi[i - 1];
|
||||
}
|
||||
|
||||
|
||||
|
||||
free(kwave);
|
||||
free(ypad);
|
||||
free(yfft);
|
||||
free(daughter);
|
||||
|
||||
free_fft(obj);
|
||||
free_fft(iobj);
|
||||
|
||||
}
|
||||
|
||||
void psi0(int mother, double param,double *val,int *real) {
|
||||
double pi,coeff;
|
||||
int m,sign;
|
||||
|
||||
m = (int)param;
|
||||
pi = 4.0 * atan(1.0);
|
||||
|
||||
if (mother == 0) {
|
||||
// Morlet
|
||||
*val = 1.0 / sqrt(sqrt(pi));
|
||||
*real = 1;
|
||||
}
|
||||
else if (mother == 1) {
|
||||
//Paul
|
||||
if (m % 2 == 0) {
|
||||
*real = 1;
|
||||
}
|
||||
else {
|
||||
*real = 0;
|
||||
}
|
||||
|
||||
if (m % 4 == 0 || m % 4 == 1) {
|
||||
sign = 1;
|
||||
}
|
||||
else {
|
||||
sign = -1;
|
||||
}
|
||||
*val = sign * pow(2.0, (double)m) * factorial(m) / (sqrt(pi * factorial(2 * m)));
|
||||
|
||||
}
|
||||
else if (mother == 2) {
|
||||
// D.O.G
|
||||
*real = 1;
|
||||
|
||||
if (m % 2 == 0) {
|
||||
if (m % 4 == 0) {
|
||||
sign = -1;
|
||||
}
|
||||
else {
|
||||
sign = 1;
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static int maxabs(double *array,int N) {
|
||||
double maxval,temp;
|
||||
int i,index;
|
||||
maxval = 0.0;
|
||||
index = -1;
|
||||
|
||||
for (i = 0; i < N; ++i) {
|
||||
temp = fabs(array[i]);
|
||||
if (temp >= maxval) {
|
||||
maxval = temp;
|
||||
index = i;
|
||||
}
|
||||
}
|
||||
|
||||
return index;
|
||||
}
|
||||
|
||||
|
||||
double cdelta(int mother, double param, double psi0 ) {
|
||||
int N,i,j,iter;
|
||||
double *delta, *scale,*period,*wave,*coi,*mval;
|
||||
double den,cdel;
|
||||
double subscale,dt,dj,s0;
|
||||
int jtot;
|
||||
int maxarr;
|
||||
|
||||
subscale = 8.0;
|
||||
dt = 0.25;
|
||||
if (mother == 0) {
|
||||
N = 16;
|
||||
s0 = dt/4;
|
||||
}
|
||||
else if (mother == 1) {
|
||||
N = 16;
|
||||
s0 = dt / 4.0;
|
||||
}
|
||||
else if (mother == 2)
|
||||
{
|
||||
s0 = dt/8.0;
|
||||
N = 256;
|
||||
if (param == 2.0) {
|
||||
subscale = 16.0;
|
||||
s0 = dt / 16.0;
|
||||
N = 2048;
|
||||
}
|
||||
}
|
||||
|
||||
dj = 1.0 / subscale;
|
||||
jtot = 16 * (int) subscale;
|
||||
|
||||
delta = (double*)malloc(sizeof(double)* N);
|
||||
wave = (double*)malloc(sizeof(double)* 2 * N * jtot);
|
||||
coi = (double*)malloc(sizeof(double)* N);
|
||||
scale = (double*)malloc(sizeof(double)* jtot);
|
||||
period = (double*)malloc(sizeof(double)* jtot);
|
||||
mval = (double*)malloc(sizeof(double)* N);
|
||||
|
||||
|
||||
delta[0] = 1;
|
||||
|
||||
for (i = 1; i < N; ++i) {
|
||||
delta[i] = 0;
|
||||
}
|
||||
|
||||
for (i = 0; i < jtot; ++i) {
|
||||
scale[i] = s0*pow(2.0, (double)(i)*dj);
|
||||
}
|
||||
|
||||
cwavelet(delta, N, dt, mother, param, s0, dj, jtot, N, wave, scale, period, coi);
|
||||
|
||||
for (i = 0; i < N; ++i) {
|
||||
mval[i] = 0;
|
||||
}
|
||||
|
||||
for (j = 0; j < jtot; ++j) {
|
||||
iter = 2 * j * N;
|
||||
den = sqrt(scale[j]);
|
||||
for (i = 0; i < N; ++i) {
|
||||
mval[i] += wave[iter + 2 * i]/den;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
maxarr = maxabs(mval, N);
|
||||
|
||||
cdel = sqrt(dt) * dj * mval[maxarr] / psi0;
|
||||
|
||||
free(delta);
|
||||
free(wave);
|
||||
|
||||
free(scale);
|
||||
free(period);
|
||||
free(coi);
|
||||
free(mval);
|
||||
|
||||
return cdel;
|
||||
}
|
||||
|
||||
void icwavelet(double *wave, int N, double *scale,int jtot,double dt,double dj,double cdelta,double psi0,double *oup) {
|
||||
int i, j,iter;
|
||||
double den, coeff;
|
||||
|
||||
coeff = sqrt(dt) * dj / (cdelta *psi0);
|
||||
|
||||
for (i = 0; i < N; ++i) {
|
||||
oup[i] = 0.0;
|
||||
}
|
||||
|
||||
for (j = 0; j < jtot; ++j) {
|
||||
iter = 2 * j * N;
|
||||
den = sqrt(scale[j]);
|
||||
for (i = 0; i < N; ++i) {
|
||||
oup[i] += wave[iter + 2 * i] / den;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < N; ++i) {
|
||||
oup[i] *= coeff;
|
||||
}
|
||||
}
|
29
src/cwt.h
29
src/cwt.h
@ -1,29 +0,0 @@
|
||||
#ifndef CWT_H_
|
||||
#define CWT_H_
|
||||
|
||||
#include "wavefunc.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void cwavelet(const double *y, int N, double dt, int mother, double param, double s0, double dj, int jtot, int npad,
|
||||
double *wave, double *scale, double *period, double *coi);
|
||||
|
||||
void psi0(int mother, double param, double *val, int *real);
|
||||
|
||||
double factorial(int N);
|
||||
|
||||
double cdelta(int mother, double param, double psi0);
|
||||
|
||||
void icwavelet(double *wave, int N, double *scale, int jtot, double dt, double dj, double cdelta, double psi0, double *oup);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* WAVELIB_H_ */
|
||||
|
||||
|
296
src/cwtmath.c
296
src/cwtmath.c
@ -1,296 +0,0 @@
|
||||
#include "cwtmath.h"
|
||||
|
||||
static void nsfft_fd(fft_object obj, fft_data *inp, fft_data *oup,double lb,double ub,double *w) {
|
||||
int M,N,i,j,L;
|
||||
double delta,den,theta,tempr,tempi,plb;
|
||||
double *temp1,*temp2;
|
||||
|
||||
N = obj->N;
|
||||
L = N/2;
|
||||
//w = (double*)malloc(sizeof(double)*N);
|
||||
|
||||
M = divideby(N, 2);
|
||||
|
||||
if (M == 0) {
|
||||
printf("The Non-Standard FFT Length must be a power of 2");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
temp1 = (double*)malloc(sizeof(double)*L);
|
||||
temp2 = (double*)malloc(sizeof(double)*L);
|
||||
|
||||
delta = (ub - lb)/ N;
|
||||
j = -N;
|
||||
den = 2 * (ub-lb);
|
||||
|
||||
for(i = 0; i < N;++i) {
|
||||
w[i] = (double)j/den;
|
||||
j += 2;
|
||||
}
|
||||
|
||||
fft_exec(obj,inp,oup);
|
||||
|
||||
|
||||
for (i = 0; i < L; ++i) {
|
||||
temp1[i] = oup[i].re;
|
||||
temp2[i] = oup[i].im;
|
||||
}
|
||||
|
||||
for (i = 0; i < N - L; ++i) {
|
||||
oup[i].re = oup[i + L].re;
|
||||
oup[i].im = oup[i + L].im;
|
||||
}
|
||||
|
||||
for (i = 0; i < L; ++i) {
|
||||
oup[N - L + i].re = temp1[i];
|
||||
oup[N - L + i].im = temp2[i];
|
||||
}
|
||||
|
||||
plb = PI2 * lb;
|
||||
|
||||
for(i = 0; i < N;++i) {
|
||||
tempr = oup[i].re;
|
||||
tempi = oup[i].im;
|
||||
theta = w[i] * plb;
|
||||
|
||||
oup[i].re = delta * (tempr*cos(theta) + tempi*sin(theta));
|
||||
oup[i].im = delta * (tempi*cos(theta) - tempr*sin(theta));
|
||||
}
|
||||
|
||||
|
||||
//free(w);
|
||||
free(temp1);
|
||||
free(temp2);
|
||||
}
|
||||
|
||||
static void nsfft_bk(fft_object obj, fft_data *inp, fft_data *oup,double lb,double ub,double *t) {
|
||||
int M,N,i,j,L;
|
||||
double *w;
|
||||
double delta,den,plb,theta;
|
||||
double *temp1,*temp2;
|
||||
fft_data *inpt;
|
||||
|
||||
N = obj->N;
|
||||
L = N/2;
|
||||
|
||||
M = divideby(N, 2);
|
||||
|
||||
if (M == 0) {
|
||||
printf("The Non-Standard FFT Length must be a power of 2");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
temp1 = (double*)malloc(sizeof(double)*L);
|
||||
temp2 = (double*)malloc(sizeof(double)*L);
|
||||
w = (double*)malloc(sizeof(double)*N);
|
||||
inpt = (fft_data*) malloc (sizeof(fft_data) * N);
|
||||
|
||||
delta = (ub - lb)/ N;
|
||||
j = -N;
|
||||
den = 2 * (ub-lb);
|
||||
|
||||
for(i = 0; i < N;++i) {
|
||||
w[i] = (double)j/den;
|
||||
j += 2;
|
||||
}
|
||||
|
||||
plb = PI2 * lb;
|
||||
|
||||
for(i = 0; i < N;++i) {
|
||||
theta = w[i] * plb;
|
||||
|
||||
inpt[i].re = (inp[i].re*cos(theta) - inp[i].im*sin(theta))/delta;
|
||||
inpt[i].im = (inp[i].im*cos(theta) + inp[i].re*sin(theta))/delta;
|
||||
}
|
||||
|
||||
for (i = 0; i < L; ++i) {
|
||||
temp1[i] = inpt[i].re;
|
||||
temp2[i] = inpt[i].im;
|
||||
}
|
||||
|
||||
for (i = 0; i < N - L; ++i) {
|
||||
inpt[i].re = inpt[i + L].re;
|
||||
inpt[i].im = inpt[i + L].im;
|
||||
}
|
||||
|
||||
for (i = 0; i < L; ++i) {
|
||||
inpt[N - L + i].re = temp1[i];
|
||||
inpt[N - L + i].im = temp2[i];
|
||||
}
|
||||
|
||||
fft_exec(obj,inpt,oup);
|
||||
|
||||
for(i = 0; i < N;++i) {
|
||||
t[i] = lb + i*delta;
|
||||
}
|
||||
|
||||
free(w);
|
||||
free(temp1);
|
||||
free(temp2);
|
||||
free(inpt);
|
||||
}
|
||||
|
||||
void nsfft_exec(fft_object obj, fft_data *inp, fft_data *oup,double lb,double ub,double *w) {
|
||||
if (obj->sgn == 1) {
|
||||
nsfft_fd(obj,inp,oup,lb,ub,w);
|
||||
} else if (obj->sgn == -1) {
|
||||
nsfft_bk(obj,inp,oup,lb,ub,w);
|
||||
}
|
||||
}
|
||||
|
||||
static double fix(double x) {
|
||||
// Rounds to the integer nearest to zero
|
||||
if (x >= 0.) {
|
||||
return floor(x);
|
||||
} else {
|
||||
return ceil(x);
|
||||
}
|
||||
}
|
||||
|
||||
int nint(double N) {
|
||||
int i;
|
||||
|
||||
i = (int)(N + 0.49999);
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
double cwt_gamma(double x) {
|
||||
/*
|
||||
* This C program code is based on W J Cody's fortran code.
|
||||
* http://www.netlib.org/specfun/gamma
|
||||
*
|
||||
* References:
|
||||
"An Overview of Software Development for Special Functions",
|
||||
W. J. Cody, Lecture Notes in Mathematics, 506,
|
||||
Numerical Analysis Dundee, 1975, G. A. Watson (ed.),
|
||||
Springer Verlag, Berlin, 1976.
|
||||
|
||||
Computer Approximations, Hart, Et. Al., Wiley and sons, New York, 1968.
|
||||
*/
|
||||
|
||||
// numerator and denominator coefficients for 1 <= x <= 2
|
||||
|
||||
double y,oup,fact,sum,y2,yi,z,nsum,dsum;
|
||||
int swi,n,i;
|
||||
|
||||
double spi = 0.9189385332046727417803297;
|
||||
double pi = 3.1415926535897932384626434;
|
||||
double xmax = 171.624e+0;
|
||||
double xinf = 1.79e308;
|
||||
double eps = 2.22e-16;
|
||||
double xninf = 1.79e-308;
|
||||
|
||||
double num[8] = { -1.71618513886549492533811e+0,
|
||||
2.47656508055759199108314e+1,
|
||||
-3.79804256470945635097577e+2,
|
||||
6.29331155312818442661052e+2,
|
||||
8.66966202790413211295064e+2,
|
||||
-3.14512729688483675254357e+4,
|
||||
-3.61444134186911729807069e+4,
|
||||
6.64561438202405440627855e+4 };
|
||||
|
||||
double den[8] = { -3.08402300119738975254353e+1,
|
||||
3.15350626979604161529144e+2,
|
||||
-1.01515636749021914166146e+3,
|
||||
-3.10777167157231109440444e+3,
|
||||
2.25381184209801510330112e+4,
|
||||
4.75584627752788110767815e+3,
|
||||
-1.34659959864969306392456e+5,
|
||||
-1.15132259675553483497211e+5 };
|
||||
|
||||
// Coefficients for Hart's Minimax approximation x >= 12
|
||||
|
||||
|
||||
double c[7] = { -1.910444077728e-03,
|
||||
8.4171387781295e-04,
|
||||
-5.952379913043012e-04,
|
||||
7.93650793500350248e-04,
|
||||
-2.777777777777681622553e-03,
|
||||
8.333333333333333331554247e-02,
|
||||
5.7083835261e-03 };
|
||||
|
||||
y = x;
|
||||
swi = 0;
|
||||
fact = 1.0;
|
||||
n = 0;
|
||||
|
||||
|
||||
if ( y < 0.) {
|
||||
// Negative x
|
||||
y = -x;
|
||||
yi = fix(y);
|
||||
oup = y - yi;
|
||||
|
||||
if (oup != 0.0) {
|
||||
if (yi != fix(yi * .5) * 2.) {
|
||||
swi = 1;
|
||||
}
|
||||
fact = -pi / sin(pi * oup);
|
||||
y += 1.;
|
||||
} else {
|
||||
return xinf;
|
||||
}
|
||||
}
|
||||
|
||||
if (y < eps) {
|
||||
if (y >= xninf) {
|
||||
oup = 1.0/y;
|
||||
} else {
|
||||
return xinf;
|
||||
}
|
||||
|
||||
} else if (y < 12.) {
|
||||
yi = y;
|
||||
if ( y < 1.) {
|
||||
z = y;
|
||||
y += 1.;
|
||||
} else {
|
||||
n = ( int ) y - 1;
|
||||
y -= ( double ) n;
|
||||
z = y - 1.0;
|
||||
}
|
||||
nsum = 0.;
|
||||
dsum = 1.;
|
||||
for (i = 0; i < 8; ++i) {
|
||||
nsum = (nsum + num[i]) * z;
|
||||
dsum = dsum * z + den[i];
|
||||
}
|
||||
oup = nsum / dsum + 1.;
|
||||
|
||||
if (yi < y) {
|
||||
|
||||
oup /= yi;
|
||||
} else if (yi > y) {
|
||||
|
||||
for (i = 0; i < n; ++i) {
|
||||
oup *= y;
|
||||
y += 1.;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
if (y <= xmax) {
|
||||
y2 = y * y;
|
||||
sum = c[6];
|
||||
for (i = 0; i < 6; ++i) {
|
||||
sum = sum / y2 + c[i];
|
||||
}
|
||||
sum = sum / y - y + spi;
|
||||
sum += (y - .5) * log(y);
|
||||
oup = exp(sum);
|
||||
} else {
|
||||
return(xinf);
|
||||
}
|
||||
}
|
||||
|
||||
if (swi) {
|
||||
oup = -oup;
|
||||
}
|
||||
if (fact != 1.) {
|
||||
oup = fact / oup;
|
||||
}
|
||||
|
||||
return oup;
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
#ifndef CWTMATH_H_
|
||||
#define CWTMATH_H_
|
||||
|
||||
#include "wtmath.h"
|
||||
#include "hsfft.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
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 cwt_gamma(double x);
|
||||
|
||||
int nint(double N);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* WAVELIB_H_ */
|
@ -18,7 +18,7 @@ fft_object fft_init(int N, int sgn) {
|
||||
if (out == 1) {
|
||||
obj = (fft_object) malloc (sizeof(struct fft_set) + sizeof(fft_data)* (N-1));
|
||||
obj->lf = factors(N,obj->factors);
|
||||
longvectorN(obj->twiddle,obj->factors,obj->lf);
|
||||
longvectorN(obj->twiddle,N,obj->factors,obj->lf);
|
||||
twi_len = N;
|
||||
obj->lt = 0;
|
||||
} else {
|
||||
@ -32,7 +32,7 @@ fft_object fft_init(int N, int sgn) {
|
||||
}
|
||||
obj = (fft_object) malloc (sizeof(struct fft_set) + sizeof(fft_data)* (M-1));
|
||||
obj->lf = factors(M,obj->factors);
|
||||
longvectorN(obj->twiddle,obj->factors,obj->lf);
|
||||
longvectorN(obj->twiddle,M,obj->factors,obj->lf);
|
||||
obj->lt = 1;
|
||||
twi_len = M;
|
||||
}
|
||||
@ -1831,7 +1831,7 @@ void twiddle(fft_data *vec,int N, int radix) {
|
||||
|
||||
}
|
||||
|
||||
void longvectorN(fft_data *sig, int *array, int tx) {
|
||||
void longvectorN(fft_data *sig,int N, int *array, int tx) {
|
||||
int L,i,Ls,ct,j,k;
|
||||
fft_type theta;
|
||||
L = 1;
|
||||
|
20
src/hsfft.h
20
src/hsfft.h
@ -12,8 +12,6 @@
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "../header/wavelib.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@ -24,6 +22,11 @@ extern "C" {
|
||||
#define fft_type double
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct fft_t {
|
||||
fft_type re;
|
||||
fft_type im;
|
||||
} fft_data;
|
||||
/*
|
||||
#define SADD(a,b) ((a)+(b))
|
||||
|
||||
@ -32,8 +35,19 @@ extern "C" {
|
||||
#define SMUL(a,b) ((a)*(b))
|
||||
*/
|
||||
|
||||
typedef struct fft_set* fft_object;
|
||||
|
||||
fft_object fft_init(int N, int sgn);
|
||||
|
||||
struct fft_set{
|
||||
int N;
|
||||
int sgn;
|
||||
int factors[64];
|
||||
int lf;
|
||||
int lt;
|
||||
fft_data twiddle[1];
|
||||
};
|
||||
|
||||
void fft_exec(fft_object obj,fft_data *inp,fft_data *oup);
|
||||
|
||||
int divideby(int M,int d);
|
||||
@ -46,7 +60,7 @@ int factors(int M, int* arr);
|
||||
|
||||
void twiddle(fft_data *sig,int N, int radix);
|
||||
|
||||
void longvectorN(fft_data *sig, int *array, int M);
|
||||
void longvectorN(fft_data *sig,int N, int *array, int M);
|
||||
|
||||
void free_fft(fft_object object);
|
||||
|
||||
|
@ -9,9 +9,11 @@
|
||||
|
||||
fft_real_object fft_real_init(int N, int sgn) {
|
||||
fft_real_object obj = NULL;
|
||||
fft_type theta;
|
||||
fft_type PI, theta;
|
||||
int k;
|
||||
|
||||
PI = 3.1415926535897932384626433832795;
|
||||
|
||||
obj = (fft_real_object) malloc (sizeof(struct fft_real_set) + sizeof(fft_data)* (N/2));
|
||||
|
||||
obj->cobj = fft_init(N/2,sgn);
|
||||
@ -77,9 +79,10 @@ void fft_c2r_exec(fft_real_object obj,fft_data *inp,fft_type *oup) {
|
||||
|
||||
fft_data* cinp;
|
||||
fft_data* coup;
|
||||
int i,N2;
|
||||
int i,N2,N;
|
||||
fft_type temp1,temp2;
|
||||
N2 = obj->cobj->N;
|
||||
N = N2*2;
|
||||
|
||||
cinp = (fft_data*) malloc (sizeof(fft_data) * N2);
|
||||
coup = (fft_data*) malloc (sizeof(fft_data) * N2);
|
||||
@ -103,7 +106,6 @@ void fft_c2r_exec(fft_real_object obj,fft_data *inp,fft_type *oup) {
|
||||
}
|
||||
|
||||
void free_real_fft(fft_real_object object) {
|
||||
free_fft(object->cobj);
|
||||
free(object);
|
||||
}
|
||||
|
||||
|
@ -14,8 +14,15 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct fft_real_set* fft_real_object;
|
||||
|
||||
fft_real_object fft_real_init(int N, int sgn);
|
||||
|
||||
struct fft_real_set{
|
||||
fft_object cobj;
|
||||
fft_data twiddle2[1];
|
||||
};
|
||||
|
||||
void fft_r2c_exec(fft_real_object obj,fft_type *inp,fft_data *oup);
|
||||
|
||||
void fft_c2r_exec(fft_real_object obj,fft_data *inp,fft_type *oup);
|
||||
|
7131
src/wavefilt.c
7131
src/wavefilt.c
File diff suppressed because it is too large
Load Diff
@ -1,28 +1,19 @@
|
||||
/*
|
||||
Copyright (c) 2014, Rafat Hussain
|
||||
Copyright (c) 2016, Holger Nahrstaedt
|
||||
*/
|
||||
#ifndef WAVEFILT_H_
|
||||
#define WAVEFILT_H_
|
||||
|
||||
#include <stdio.h>
|
||||
#include "conv.h"
|
||||
#define _USE_MATH_DEFINES
|
||||
#include "math.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
int filtlength(const char* name);
|
||||
int filtlength(char* name);
|
||||
|
||||
int filtcoef(char* name, double *lp1, double *hp1, double *lp2, double *hp2);
|
||||
|
||||
int filtcoef(const char* name, double *lp1, double *hp1, double *lp2, double *hp2);
|
||||
|
||||
void copy_reverse(const double *in, int N, double *out);
|
||||
void qmf_even(const double *in, int N, double *out);
|
||||
void qmf_wrev(const double *in, int N, double *out);
|
||||
void copy(const double *in, int N, double *out);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
210
src/wavefunc.c
210
src/wavefunc.c
@ -1,210 +0,0 @@
|
||||
#include "wavefunc.h"
|
||||
|
||||
void meyer(int N,double lb,double ub,double *phi,double *psi,double *tgrid) {
|
||||
int M,i;
|
||||
double *w;
|
||||
double delta,j;
|
||||
double theta,x,x2,x3,x4,v,cs,sn;
|
||||
double wf;
|
||||
fft_data *phiw,*psiw,*oup;
|
||||
fft_object obj;
|
||||
|
||||
M = divideby(N, 2);
|
||||
|
||||
if (M == 0) {
|
||||
printf("Size of Wavelet must be a power of 2");
|
||||
exit(1);
|
||||
}
|
||||
if (lb >= ub) {
|
||||
printf("upper bound must be greater than lower bound");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
obj = fft_init(N,-1);
|
||||
w = (double*)malloc(sizeof(double)*N);
|
||||
phiw = (fft_data*) malloc (sizeof(fft_data) * N);
|
||||
psiw = (fft_data*) malloc (sizeof(fft_data) * N);
|
||||
oup = (fft_data*) malloc (sizeof(fft_data) * N);
|
||||
|
||||
delta = 2 * (ub-lb) / PI2;
|
||||
|
||||
j = (double) N;
|
||||
j *= -1.0;
|
||||
|
||||
for(i = 0; i < N;++i) {
|
||||
w[i] = j / delta;
|
||||
j += 2.0;
|
||||
psiw[i].re = psiw[i].im = 0.0;
|
||||
phiw[i].re = phiw[i].im = 0.0;
|
||||
}
|
||||
|
||||
|
||||
for(i = 0; i < N;++i) {
|
||||
wf = fabs(w[i]);
|
||||
if (wf <= PI2/3.0) {
|
||||
phiw[i].re = 1.0;
|
||||
}
|
||||
if (wf > PI2/3.0 && wf <= 2 * PI2 / 3.0) {
|
||||
x = (3 * wf / PI2) - 1.0;
|
||||
x2 = x*x;
|
||||
x3 = x2 * x;
|
||||
x4 = x3 *x;
|
||||
v = x4 *(35 - 84*x + 70*x2 - 20*x3);
|
||||
theta = v * PI2 / 4.0;
|
||||
cs = cos(theta);
|
||||
sn = sin(theta);
|
||||
|
||||
phiw[i].re = cs;
|
||||
psiw[i].re = cos(w[i]/2.0) * sn;
|
||||
psiw[i].im = sin(w[i]/2.0) * sn;
|
||||
}
|
||||
if (wf > 2.0 * PI2/3.0 && wf <= 4 * PI2 / 3.0) {
|
||||
x = (1.5 * wf / PI2) - 1.0;
|
||||
x2 = x*x;
|
||||
x3 = x2 * x;
|
||||
x4 = x3 *x;
|
||||
v = x4 *(35 - 84*x + 70*x2 - 20*x3);
|
||||
theta = v * PI2 / 4.0;
|
||||
cs = cos(theta);
|
||||
|
||||
psiw[i].re = cos(w[i]/2.0) * cs;
|
||||
psiw[i].im = sin(w[i]/2.0) * cs;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
nsfft_exec(obj,phiw,oup,lb,ub,tgrid);
|
||||
|
||||
|
||||
for(i = 0; i < N;++i) {
|
||||
phi[i] = oup[i].re/N;
|
||||
}
|
||||
|
||||
nsfft_exec(obj,psiw,oup,lb,ub,tgrid);
|
||||
|
||||
|
||||
for(i = 0; i < N;++i) {
|
||||
psi[i] = oup[i].re/N;
|
||||
}
|
||||
|
||||
|
||||
|
||||
free(oup);
|
||||
free(phiw);
|
||||
free(psiw);
|
||||
free(w);
|
||||
}
|
||||
|
||||
void gauss(int N,int p,double lb,double ub,double *psi,double *t) {
|
||||
double delta,num,den,t2,t4;
|
||||
int i;
|
||||
|
||||
if (lb >= ub) {
|
||||
printf("upper bound must be greater than lower bound");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
t[0] = lb;
|
||||
t[N-1] = ub;
|
||||
delta = (ub - lb) / (N-1);
|
||||
for(i = 1; i < N-1;++i) {
|
||||
t[i] = lb + delta * i;
|
||||
}
|
||||
|
||||
den = sqrt(cwt_gamma(p+0.5));
|
||||
|
||||
if ((p+1)%2 == 0) {
|
||||
num = 1.0;
|
||||
} else {
|
||||
num = -1.0;
|
||||
}
|
||||
|
||||
num /= den;
|
||||
|
||||
//printf("\n%g\n",num);
|
||||
|
||||
if (p == 1) {
|
||||
for(i = 0; i < N;++i) {
|
||||
psi[i] = -t[i] * exp(- t[i] * t[i]/2.0) * num;
|
||||
}
|
||||
} else if (p == 2) {
|
||||
for(i = 0; i < N;++i) {
|
||||
t2 = t[i] * t[i];
|
||||
psi[i] = (-1.0 + t2) * exp(- t2/2.0) * num;
|
||||
}
|
||||
} else if (p == 3) {
|
||||
for(i = 0; i < N;++i) {
|
||||
t2 = t[i] * t[i];
|
||||
psi[i] = t[i] * (3.0 - t2) * exp(- t2/2.0) * num;
|
||||
}
|
||||
} else if (p == 4) {
|
||||
for(i = 0; i < N;++i) {
|
||||
t2 = t[i] * t[i];
|
||||
psi[i] = (t2 * t2 - 6.0 * t2 + 3.0) * exp(- t2/2.0) * num;
|
||||
}
|
||||
} else if (p == 5) {
|
||||
for(i = 0; i < N;++i) {
|
||||
t2 = t[i] * t[i];
|
||||
psi[i] = t[i] * (-t2 * t2 + 10.0 * t2 - 15.0) * exp(- t2/2.0) * num;
|
||||
}
|
||||
} else if (p == 6) {
|
||||
for(i = 0; i < N;++i) {
|
||||
t2 = t[i] * t[i];
|
||||
psi[i] = (t2 * t2 * t2 - 15.0 * t2 * t2 + 45.0 * t2 - 15.0) * exp(- t2/2.0) * num;
|
||||
}
|
||||
} else if (p == 7) {
|
||||
for(i = 0; i < N;++i) {
|
||||
t2 = t[i] * t[i];
|
||||
psi[i] = t[i] * (-t2 * t2 * t2 + 21.0 * t2 * t2 - 105.0 * t2 + 105.0) * exp(- t2/2.0) * num;
|
||||
}
|
||||
} else if (p == 8) {
|
||||
for(i = 0; i < N;++i) {
|
||||
t2 = t[i] * t[i];
|
||||
t4 = t2 * t2;
|
||||
psi[i] = (t4 * t4 - 28.0 * t4 * t2 + 210.0 * t4 - 420.0 * t2 + 105.0) * exp(- t2/2.0) * num;
|
||||
}
|
||||
} else if (p == 9) {
|
||||
for(i = 0; i < N;++i) {
|
||||
t2 = t[i] * t[i];
|
||||
t4 = t2 * t2;
|
||||
psi[i] = t[i] * (- t4 * t4 + 36.0 * t4 * t2 - 378.0 * t4 + 1260.0 * t2 - 945.0) * exp(- t2/2.0) * num;
|
||||
}
|
||||
} else if (p == 10) {
|
||||
for(i = 0; i < N;++i) {
|
||||
t2 = t[i] * t[i];
|
||||
t4 = t2 * t2;
|
||||
psi[i] = (t4 * t4 * t2 - 45.0 * t4 * t4 + 630.0 * t4 * t2 - 3150.0 * t4 + 4725.0 * t2 - 945.0) * exp(- t2/2.0) * num;
|
||||
}
|
||||
} else {
|
||||
printf("\n The Gaussian Derivative Wavelet is only available for Derivatives 1 to 10");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
void mexhat(int N,double lb,double ub,double *psi,double *t) {
|
||||
gauss(N,2,lb,ub,psi,t);
|
||||
}
|
||||
|
||||
void morlet(int N,double lb,double ub,double *psi,double *t) {
|
||||
int i;
|
||||
double delta;
|
||||
|
||||
if (lb >= ub) {
|
||||
printf("upper bound must be greater than lower bound");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
t[0] = lb;
|
||||
t[N-1] = ub;
|
||||
delta = (ub - lb) / (N-1);
|
||||
for(i = 1; i < N-1;++i) {
|
||||
t[i] = lb + delta * i;
|
||||
}
|
||||
|
||||
for(i = 0; i < N;++i) {
|
||||
psi[i] = exp(- t[i] * t[i] / 2.0) * cos(5 * t[i]);
|
||||
}
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
#ifndef WAVEFUNC_H_
|
||||
#define WAVEFUNC_H_
|
||||
|
||||
#include "cwtmath.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void meyer(int N,double lb,double ub,double *phi,double *psi,double *tgrid);
|
||||
|
||||
void gauss(int N,int p,double lb,double ub,double *psi,double *t);
|
||||
|
||||
void mexhat(int N,double lb,double ub,double *psi,double *t);
|
||||
|
||||
void morlet(int N,double lb,double ub,double *psi,double *t);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* WAVEFUNC_H_ */
|
3306
src/wavelib.c
3306
src/wavelib.c
File diff suppressed because it is too large
Load Diff
85
src/wavelib.h
Normal file
85
src/wavelib.h
Normal file
@ -0,0 +1,85 @@
|
||||
#ifndef WAVELIB_H_
|
||||
#define WAVELIB_H_
|
||||
|
||||
#include "wtmath.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct wave_set* wave_object;
|
||||
|
||||
wave_object wave_init(char* wname);
|
||||
|
||||
struct wave_set{
|
||||
char wname[50];
|
||||
int filtlength;// When all filters are of the same length. [Matlab uses zero-padding to make all filters of the same length]
|
||||
int lpd_len;// Default filtlength = lpd_len = lpr_len = hpd_len = hpr_len
|
||||
int hpd_len;
|
||||
int lpr_len;
|
||||
int hpr_len;
|
||||
double *lpd;
|
||||
double *hpd;
|
||||
double *lpr;
|
||||
double *hpr;
|
||||
double params[0];
|
||||
};
|
||||
|
||||
typedef struct wt_set* wt_object;
|
||||
|
||||
wt_object wt_init(wave_object wave,char* method, int siglength, int J);
|
||||
|
||||
struct wt_set{
|
||||
wave_object wave;
|
||||
conv_object cobj;
|
||||
char method[10];
|
||||
int siglength;// Length of the original signal.
|
||||
int outlength;// Length of the output DWT vector
|
||||
int lenlength;// Length of the Output Dimension Vector "length"
|
||||
int J; // Number of decomposition Levels
|
||||
int MaxIter;// Maximum Iterations J <= MaxIter
|
||||
int even;// even = 1 if signal is of even length. even = 0 otherwise
|
||||
char ext[10];// Type of Extension used - "per" or "sym"
|
||||
char cmethod[10]; // Convolution Method - "direct" or "FFT"
|
||||
|
||||
int N; //
|
||||
int cfftset;
|
||||
int zpad;
|
||||
int length[102];
|
||||
double *output;
|
||||
double params[0];
|
||||
};
|
||||
|
||||
void dwt(wt_object wt, double *inp);
|
||||
|
||||
void idwt(wt_object wt, double *dwtop);
|
||||
|
||||
void swt(wt_object wt, double *inp);
|
||||
|
||||
void iswt(wt_object wt, double *swtop);
|
||||
|
||||
void modwt(wt_object wt, double *inp);
|
||||
|
||||
void imodwt(wt_object wt, double *dwtop);
|
||||
|
||||
void setDWTExtension(wt_object wt, char *extension);
|
||||
|
||||
void setWTConv(wt_object wt, char *cmethod);
|
||||
|
||||
void wave_summary(wave_object obj);
|
||||
|
||||
void wt_summary(wt_object wt);
|
||||
|
||||
void wave_free(wave_object object);
|
||||
|
||||
void wt_free(wt_object object);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* WAVELIB_H_ */
|
||||
|
||||
|
441
src/wtmath.c
441
src/wtmath.c
@ -1,355 +1,5 @@
|
||||
/*
|
||||
Copyright (c) 2018, Rafat Hussain
|
||||
*/
|
||||
#include "wtmath.h"
|
||||
|
||||
void dwt_per_stride(double *inp, int N, double *lpd,double*hpd,int lpd_len,double *cA, int len_cA, double *cD, int istride, int ostride) {
|
||||
int l, l2, isodd, i, t, len_avg,is,os;
|
||||
|
||||
len_avg = lpd_len;
|
||||
l2 = len_avg / 2;
|
||||
isodd = N % 2;
|
||||
|
||||
for (i = 0; i < len_cA; ++i) {
|
||||
t = 2 * i + l2;
|
||||
os = i *ostride;
|
||||
cA[os] = 0.0;
|
||||
cD[os] = 0.0;
|
||||
for (l = 0; l < len_avg; ++l) {
|
||||
if ((t - l) >= l2 && (t - l) < N) {
|
||||
is = (t - l) * istride;
|
||||
cA[os] += lpd[l] * inp[is];
|
||||
cD[os] += hpd[l] * inp[is];
|
||||
}
|
||||
else if ((t - l) < l2 && (t - l) >= 0) {
|
||||
is = (t - l) * istride;
|
||||
cA[os] += lpd[l] * inp[is];
|
||||
cD[os] += hpd[l] * inp[is];
|
||||
}
|
||||
else if ((t - l) < 0 && isodd == 0) {
|
||||
is = (t - l + N) * istride;
|
||||
cA[os] += lpd[l] * inp[is];
|
||||
cD[os] += hpd[l] * inp[is];
|
||||
}
|
||||
else if ((t - l) < 0 && isodd == 1) {
|
||||
if ((t - l) != -1) {
|
||||
is = (t - l + N + 1) * istride;
|
||||
cA[os] += lpd[l] * inp[is];
|
||||
cD[os] += hpd[l] * inp[is];
|
||||
}
|
||||
else {
|
||||
is = (N - 1) * istride;
|
||||
cA[os] += lpd[l] * inp[is];
|
||||
cD[os] += hpd[l] * inp[is];
|
||||
}
|
||||
}
|
||||
else if ((t - l) >= N && isodd == 0) {
|
||||
is = (t - l - N) * istride;
|
||||
cA[os] += lpd[l] * inp[is];
|
||||
cD[os] += hpd[l] * inp[is];
|
||||
}
|
||||
else if ((t - l) >= N && isodd == 1) {
|
||||
is = (t - l - (N + 1)) * istride;
|
||||
if (t - l != N) {
|
||||
cA[os] += lpd[l] * inp[is];
|
||||
cD[os] += hpd[l] * inp[is];
|
||||
}
|
||||
else {
|
||||
is = (N - 1) * istride;
|
||||
cA[os] += lpd[l] * inp[is];
|
||||
cD[os] += hpd[l] * inp[is];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void dwt_sym_stride(double *inp, int N, double *lpd, double*hpd, int lpd_len, double *cA, int len_cA, double *cD, int istride, int ostride) {
|
||||
int i, l, t, len_avg;
|
||||
int is, os;
|
||||
len_avg = lpd_len;
|
||||
|
||||
for (i = 0; i < len_cA; ++i) {
|
||||
t = 2 * i + 1;
|
||||
os = i *ostride;
|
||||
cA[os] = 0.0;
|
||||
cD[os] = 0.0;
|
||||
for (l = 0; l < len_avg; ++l) {
|
||||
if ((t - l) >= 0 && (t - l) < N) {
|
||||
is = (t - l) * istride;
|
||||
cA[os] += lpd[l] * inp[is];
|
||||
cD[os] += hpd[l] * inp[is];
|
||||
}
|
||||
else if ((t - l) < 0) {
|
||||
is = (-t + l - 1) * istride;
|
||||
cA[os] += lpd[l] * inp[is];
|
||||
cD[os] += hpd[l] * inp[is];
|
||||
}
|
||||
else if ((t - l) >= N) {
|
||||
is = (2 * N - t + l - 1) * istride;
|
||||
cA[os] += lpd[l] * inp[is];
|
||||
cD[os] += hpd[l] * inp[is];
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
void modwt_per_stride(int M, double *inp, int N, double *filt, int lpd_len, double *cA, int len_cA, double *cD, int istride, int ostride) {
|
||||
int l, i, t, len_avg;
|
||||
int is, os;
|
||||
len_avg = lpd_len;
|
||||
|
||||
|
||||
for (i = 0; i < len_cA; ++i) {
|
||||
t = i;
|
||||
os = i *ostride;
|
||||
is = t *istride;
|
||||
cA[os] = filt[0] * inp[is];
|
||||
cD[os] = filt[len_avg] * inp[is];
|
||||
for (l = 1; l < len_avg; l++) {
|
||||
t -= M;
|
||||
while (t >= len_cA) {
|
||||
t -= len_cA;
|
||||
}
|
||||
while (t < 0) {
|
||||
t += len_cA;
|
||||
}
|
||||
os = i * ostride;
|
||||
is = t * istride;
|
||||
cA[os] += filt[l] * inp[is];
|
||||
cD[os] += filt[len_avg + l] * inp[is];
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void swt_per_stride(int M, double *inp, int N, double *lpd, double*hpd, int lpd_len, double *cA, int len_cA, double *cD, int istride, int ostride) {
|
||||
int l, l2, isodd, i, t, len_avg, j;
|
||||
int is, os;
|
||||
len_avg = M * lpd_len;
|
||||
l2 = len_avg / 2;
|
||||
isodd = N % 2;
|
||||
|
||||
for (i = 0; i < len_cA; ++i) {
|
||||
t = i + l2;
|
||||
os = i *ostride;
|
||||
cA[os] = 0.0;
|
||||
cD[os] = 0.0;
|
||||
l = -1;
|
||||
for (j = 0; j < len_avg; j += M) {
|
||||
l++;
|
||||
while (j >= len_cA) {
|
||||
j -= len_cA;
|
||||
}
|
||||
if ((t - j) >= l2 && (t - j) < N) {
|
||||
is = (t - j)*istride;
|
||||
cA[os] += lpd[l] * inp[is];
|
||||
cD[os] += hpd[l] * inp[is];
|
||||
}
|
||||
else if ((t - j) < l2 && (t - j) >= 0) {
|
||||
is = (t - j)*istride;
|
||||
cA[os] += lpd[l] * inp[is];
|
||||
cD[os] += hpd[l] * inp[is];
|
||||
}
|
||||
else if ((t - j) < 0) {
|
||||
is = (t - j + N)*istride;
|
||||
cA[os] += lpd[l] * inp[is];
|
||||
cD[os] += hpd[l] * inp[is];
|
||||
}
|
||||
else if ((t - j) >= N && isodd == 0) {
|
||||
is = (t - j - N)*istride;
|
||||
cA[os] += lpd[l] * inp[is];
|
||||
cD[os] += hpd[l] * inp[is];
|
||||
}
|
||||
else if ((t - j) >= N && isodd == 1) {
|
||||
if (t - l != N) {
|
||||
is = (t - j - (N + 1))*istride;
|
||||
cA[os] += lpd[l] * inp[is];
|
||||
cD[os] += hpd[l] * inp[is];
|
||||
}
|
||||
else {
|
||||
is = (N - 1)*istride;
|
||||
cA[os] += lpd[l] * inp[is];
|
||||
cD[os] += hpd[l] * inp[N - 1];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void idwt_per_stride(double *cA, int len_cA, double *cD, double *lpr, double *hpr, int lpr_len, double *X, int istride, int ostride) {
|
||||
int len_avg, i, l, m, n, t, l2;
|
||||
int is, ms, ns;
|
||||
|
||||
len_avg = lpr_len;
|
||||
l2 = len_avg / 2;
|
||||
m = -2;
|
||||
n = -1;
|
||||
|
||||
for (i = 0; i < len_cA + l2 - 1; ++i) {
|
||||
m += 2;
|
||||
n += 2;
|
||||
ms = m * ostride;
|
||||
ns = n * ostride;
|
||||
X[ms] = 0.0;
|
||||
X[ns] = 0.0;
|
||||
for (l = 0; l < l2; ++l) {
|
||||
t = 2 * l;
|
||||
if ((i - l) >= 0 && (i - l) < len_cA) {
|
||||
is = (i - l) * istride;
|
||||
X[ms] += lpr[t] * cA[is] + hpr[t] * cD[is];
|
||||
X[ns] += lpr[t + 1] * cA[is] + hpr[t + 1] * cD[is];
|
||||
}
|
||||
else if ((i - l) >= len_cA && (i - l) < len_cA + len_avg - 1) {
|
||||
is = (i - l - len_cA) * istride;
|
||||
X[ms] += lpr[t] * cA[is] + hpr[t] * cD[is];
|
||||
X[ns] += lpr[t + 1] * cA[is] + hpr[t + 1] * cD[is];
|
||||
}
|
||||
else if ((i - l) < 0 && (i - l) > -l2) {
|
||||
is = (len_cA + i - l) * istride;
|
||||
X[ms] += lpr[t] * cA[is] + hpr[t] * cD[is];
|
||||
X[ns] += lpr[t + 1] * cA[is] + hpr[t + 1] * cD[is];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void idwt_sym_stride(double *cA, int len_cA, double *cD, double *lpr, double *hpr, int lpr_len, double *X, int istride, int ostride) {
|
||||
int len_avg, i, l, m, n, t, v;
|
||||
int ms, ns, is;
|
||||
len_avg = lpr_len;
|
||||
m = -2;
|
||||
n = -1;
|
||||
|
||||
for (v = 0; v < len_cA; ++v) {
|
||||
i = v;
|
||||
m += 2;
|
||||
n += 2;
|
||||
ms = m * ostride;
|
||||
ns = n * ostride;
|
||||
X[ms] = 0.0;
|
||||
X[ns] = 0.0;
|
||||
for (l = 0; l < len_avg / 2; ++l) {
|
||||
t = 2 * l;
|
||||
if ((i - l) >= 0 && (i - l) < len_cA) {
|
||||
is = (i - l) * istride;
|
||||
X[ms] += lpr[t] * cA[is] + hpr[t] * cD[is];
|
||||
X[ns] += lpr[t + 1] * cA[is] + hpr[t + 1] * cD[is];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void imodwt_per_stride(int M, double *cA, int len_cA, double *cD, double *filt,int lf,double *X,int istride, int ostride) {
|
||||
int len_avg, i, l, t;
|
||||
int is, os;
|
||||
|
||||
len_avg = lf;
|
||||
|
||||
for (i = 0; i < len_cA; ++i) {
|
||||
t = i;
|
||||
os = i * ostride;
|
||||
is = t *istride;
|
||||
X[os] = (filt[0] * cA[is]) + (filt[len_avg] * cD[is]);
|
||||
for (l = 1; l < len_avg; l++) {
|
||||
t += M;
|
||||
while (t >= len_cA) {
|
||||
t -= len_cA;
|
||||
}
|
||||
while (t < 0) {
|
||||
t += len_cA;
|
||||
}
|
||||
is = t *istride;
|
||||
X[os] += (filt[l] * cA[is]) + (filt[len_avg + l] * cD[is]);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void idwt2_shift(int shift, int rows, int cols, double *lpr, double *hpr, int lf, double *A,double *H, double *V,double *D, double *oup) {
|
||||
int i, k, N, ir, ic, J, dim1, dim2;
|
||||
int istride, ostride;
|
||||
double *cL, *cH, *X_lp;
|
||||
|
||||
|
||||
N = rows > cols ? 2 * rows : 2 * cols;
|
||||
|
||||
J = 1;
|
||||
dim1 = 2 * rows;
|
||||
dim2 = 2 * cols;
|
||||
|
||||
X_lp = (double*)malloc(sizeof(double)* (N + 2 * lf - 1));
|
||||
cL = (double*)calloc(dim1*dim2, sizeof(double));
|
||||
cH = (double*)calloc(dim1*dim2, sizeof(double));
|
||||
|
||||
ir = rows;
|
||||
ic = cols;
|
||||
istride = ic;
|
||||
ostride = 1;
|
||||
for (i = 0; i < ic; ++i) {
|
||||
idwt_per_stride(A+i, ir, H+i, lpr, hpr, lf, X_lp, istride, ostride);
|
||||
|
||||
for (k = lf / 2 - 1; k < 2 * ir + lf / 2 - 1; ++k) {
|
||||
cL[(k - lf / 2 + 1)*ic + i] = X_lp[k];
|
||||
}
|
||||
|
||||
idwt_per_stride(V+i, ir, D+i, lpr, hpr, lf, X_lp, istride, ostride);
|
||||
|
||||
for (k = lf / 2 - 1; k < 2 * ir + lf / 2 - 1; ++k) {
|
||||
cH[(k - lf / 2 + 1)*ic + i] = X_lp[k];
|
||||
}
|
||||
}
|
||||
ir *= 2;
|
||||
istride = 1;
|
||||
ostride = 1;
|
||||
|
||||
for (i = 0; i < ir; ++i) {
|
||||
idwt_per_stride(cL + i*ic, ic, cH + i*ic, lpr, hpr, lf, X_lp, istride, ostride);
|
||||
|
||||
for (k = lf / 2 - 1; k < 2 * ic + lf / 2 - 1; ++k) {
|
||||
oup[(k - lf / 2 + 1) + i*ic * 2] = X_lp[k];
|
||||
}
|
||||
}
|
||||
ic *= 2;
|
||||
|
||||
|
||||
if (shift == -1) {
|
||||
//Save the last column
|
||||
for (i = 0; i < ir; ++i) {
|
||||
cL[i] = oup[(i + 1)*ic - 1];
|
||||
}
|
||||
// Save the last row
|
||||
memcpy(cH, oup + (ir - 1)*ic, sizeof(double)*ic);
|
||||
for (i = ir - 1; i > 0; --i) {
|
||||
memcpy(oup + i*ic + 1, oup + (i - 1)*ic, sizeof(double)*(ic - 1));
|
||||
}
|
||||
oup[0] = cL[ir - 1];
|
||||
for (i = 1; i < ir; ++i) {
|
||||
oup[i*ic] = cL[i - 1];
|
||||
}
|
||||
|
||||
for (i = 1; i < ic; ++i) {
|
||||
oup[i] = cH[i - 1];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
free(X_lp);
|
||||
free(cL);
|
||||
free(cH);
|
||||
|
||||
}
|
||||
|
||||
int upsamp(double *x, int lenx, int M, double *y) {
|
||||
int N, i, j, k;
|
||||
|
||||
@ -587,94 +237,3 @@ int wmaxiter(int sig_len, int filt_len) {
|
||||
|
||||
return lev;
|
||||
}
|
||||
|
||||
static double entropy_s(double *x,int N) {
|
||||
int i;
|
||||
double val,x2;
|
||||
|
||||
val = 0.0;
|
||||
|
||||
for(i = 0; i < N; ++i) {
|
||||
if (x[i] != 0) {
|
||||
x2 = x[i] * x[i];
|
||||
val -= x2 * log(x2);
|
||||
}
|
||||
}
|
||||
return val;
|
||||
}
|
||||
|
||||
static double entropy_t(double *x,int N, double t) {
|
||||
int i;
|
||||
double val,x2;
|
||||
if (t < 0) {
|
||||
printf("Threshold value must be >= 0");
|
||||
exit(1);
|
||||
}
|
||||
val = 0.0;
|
||||
|
||||
for(i = 0; i < N; ++i) {
|
||||
x2 = fabs(x[i]);
|
||||
if (x2 > t) {
|
||||
val += 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return val;
|
||||
|
||||
}
|
||||
|
||||
static double entropy_n(double *x,int N,double p) {
|
||||
int i;
|
||||
double val,x2;
|
||||
if (p < 1) {
|
||||
printf("Norm power value must be >= 1");
|
||||
exit(1);
|
||||
}
|
||||
val = 0.0;
|
||||
for(i = 0; i < N; ++i) {
|
||||
x2 = fabs(x[i]);
|
||||
val += pow(x2,(double)p);
|
||||
|
||||
}
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
static double entropy_l(double *x,int N) {
|
||||
int i;
|
||||
double val,x2;
|
||||
|
||||
val = 0.0;
|
||||
|
||||
for(i = 0; i < N; ++i) {
|
||||
if (x[i] != 0) {
|
||||
x2 = x[i] * x[i];
|
||||
val += log(x2);
|
||||
}
|
||||
}
|
||||
return val;
|
||||
}
|
||||
|
||||
double costfunc(double *x, int N ,char *entropy,double p) {
|
||||
double val;
|
||||
|
||||
if (!strcmp(entropy, "shannon")) {
|
||||
val = entropy_s(x, N);
|
||||
}
|
||||
else if (!strcmp(entropy, "threshold")) {
|
||||
val = entropy_t(x, N,p);
|
||||
}
|
||||
else if (!strcmp(entropy, "norm")) {
|
||||
val = entropy_n(x, N,p);
|
||||
}
|
||||
else if (!strcmp(entropy, "logenergy") || !strcmp(entropy, "log energy") || !strcmp(entropy, "energy")) {
|
||||
val = entropy_l(x, N);
|
||||
}
|
||||
else {
|
||||
printf("Entropy must be one of shannon, threshold, norm or energy");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
return val;
|
||||
}
|
||||
|
29
src/wtmath.h
29
src/wtmath.h
@ -1,6 +1,3 @@
|
||||
/*
|
||||
Copyright (c) 2014, Rafat Hussain
|
||||
*/
|
||||
#ifndef WTMATH_H_
|
||||
#define WTMATH_H_
|
||||
|
||||
@ -10,30 +7,6 @@ Copyright (c) 2014, Rafat Hussain
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void dwt_per_stride(double *inp, int N, double *lpd,double*hpd,int lpd_len,
|
||||
double *cA, int len_cA, double *cD, int istride, int ostride);
|
||||
|
||||
void dwt_sym_stride(double *inp, int N, double *lpd, double*hpd, int lpd_len,
|
||||
double *cA, int len_cA, double *cD, int istride, int ostride);
|
||||
|
||||
void modwt_per_stride(int M, double *inp, int N, double *filt, int lpd_len,
|
||||
double *cA, int len_cA, double *cD, int istride, int ostride);
|
||||
|
||||
void swt_per_stride(int M, double *inp, int N, double *lpd, double*hpd, int lpd_len,
|
||||
double *cA, int len_cA, double *cD, int istride, int ostride);
|
||||
|
||||
void idwt_per_stride(double *cA, int len_cA, double *cD, double *lpr, double *hpr,
|
||||
int lpr_len, double *X, int istride, int ostride);
|
||||
|
||||
void idwt_sym_stride(double *cA, int len_cA, double *cD, double *lpr, double *hpr,
|
||||
int lpr_len, double *X, int istride, int ostride);
|
||||
|
||||
void imodwt_per_stride(int M, double *cA, int len_cA, double *cD, double *filt,
|
||||
int lf,double *X,int istride, int ostride);
|
||||
|
||||
void idwt2_shift(int shift, int rows, int cols, double *lpr, double *hpr, int lf,
|
||||
double *A,double *H, double *V,double *D, double *oup);
|
||||
|
||||
int upsamp(double *x, int lenx, int M, double *y);
|
||||
|
||||
int upsamp2(double *x, int lenx, int M, double *y);
|
||||
@ -50,8 +23,6 @@ int testSWTlength(int N, int J);
|
||||
|
||||
int wmaxiter(int sig_len, int filt_len);
|
||||
|
||||
double costfunc(double *x, int N, char *entropy, double p);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
117
stylesheets/free.css
Normal file
117
stylesheets/free.css
Normal file
@ -0,0 +1,117 @@
|
||||
/*!
|
||||
* Start Bootstrap - Modern Business HTML Template (http://startbootstrap.com)
|
||||
* Code licensed under the Apache License v2.0.
|
||||
* For details, see http://www.apache.org/licenses/LICENSE-2.0.
|
||||
*/
|
||||
|
||||
/* Global Styles */
|
||||
|
||||
/*
|
||||
This website uses a modified bootstrap template provided by
|
||||
http://startbootstrap.com under Apache License v2.0
|
||||
See Above
|
||||
*/
|
||||
|
||||
html,
|
||||
body {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
padding-top: 50px; /* Required padding for .navbar-fixed-top. Remove if using .navbar-static-top. Change if height of navigation changes. */
|
||||
}
|
||||
|
||||
.navbar-inverse .navbar-brand {
|
||||
color: #c0dff5;
|
||||
}
|
||||
|
||||
.nav.navbar-nav.navbar-right li a {
|
||||
color: #c0dff5;
|
||||
}
|
||||
|
||||
/* 404 Page Styles */
|
||||
|
||||
.error-404 {
|
||||
font-size: 100px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Footer Styles */
|
||||
|
||||
footer {
|
||||
margin: 50px 0;
|
||||
}
|
||||
/*
|
||||
.panel-default > .panel-heading {
|
||||
background-color: #c0dff5;
|
||||
border-color: #c0dff5;
|
||||
}
|
||||
|
||||
.panel-body > .btn.btn-primary {
|
||||
background-color: #c0dff5;
|
||||
border-color: #c0dff5;
|
||||
color: #000;
|
||||
}
|
||||
*/
|
||||
/**/
|
||||
|
||||
#tabletext {
|
||||
font-family: Lucida Console,Verdana;
|
||||
font-size: large;
|
||||
}
|
||||
|
||||
/* Responsive Styles */
|
||||
|
||||
@media(max-width:991px) {
|
||||
.customer-img,
|
||||
.img-related {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
@media(max-width:767px) {
|
||||
.img-portfolio {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
header.carousel .carousel {
|
||||
height: 70%;
|
||||
}
|
||||
}
|
||||
|
||||
/*Following code is taken from http://www.abeautifulsite.net/whipping-file-inputs-into-shape-with-bootstrap-3/*/
|
||||
|
||||
.btn-file {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
.btn-file input[type=file] {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
min-width: 100%;
|
||||
min-height: 100%;
|
||||
font-size: 100px;
|
||||
text-align: right;
|
||||
filter: alpha(opacity=0);
|
||||
opacity: 0;
|
||||
background: red;
|
||||
cursor: inherit;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.large-Modal .modal-dialog{
|
||||
width:640px;
|
||||
height: 480px;
|
||||
position: absolute;
|
||||
top:0; bottom: 0; left: 0; right: 0;
|
||||
margin: auto;
|
||||
overflow: scroll;
|
||||
}
|
||||
|
||||
.marketing {
|
||||
margin-bottom: 10px;
|
||||
}
|
@ -1,48 +0,0 @@
|
||||
add_executable(cwttest cwttest.c)
|
||||
|
||||
target_link_libraries(cwttest wavelib)
|
||||
|
||||
add_executable(dwttest dwttest.c)
|
||||
|
||||
target_link_libraries(dwttest wavelib)
|
||||
|
||||
add_executable(swttest swttest.c)
|
||||
|
||||
target_link_libraries(swttest wavelib)
|
||||
|
||||
add_executable(modwttest modwttest.c)
|
||||
|
||||
target_link_libraries(modwttest wavelib)
|
||||
|
||||
add_executable(dwpttest dwpttest.c)
|
||||
|
||||
target_link_libraries(dwpttest wavelib)
|
||||
|
||||
add_executable(wtreetest wtreetest.c)
|
||||
|
||||
target_link_libraries(wtreetest wavelib)
|
||||
|
||||
add_executable(denoisetest denoisetest.c)
|
||||
|
||||
target_link_libraries(denoisetest wauxlib wavelib)
|
||||
|
||||
add_executable(modwtdenoisetest modwtdenoisetest.c)
|
||||
|
||||
target_link_libraries(modwtdenoisetest wauxlib wavelib)
|
||||
|
||||
add_executable(dwt2test dwt2test.c)
|
||||
|
||||
target_link_libraries(dwt2test wavelib)
|
||||
|
||||
add_executable(swt2test swt2test.c)
|
||||
|
||||
target_link_libraries(swt2test wavelib)
|
||||
|
||||
add_executable(modwt2test modwt2test.c)
|
||||
|
||||
target_link_libraries(modwt2test wavelib)
|
||||
|
||||
set_target_properties(cwttest dwttest swttest modwttest dwpttest wtreetest denoisetest modwtdenoisetest dwt2test swt2test modwt2test
|
||||
PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/test"
|
||||
)
|
109
test/cwttest.c
109
test/cwttest.c
@ -1,109 +0,0 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include "../header/wavelib.h"
|
||||
|
||||
int main() {
|
||||
int i, N, J,subscale,a0,iter,nd,k;
|
||||
double *inp,*oup;
|
||||
double dt, dj,s0, param,mn;
|
||||
double td,tn,den, num, recon_mean, recon_var;
|
||||
cwt_object wt;
|
||||
|
||||
FILE *ifp;
|
||||
double temp[1200];
|
||||
|
||||
char *wave = "morlet";// Set Morlet wavelet. Other options "paul" and "dog"
|
||||
char *type = "pow";
|
||||
|
||||
N = 504;
|
||||
param = 6.0;
|
||||
subscale = 4;
|
||||
dt = 0.25;
|
||||
s0 = dt;
|
||||
dj = 1.0 / (double)subscale;
|
||||
J = 11 * subscale; // Total Number of scales
|
||||
a0 = 2;//power
|
||||
|
||||
ifp = fopen("sst_nino3.dat", "r");
|
||||
i = 0;
|
||||
if (!ifp) {
|
||||
printf("Cannot Open File");
|
||||
exit(100);
|
||||
}
|
||||
while (!feof(ifp)) {
|
||||
fscanf(ifp, "%lf \n", &temp[i]);
|
||||
i++;
|
||||
}
|
||||
|
||||
fclose(ifp);
|
||||
|
||||
wt = cwt_init(wave, param, N,dt, J);
|
||||
|
||||
inp = (double*)malloc(sizeof(double)* N);
|
||||
oup = (double*)malloc(sizeof(double)* N);
|
||||
|
||||
for (i = 0; i < N; ++i) {
|
||||
inp[i] = temp[i] ;
|
||||
}
|
||||
|
||||
setCWTScales(wt, s0, dj, type, a0);
|
||||
|
||||
cwt(wt, inp);
|
||||
|
||||
printf("\n MEAN %g \n", wt->smean);
|
||||
|
||||
mn = 0.0;
|
||||
|
||||
for (i = 0; i < N; ++i) {
|
||||
mn += sqrt(wt->output[i].re * wt->output[i].re + wt->output[i].im * wt->output[i].im);
|
||||
}
|
||||
|
||||
cwt_summary(wt);
|
||||
|
||||
printf("\n abs mean %g \n", mn / N);
|
||||
|
||||
printf("\n\n");
|
||||
printf("Let CWT w = w(j, n/2 - 1) where n = %d\n\n", N);
|
||||
nd = N/2 - 1;
|
||||
|
||||
printf("%-15s%-15s%-15s%-15s \n","j","Scale","Period","ABS(w)^2");
|
||||
for(k = 0; k < wt->J;++k) {
|
||||
iter = nd + k * N;
|
||||
printf("%-15d%-15lf%-15lf%-15lf \n",k,wt->scale[k],wt->period[k],
|
||||
wt->output[iter].re * wt->output[iter].re + wt->output[iter].im * wt->output[iter].im);
|
||||
}
|
||||
|
||||
icwt(wt, oup);
|
||||
|
||||
num = den = recon_var = recon_mean = 0.0;
|
||||
printf("\n\n");
|
||||
printf("Signal Reconstruction\n");
|
||||
printf("%-15s%-15s%-15s \n","i","Input(i)","Output(i)");
|
||||
|
||||
for (i = N - 10; i < N; ++i) {
|
||||
printf("%-15d%-15lf%-15lf \n", i,inp[i] , oup[i]);
|
||||
}
|
||||
|
||||
for (i = 0; i < N; ++i) {
|
||||
//printf("%g %g \n", oup[i] ,inp[i] - wt->smean);
|
||||
td = inp[i] ;
|
||||
tn = oup[i] - td;
|
||||
num += (tn * tn);
|
||||
den += (td * td);
|
||||
recon_mean += oup[i];
|
||||
}
|
||||
|
||||
recon_var = sqrt(num / N);
|
||||
recon_mean /= N;
|
||||
|
||||
printf("\nRMS Error %g \n", sqrt(num) / sqrt(den));
|
||||
printf("\nVariance %g \n", recon_var);
|
||||
printf("\nMean %g \n", recon_mean);
|
||||
|
||||
free(inp);
|
||||
free(oup);
|
||||
cwt_free(wt);
|
||||
return 0;
|
||||
}
|
@ -1,139 +0,0 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "../header/wauxlib.h"
|
||||
|
||||
static double rmse(int N,double *x,double *y) {
|
||||
double rms;
|
||||
int i;
|
||||
|
||||
rms = 0.0;
|
||||
|
||||
for(i = 0; i < N;++i) {
|
||||
rms += (x[i] - y[i]) * (x[i] - y[i]);
|
||||
}
|
||||
|
||||
rms = sqrt(rms/(double)N);
|
||||
|
||||
return rms;
|
||||
}
|
||||
|
||||
static double corrcoef(int N,double *x,double *y) {
|
||||
double cc,xm,ym,tx,ty,num,den1,den2;
|
||||
int i;
|
||||
xm = ym = 0.0;
|
||||
for(i = 0; i < N;++i) {
|
||||
xm += x[i];
|
||||
ym += y[i];
|
||||
}
|
||||
|
||||
xm = xm/N;
|
||||
ym = ym / N;
|
||||
num = den1 = den2 = 0.0;
|
||||
|
||||
for(i = 0; i < N;++i) {
|
||||
tx = x[i] - xm;
|
||||
ty = y[i] - ym;
|
||||
num += (tx*ty);
|
||||
den1 += (tx*tx);
|
||||
den2 += (ty*ty);
|
||||
}
|
||||
|
||||
cc = num / sqrt(den1*den2);
|
||||
|
||||
return cc;
|
||||
}
|
||||
|
||||
int main() {
|
||||
// gcc -Wall -I../header -L../Bin denoisetest.c -o denoise -lwauxlib -lwavelib -lm
|
||||
double *sig,*inp,*oup;
|
||||
int i,N,J;
|
||||
FILE *ifp;
|
||||
|
||||
denoise_object obj;
|
||||
double temp[2400];
|
||||
|
||||
char *wname = "db5";
|
||||
char *method = "dwt";// Available - dwt, swt and modwt. modwt works only with modwtshrink. The other two methods work with
|
||||
// visushrink and sureshrink
|
||||
char *ext = "sym";// sym and per work with dwt. swt and modwt only use per extension when called through denoise.
|
||||
// You can use sy extension if you directly call modwtshrink with cmethod set to fft. See modwtdenoisetest.c file
|
||||
char *thresh = "soft";// soft or hard
|
||||
char *level = "all"; // noise estimation at "first" or "all" levels. modwt only has the option of "all"
|
||||
|
||||
ifp = fopen("pieceregular1024.txt", "r");
|
||||
i = 0;
|
||||
if (!ifp) {
|
||||
printf("Cannot Open File");
|
||||
exit(100);
|
||||
}
|
||||
|
||||
while (!feof(ifp)) {
|
||||
fscanf(ifp, "%lf \n", &temp[i]);
|
||||
i++;
|
||||
}
|
||||
|
||||
fclose(ifp);
|
||||
|
||||
N = i;
|
||||
J = 4;
|
||||
|
||||
sig = (double*)malloc(sizeof(double)* N);
|
||||
inp = (double*)malloc(sizeof(double)* N);
|
||||
oup = (double*)malloc(sizeof(double)* N);
|
||||
|
||||
for(i = 0; i < N;++i) {
|
||||
sig[i] = temp[i];
|
||||
}
|
||||
|
||||
ifp = fopen("PieceRegular10.txt", "r");
|
||||
i = 0;
|
||||
if (!ifp) {
|
||||
printf("Cannot Open File");
|
||||
exit(100);
|
||||
}
|
||||
|
||||
while (!feof(ifp)) {
|
||||
fscanf(ifp, "%lf \n", &temp[i]);
|
||||
i++;
|
||||
}
|
||||
|
||||
fclose(ifp);
|
||||
|
||||
for(i = 0; i < N;++i) {
|
||||
inp[i] = temp[i];
|
||||
}
|
||||
obj = denoise_init(N,J,wname);
|
||||
setDenoiseMethod(obj,"visushrink");// sureshrink is also the default. The other option with dwt and swt is visushrink.
|
||||
// modwt works only with modwtshrink method
|
||||
setDenoiseWTMethod(obj,method);// Default is dwt. the other options are swt and modwt
|
||||
setDenoiseWTExtension(obj,ext);// Default is sym. the other option is per
|
||||
setDenoiseParameters(obj,thresh,level);// Default for thresh is soft. Other option is hard
|
||||
// Default for level is all. The other option is first
|
||||
|
||||
denoise(obj,inp,oup);
|
||||
|
||||
// Alternative to denoise_object
|
||||
// Just use visushrink, modwtshrink and sureshrink functions
|
||||
//visushrink(inp,N,J,wname,method,ext,thresh,level,oup);
|
||||
//sureshrink(inp,N,J,wname,method,ext,thresh,level,oup);
|
||||
// modwtshrink(sig,N,J,wname,cmethod,ext,thresh,oup); See modwtdenoisetest.c
|
||||
//ofp = fopen("denoiseds.txt", "w");
|
||||
|
||||
|
||||
printf("Signal - Noisy Signal Stats \n");
|
||||
printf("RMSE %g\n",rmse(N,sig,inp));
|
||||
printf("Corr Coeff %g\n",corrcoef(N,sig,inp));
|
||||
|
||||
printf("Signal - DeNoised Signal Stats \n");
|
||||
printf("RMSE %g\n",rmse(N,sig,oup));
|
||||
printf("Corr Coeff %g\n",corrcoef(N,sig,oup));
|
||||
|
||||
free(sig);
|
||||
free(inp);
|
||||
denoise_free(obj);
|
||||
free(oup);
|
||||
return 0;
|
||||
}
|
@ -1,61 +0,0 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include "../header/wavelib.h"
|
||||
|
||||
double absmax(double *array, int N) {
|
||||
double max;
|
||||
int i;
|
||||
|
||||
max = 0.0;
|
||||
for (i = 0; i < N; ++i) {
|
||||
if (fabs(array[i]) >= max) {
|
||||
max = fabs(array[i]);
|
||||
}
|
||||
}
|
||||
|
||||
return max;
|
||||
}
|
||||
|
||||
int main() {
|
||||
int i, J, N;
|
||||
wave_object obj;
|
||||
wpt_object wt;
|
||||
double *inp, *oup, *diff;
|
||||
|
||||
char *name = "db4";
|
||||
obj = wave_init(name);// Initialize the wavelet
|
||||
N = 788 + 23;
|
||||
inp = (double*)malloc(sizeof(double)* N);
|
||||
oup = (double*)malloc(sizeof(double)* N);
|
||||
diff = (double*)malloc(sizeof(double)* N);
|
||||
for (i = 1; i < N + 1; ++i) {
|
||||
//inp[i - 1] = -0.25*i*i*i + 25 * i *i + 10 * i;
|
||||
inp[i - 1] = i;
|
||||
}
|
||||
J = 4;
|
||||
|
||||
wt = wpt_init(obj, N, J);// Initialize the wavelet transform Tree object
|
||||
setDWPTExtension(wt, "per");// Options are "per" and "sym". Symmetric is the default option
|
||||
setDWPTEntropy(wt, "logenergy", 0);
|
||||
|
||||
dwpt(wt, inp); // Discrete Wavelet Packet Transform
|
||||
|
||||
idwpt(wt, oup); // Inverse Discrete Wavelet Packet Transform
|
||||
|
||||
for (i = 0; i < N; ++i) {
|
||||
diff[i] = (inp[i] - oup[i])/inp[i];
|
||||
}
|
||||
|
||||
wpt_summary(wt); // Tree Summary
|
||||
|
||||
printf("\n MAX %g \n", absmax(diff, wt->siglength)); // If Reconstruction succeeded then the output should be a small value.
|
||||
|
||||
free(inp);
|
||||
free(oup);
|
||||
free(diff);
|
||||
wave_free(obj);
|
||||
wpt_free(wt);
|
||||
return 0;
|
||||
}
|
@ -1,87 +0,0 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include <time.h>
|
||||
#include "../header/wavelib.h"
|
||||
|
||||
double absmax(double *array, int N) {
|
||||
double max;
|
||||
int i;
|
||||
|
||||
max = 0.0;
|
||||
for (i = 0; i < N; ++i) {
|
||||
if (fabs(array[i]) >= max) {
|
||||
max = fabs(array[i]);
|
||||
}
|
||||
}
|
||||
|
||||
return max;
|
||||
}
|
||||
|
||||
double generate_rnd() {
|
||||
double rnd;
|
||||
|
||||
rnd = (double) (rand() % 100 + 1);
|
||||
|
||||
return rnd;
|
||||
}
|
||||
|
||||
int main() {
|
||||
wave_object obj;
|
||||
wt2_object wt;
|
||||
int i, k, J, rows, cols,N;
|
||||
double *inp, *wavecoeffs,*oup,*diff;
|
||||
double *cLL;
|
||||
int ir, ic;
|
||||
double amax;
|
||||
|
||||
rows = 32;
|
||||
cols = 30;
|
||||
N = rows*cols;
|
||||
|
||||
char *name = "db2";
|
||||
obj = wave_init(name);// Initialize the wavelet
|
||||
srand(time(0));
|
||||
inp = (double*)calloc(N, sizeof(double));
|
||||
oup = (double*)calloc(N, sizeof(double));
|
||||
diff = (double*)calloc(N, sizeof(double));
|
||||
|
||||
J = 3;
|
||||
|
||||
wt = wt2_init(obj, "dwt", rows,cols, J);
|
||||
|
||||
for (i = 0; i < rows; ++i) {
|
||||
for (k = 0; k < cols; ++k) {
|
||||
//inp[i*cols + k] = i*cols + k;
|
||||
inp[i*cols + k] = generate_rnd();
|
||||
oup[i*cols + k] = 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
wavecoeffs = dwt2(wt, inp);
|
||||
|
||||
cLL = getWT2Coeffs(wt, wavecoeffs, 1, "D", &ir, &ic);
|
||||
|
||||
dispWT2Coeffs(cLL, ir, ic);
|
||||
|
||||
idwt2(wt, wavecoeffs, oup);
|
||||
|
||||
for (i = 0; i < rows*cols; ++i) {
|
||||
diff[i] = oup[i] - inp[i];
|
||||
}
|
||||
|
||||
amax = absmax(diff, rows*cols);
|
||||
|
||||
wt2_summary(wt);
|
||||
|
||||
printf("Abs Max %g \n", amax);
|
||||
|
||||
wave_free(obj);
|
||||
wt2_free(wt);
|
||||
free(inp);
|
||||
free(wavecoeffs);
|
||||
free(oup);
|
||||
free(diff);
|
||||
return 0;
|
||||
}
|
@ -42,8 +42,6 @@ int main() {
|
||||
}
|
||||
N = 256;
|
||||
|
||||
fclose(ifp);
|
||||
|
||||
inp = (double*)malloc(sizeof(double)* N);
|
||||
out = (double*)malloc(sizeof(double)* N);
|
||||
diff = (double*)malloc(sizeof(double)* N);
|
||||
|
@ -1,82 +0,0 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include <time.h>
|
||||
#include "../header/wavelib.h"
|
||||
|
||||
double absmax(double *array, int N) {
|
||||
double max;
|
||||
int i;
|
||||
|
||||
max = 0.0;
|
||||
for (i = 0; i < N; ++i) {
|
||||
if (fabs(array[i]) >= max) {
|
||||
max = fabs(array[i]);
|
||||
}
|
||||
}
|
||||
|
||||
return max;
|
||||
}
|
||||
|
||||
double generate_rnd() {
|
||||
double rnd;
|
||||
|
||||
rnd = (double) (rand() % 100 + 1);
|
||||
|
||||
return rnd;
|
||||
}
|
||||
|
||||
int main() {
|
||||
wave_object obj;
|
||||
wt2_object wt;
|
||||
int i, k, J, rows, cols,N,ir,ic;
|
||||
double *inp, *wavecoeffs, *oup,*cLL,*diff;
|
||||
double amax;
|
||||
rows = 51;
|
||||
cols = 40;
|
||||
N = rows*cols;
|
||||
char *name = "db2";
|
||||
obj = wave_init(name);// Initialize the wavelet
|
||||
|
||||
inp = (double*)calloc(N, sizeof(double));
|
||||
oup = (double*)calloc(N, sizeof(double));
|
||||
diff = (double*)calloc(N, sizeof(double));
|
||||
J = 2;
|
||||
|
||||
wt = wt2_init(obj, "modwt", rows, cols, J);
|
||||
|
||||
for (i = 0; i < rows; ++i) {
|
||||
for (k = 0; k < cols; ++k) {
|
||||
//inp[i*cols + k] = i*cols + k;
|
||||
inp[i*cols + k] = generate_rnd();
|
||||
oup[i*cols + k] = 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
wavecoeffs = modwt2(wt, inp);
|
||||
|
||||
cLL = getWT2Coeffs(wt, wavecoeffs, J, "A", &ir, &ic);
|
||||
|
||||
//dispWT2Coeffs(cLL, ir, ic);
|
||||
|
||||
imodwt2(wt, wavecoeffs, oup);
|
||||
|
||||
for (i = 0; i < N; ++i) {
|
||||
diff[i] = oup[i] - inp[i];
|
||||
}
|
||||
|
||||
amax = absmax(diff, N);
|
||||
|
||||
wt2_summary(wt);
|
||||
|
||||
printf("Abs Max %g \n", amax);
|
||||
|
||||
wave_free(obj);
|
||||
wt2_free(wt);
|
||||
free(inp);
|
||||
free(wavecoeffs);
|
||||
free(oup);
|
||||
free(diff);
|
||||
return 0;
|
||||
}
|
@ -1,123 +0,0 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "../header/wauxlib.h"
|
||||
|
||||
static double rmse(int N,double *x,double *y) {
|
||||
double rms;
|
||||
int i;
|
||||
|
||||
rms = 0.0;
|
||||
|
||||
for(i = 0; i < N;++i) {
|
||||
rms += (x[i] - y[i]) * (x[i] - y[i]);
|
||||
}
|
||||
|
||||
rms = sqrt(rms/(double)N);
|
||||
|
||||
return rms;
|
||||
}
|
||||
|
||||
static double corrcoef(int N,double *x,double *y) {
|
||||
double cc,xm,ym,tx,ty,num,den1,den2;
|
||||
int i;
|
||||
xm = ym = 0.0;
|
||||
for(i = 0; i < N;++i) {
|
||||
xm += x[i];
|
||||
ym += y[i];
|
||||
}
|
||||
|
||||
xm = xm/N;
|
||||
ym = ym / N;
|
||||
num = den1 = den2 = 0.0;
|
||||
|
||||
for(i = 0; i < N;++i) {
|
||||
tx = x[i] - xm;
|
||||
ty = y[i] - ym;
|
||||
num += (tx*ty);
|
||||
den1 += (tx*tx);
|
||||
den2 += (ty*ty);
|
||||
}
|
||||
|
||||
cc = num / sqrt(den1*den2);
|
||||
|
||||
return cc;
|
||||
}
|
||||
|
||||
int main() {
|
||||
// gcc -Wall -I../header -L../Bin modwtdenoisetest.c -o modwtdenoise -lwauxlib -lwavelib -lm
|
||||
/*
|
||||
modwtshrink can also be called from the denoise object. See denoisetest.c for more information
|
||||
*/
|
||||
double *sig,*inp,*oup;
|
||||
int i,N,J;
|
||||
FILE *ifp;
|
||||
|
||||
double temp[2400];
|
||||
|
||||
char *wname = "db5";
|
||||
char *ext = "per";// The other option sym is only available with "fft" cmethod
|
||||
char *thresh = "soft";
|
||||
char *cmethod = "direct";// The other option is "fft"
|
||||
|
||||
ifp = fopen("pieceregular1024.txt", "r");
|
||||
i = 0;
|
||||
if (!ifp) {
|
||||
printf("Cannot Open File");
|
||||
exit(100);
|
||||
}
|
||||
|
||||
while (!feof(ifp)) {
|
||||
fscanf(ifp, "%lf \n", &temp[i]);
|
||||
i++;
|
||||
}
|
||||
|
||||
fclose(ifp);
|
||||
|
||||
N = i;
|
||||
J = 4;
|
||||
|
||||
sig = (double*)malloc(sizeof(double)* N);
|
||||
inp = (double*)malloc(sizeof(double)* N);
|
||||
oup = (double*)malloc(sizeof(double)* N);
|
||||
|
||||
for(i = 0; i < N;++i) {
|
||||
sig[i] = temp[i];
|
||||
}
|
||||
|
||||
ifp = fopen("PieceRegular10.txt", "r");
|
||||
i = 0;
|
||||
if (!ifp) {
|
||||
printf("Cannot Open File");
|
||||
exit(100);
|
||||
}
|
||||
|
||||
while (!feof(ifp)) {
|
||||
fscanf(ifp, "%lf \n", &temp[i]);
|
||||
i++;
|
||||
}
|
||||
|
||||
fclose(ifp);
|
||||
|
||||
for(i = 0; i < N;++i) {
|
||||
inp[i] = temp[i];
|
||||
}
|
||||
|
||||
modwtshrink(sig,N,J,wname,cmethod,ext,thresh,oup);
|
||||
|
||||
|
||||
printf("Signal - Noisy Signal Stats \n");
|
||||
printf("RMSE %g\n",rmse(N,sig,inp));
|
||||
printf("Corr Coeff %g\n",corrcoef(N,sig,inp));
|
||||
|
||||
printf("Signal - DeNoised Signal Stats \n");
|
||||
printf("RMSE %g\n",rmse(N,sig,oup));
|
||||
printf("Corr Coeff %g\n",corrcoef(N,sig,oup));
|
||||
|
||||
free(sig);
|
||||
free(inp);
|
||||
free(oup);
|
||||
return 0;
|
||||
}
|
@ -43,8 +43,6 @@ int main() {
|
||||
}
|
||||
N = 177;
|
||||
|
||||
fclose(ifp);
|
||||
|
||||
inp = (double*)malloc(sizeof(double)* N);
|
||||
out = (double*)malloc(sizeof(double)* N);
|
||||
diff = (double*)malloc(sizeof(double)* N);
|
||||
|
79926
test/s1.txt
79926
test/s1.txt
File diff suppressed because it is too large
Load Diff
@ -1,504 +0,0 @@
|
||||
-0.15
|
||||
-0.30
|
||||
-0.14
|
||||
-0.41
|
||||
-0.46
|
||||
-0.66
|
||||
-0.50
|
||||
-0.80
|
||||
-0.95
|
||||
-0.72
|
||||
-0.31
|
||||
-0.71
|
||||
-1.04
|
||||
-0.77
|
||||
-0.86
|
||||
-0.84
|
||||
-0.41
|
||||
-0.49
|
||||
-0.48
|
||||
-0.72
|
||||
-1.21
|
||||
-0.80
|
||||
0.16
|
||||
0.46
|
||||
0.40
|
||||
1.00
|
||||
2.17
|
||||
2.50
|
||||
2.34
|
||||
0.80
|
||||
0.14
|
||||
-0.06
|
||||
-0.34
|
||||
-0.71
|
||||
-0.34
|
||||
-0.73
|
||||
-0.48
|
||||
-0.11
|
||||
0.22
|
||||
0.51
|
||||
0.51
|
||||
0.25
|
||||
-0.10
|
||||
-0.33
|
||||
-0.42
|
||||
-0.23
|
||||
-0.53
|
||||
-0.44
|
||||
-0.30
|
||||
0.15
|
||||
0.09
|
||||
0.19
|
||||
-0.06
|
||||
0.25
|
||||
0.30
|
||||
0.81
|
||||
0.26
|
||||
0.10
|
||||
0.34
|
||||
1.01
|
||||
-0.31
|
||||
-0.90
|
||||
-0.73
|
||||
-0.92
|
||||
-0.73
|
||||
-0.31
|
||||
-0.03
|
||||
0.12
|
||||
0.37
|
||||
0.82
|
||||
1.22
|
||||
1.83
|
||||
1.60
|
||||
0.34
|
||||
-0.72
|
||||
-0.87
|
||||
-0.85
|
||||
-0.40
|
||||
-0.39
|
||||
-0.65
|
||||
0.07
|
||||
0.67
|
||||
0.39
|
||||
0.03
|
||||
-0.17
|
||||
-0.76
|
||||
-0.87
|
||||
-1.36
|
||||
-1.10
|
||||
-0.99
|
||||
-0.78
|
||||
-0.93
|
||||
-0.87
|
||||
-0.44
|
||||
-0.34
|
||||
-0.50
|
||||
-0.39
|
||||
-0.04
|
||||
0.42
|
||||
0.62
|
||||
0.17
|
||||
0.23
|
||||
1.03
|
||||
1.54
|
||||
1.09
|
||||
0.01
|
||||
0.12
|
||||
-0.27
|
||||
-0.47
|
||||
-0.41
|
||||
-0.37
|
||||
-0.36
|
||||
-0.39
|
||||
0.43
|
||||
1.05
|
||||
1.58
|
||||
1.25
|
||||
0.86
|
||||
0.60
|
||||
0.21
|
||||
0.19
|
||||
-0.23
|
||||
-0.29
|
||||
0.18
|
||||
0.12
|
||||
0.71
|
||||
1.42
|
||||
1.59
|
||||
0.93
|
||||
-0.25
|
||||
-0.66
|
||||
-0.95
|
||||
-0.47
|
||||
0.06
|
||||
0.70
|
||||
0.81
|
||||
0.78
|
||||
1.43
|
||||
1.22
|
||||
1.05
|
||||
0.44
|
||||
-0.35
|
||||
-0.67
|
||||
-0.84
|
||||
-0.66
|
||||
-0.45
|
||||
-0.12
|
||||
-0.20
|
||||
-0.16
|
||||
-0.47
|
||||
-0.52
|
||||
-0.79
|
||||
-0.80
|
||||
-0.62
|
||||
-0.86
|
||||
-1.29
|
||||
-1.04
|
||||
-1.05
|
||||
-0.75
|
||||
-0.81
|
||||
-0.90
|
||||
-0.25
|
||||
0.62
|
||||
1.22
|
||||
0.96
|
||||
0.21
|
||||
-0.11
|
||||
-0.25
|
||||
-0.24
|
||||
-0.43
|
||||
0.23
|
||||
0.67
|
||||
0.78
|
||||
0.41
|
||||
0.98
|
||||
1.28
|
||||
1.45
|
||||
1.02
|
||||
0.03
|
||||
-0.59
|
||||
-1.34
|
||||
-0.99
|
||||
-1.49
|
||||
-1.74
|
||||
-1.33
|
||||
-0.55
|
||||
-0.51
|
||||
-0.36
|
||||
-0.99
|
||||
0.32
|
||||
1.04
|
||||
1.41
|
||||
0.99
|
||||
0.66
|
||||
0.50
|
||||
0.22
|
||||
0.71
|
||||
-0.16
|
||||
0.38
|
||||
0.00
|
||||
-1.11
|
||||
-1.04
|
||||
0.05
|
||||
-0.64
|
||||
-0.34
|
||||
-0.50
|
||||
-1.85
|
||||
-0.94
|
||||
-0.78
|
||||
0.29
|
||||
0.27
|
||||
0.69
|
||||
-0.06
|
||||
-0.83
|
||||
-0.80
|
||||
-1.02
|
||||
-0.96
|
||||
-0.09
|
||||
0.62
|
||||
0.87
|
||||
1.03
|
||||
0.70
|
||||
-0.10
|
||||
-0.31
|
||||
0.04
|
||||
-0.46
|
||||
0.04
|
||||
0.24
|
||||
-0.08
|
||||
-0.28
|
||||
0.06
|
||||
0.05
|
||||
-0.31
|
||||
0.11
|
||||
0.27
|
||||
0.26
|
||||
0.04
|
||||
0.12
|
||||
1.11
|
||||
1.53
|
||||
1.23
|
||||
0.17
|
||||
-0.18
|
||||
-0.56
|
||||
0.05
|
||||
0.41
|
||||
0.22
|
||||
0.04
|
||||
-0.19
|
||||
-0.46
|
||||
-0.65
|
||||
-1.06
|
||||
-0.54
|
||||
0.14
|
||||
0.25
|
||||
-0.21
|
||||
-0.73
|
||||
-0.43
|
||||
0.48
|
||||
0.26
|
||||
0.05
|
||||
0.11
|
||||
-0.27
|
||||
-0.08
|
||||
-0.10
|
||||
0.29
|
||||
-0.15
|
||||
-0.28
|
||||
-0.55
|
||||
-0.44
|
||||
-1.40
|
||||
-0.55
|
||||
-0.69
|
||||
0.58
|
||||
0.37
|
||||
0.42
|
||||
1.83
|
||||
1.23
|
||||
0.65
|
||||
0.41
|
||||
1.03
|
||||
0.64
|
||||
-0.07
|
||||
0.98
|
||||
0.36
|
||||
-0.30
|
||||
-1.33
|
||||
-1.39
|
||||
-0.94
|
||||
0.34
|
||||
-0.00
|
||||
-0.15
|
||||
0.06
|
||||
0.39
|
||||
0.36
|
||||
-0.49
|
||||
-0.53
|
||||
0.35
|
||||
0.07
|
||||
-0.24
|
||||
0.20
|
||||
-0.22
|
||||
-0.68
|
||||
-0.44
|
||||
0.02
|
||||
-0.22
|
||||
-0.30
|
||||
-0.59
|
||||
0.10
|
||||
-0.02
|
||||
-0.27
|
||||
-0.60
|
||||
-0.48
|
||||
-0.37
|
||||
-0.53
|
||||
-1.35
|
||||
-1.22
|
||||
-0.99
|
||||
-0.34
|
||||
-0.79
|
||||
-0.24
|
||||
0.02
|
||||
0.69
|
||||
0.78
|
||||
0.17
|
||||
-0.17
|
||||
-0.29
|
||||
-0.27
|
||||
0.31
|
||||
0.44
|
||||
0.38
|
||||
0.24
|
||||
-0.13
|
||||
-0.89
|
||||
-0.76
|
||||
-0.71
|
||||
-0.37
|
||||
-0.59
|
||||
-0.63
|
||||
-1.47
|
||||
-0.40
|
||||
-0.18
|
||||
-0.37
|
||||
-0.43
|
||||
-0.06
|
||||
0.61
|
||||
1.33
|
||||
1.19
|
||||
1.13
|
||||
0.31
|
||||
0.14
|
||||
0.03
|
||||
0.21
|
||||
0.15
|
||||
-0.22
|
||||
-0.02
|
||||
0.03
|
||||
-0.17
|
||||
0.12
|
||||
-0.35
|
||||
-0.06
|
||||
0.38
|
||||
-0.45
|
||||
-0.32
|
||||
-0.33
|
||||
-0.49
|
||||
-0.14
|
||||
-0.56
|
||||
-0.18
|
||||
0.46
|
||||
1.09
|
||||
1.04
|
||||
0.23
|
||||
-0.99
|
||||
-0.59
|
||||
-0.92
|
||||
-0.28
|
||||
0.52
|
||||
1.31
|
||||
1.45
|
||||
0.61
|
||||
-0.11
|
||||
-0.18
|
||||
-0.39
|
||||
-0.39
|
||||
-0.36
|
||||
-0.50
|
||||
-0.81
|
||||
-1.10
|
||||
-0.29
|
||||
0.57
|
||||
0.68
|
||||
0.78
|
||||
0.78
|
||||
0.63
|
||||
0.98
|
||||
0.49
|
||||
-0.42
|
||||
-1.34
|
||||
-1.20
|
||||
-1.18
|
||||
-0.65
|
||||
-0.42
|
||||
-0.97
|
||||
-0.28
|
||||
0.77
|
||||
1.77
|
||||
2.22
|
||||
1.05
|
||||
-0.67
|
||||
-0.99
|
||||
-1.52
|
||||
-1.17
|
||||
-0.22
|
||||
-0.04
|
||||
-0.45
|
||||
-0.46
|
||||
-0.75
|
||||
-0.70
|
||||
-1.38
|
||||
-1.15
|
||||
-0.01
|
||||
0.97
|
||||
1.10
|
||||
0.68
|
||||
-0.02
|
||||
-0.04
|
||||
0.47
|
||||
0.30
|
||||
-0.55
|
||||
-0.51
|
||||
-0.09
|
||||
-0.01
|
||||
0.34
|
||||
0.61
|
||||
0.58
|
||||
0.33
|
||||
0.38
|
||||
0.10
|
||||
0.18
|
||||
-0.30
|
||||
-0.06
|
||||
-0.28
|
||||
0.12
|
||||
0.58
|
||||
0.89
|
||||
0.93
|
||||
2.39
|
||||
2.44
|
||||
1.92
|
||||
0.64
|
||||
-0.24
|
||||
0.27
|
||||
-0.13
|
||||
-0.16
|
||||
-0.54
|
||||
-0.13
|
||||
-0.37
|
||||
-0.78
|
||||
-0.22
|
||||
0.03
|
||||
0.25
|
||||
0.31
|
||||
1.03
|
||||
1.10
|
||||
1.05
|
||||
1.11
|
||||
1.28
|
||||
0.57
|
||||
-0.55
|
||||
-1.16
|
||||
-0.99
|
||||
-0.38
|
||||
0.01
|
||||
-0.29
|
||||
0.09
|
||||
0.46
|
||||
0.57
|
||||
0.24
|
||||
0.39
|
||||
0.49
|
||||
0.86
|
||||
0.51
|
||||
0.95
|
||||
1.25
|
||||
1.33
|
||||
-0.00
|
||||
0.34
|
||||
0.66
|
||||
1.11
|
||||
0.34
|
||||
0.48
|
||||
0.56
|
||||
0.39
|
||||
-0.17
|
||||
1.04
|
||||
0.77
|
||||
0.12
|
||||
-0.35
|
||||
-0.22
|
||||
0.08
|
||||
-0.08
|
||||
-0.18
|
||||
-0.06
|
@ -1,83 +0,0 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include <time.h>
|
||||
#include "../header/wavelib.h"
|
||||
|
||||
double absmax(double *array, int N) {
|
||||
double max;
|
||||
int i;
|
||||
|
||||
max = 0.0;
|
||||
for (i = 0; i < N; ++i) {
|
||||
if (fabs(array[i]) >= max) {
|
||||
max = fabs(array[i]);
|
||||
}
|
||||
}
|
||||
|
||||
return max;
|
||||
}
|
||||
|
||||
double generate_rnd() {
|
||||
double rnd;
|
||||
|
||||
rnd = (double) (rand() % 100 + 1);
|
||||
|
||||
return rnd;
|
||||
}
|
||||
|
||||
int main() {
|
||||
wave_object obj;
|
||||
wt2_object wt;
|
||||
int i, k, J, rows, cols;
|
||||
double *inp, *wavecoeffs, *oup, *cLL,*diff;
|
||||
double amax;
|
||||
int ir, ic, N;
|
||||
rows = 64;
|
||||
cols = 48;
|
||||
|
||||
char *name = "bior3.1";
|
||||
obj = wave_init(name);// Initialize the wavelet
|
||||
N = rows*cols;
|
||||
inp = (double*)calloc(N, sizeof(double));
|
||||
oup = (double*)calloc(N, sizeof(double));
|
||||
diff = (double*)calloc(N, sizeof(double));
|
||||
J = 2;
|
||||
|
||||
wt = wt2_init(obj, "swt", rows, cols, J);
|
||||
|
||||
for (i = 0; i < rows; ++i) {
|
||||
for (k = 0; k < cols; ++k) {
|
||||
//inp[i*cols + k] = i*cols + k;
|
||||
inp[i*cols + k] = generate_rnd();
|
||||
oup[i*cols + k] = 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
wavecoeffs = swt2(wt, inp);
|
||||
|
||||
cLL = getWT2Coeffs(wt, wavecoeffs, J, "A", &ir, &ic);
|
||||
|
||||
dispWT2Coeffs(cLL, ir, ic);
|
||||
|
||||
iswt2(wt, wavecoeffs, oup);
|
||||
|
||||
for (i = 0; i < N; ++i) {
|
||||
diff[i] = oup[i] - inp[i];
|
||||
}
|
||||
|
||||
amax = absmax(diff, N);
|
||||
|
||||
wt2_summary(wt);
|
||||
|
||||
printf("Abs Max %g \n", amax);
|
||||
|
||||
wave_free(obj);
|
||||
wt2_free(wt);
|
||||
free(inp);
|
||||
free(wavecoeffs);
|
||||
free(oup);
|
||||
free(diff);
|
||||
return 0;
|
||||
}
|
@ -41,7 +41,7 @@ int main() {
|
||||
i++;
|
||||
}
|
||||
N = 256;
|
||||
fclose(ifp);
|
||||
|
||||
inp = (double*)malloc(sizeof(double)* N);
|
||||
out = (double*)malloc(sizeof(double)* N);
|
||||
diff = (double*)malloc(sizeof(double)* N);
|
||||
|
@ -1,47 +0,0 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include "../header/wavelib.h"
|
||||
|
||||
int main() {
|
||||
int i, J, N, len;
|
||||
int X, Y;
|
||||
wave_object obj;
|
||||
wtree_object wt;
|
||||
double *inp, *oup;
|
||||
|
||||
char *name = "db3";
|
||||
obj = wave_init(name);// Initialize the wavelet
|
||||
N = 147;
|
||||
inp = (double*)malloc(sizeof(double)* N);
|
||||
for (i = 1; i < N + 1; ++i) {
|
||||
inp[i - 1] = -0.25*i*i*i + 25 * i *i + 10 * i;
|
||||
}
|
||||
J = 3;
|
||||
|
||||
wt = wtree_init(obj, N, J);// Initialize the wavelet transform object
|
||||
setWTREEExtension(wt, "sym");// Options are "per" and "sym". Symmetric is the default option
|
||||
|
||||
wtree(wt, inp);
|
||||
wtree_summary(wt);
|
||||
X = 3;
|
||||
Y = 5;
|
||||
len = getWTREENodelength(wt, X);
|
||||
printf("\n %d", len);
|
||||
printf("\n");
|
||||
oup = (double*)malloc(sizeof(double)* len);
|
||||
|
||||
printf("Node [%d %d] Coefficients : \n",X,Y);
|
||||
getWTREECoeffs(wt, X, Y, oup, len);
|
||||
for (i = 0; i < len; ++i) {
|
||||
printf("%g ", oup[i]);
|
||||
}
|
||||
printf("\n");
|
||||
|
||||
free(inp);
|
||||
free(oup);
|
||||
wave_free(obj);
|
||||
wtree_free(wt);
|
||||
return 0;
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
|
||||
add_subdirectory(wavelibBoostTests)
|
||||
|
@ -1,27 +0,0 @@
|
||||
|
||||
set(SOURCE_FILES
|
||||
tst_dwt.cpp
|
||||
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
add_executable(wavelibLibTests ${SOURCE_FILES} )
|
||||
|
||||
add_test(NAME wavelibLibTests WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test COMMAND wavelibLibTests)
|
||||
|
||||
add_dependencies(wavelibLibTests wavelib)
|
||||
target_link_libraries(wavelibLibTests wavelib)
|
||||
|
||||
target_include_directories(wavelibLibTests PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../header
|
||||
)
|
||||
|
||||
|
||||
install(TARGETS wavelibLibTests
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION tests
|
||||
ARCHIVE DESTINATION tests
|
||||
)
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user