UtilsLite
Utilities for C++ programming
Loading...
Searching...
No Matches
Utils_TVD.hh
Go to the documentation of this file.
1
/*--------------------------------------------------------------------------*\
2
| |
3
| Copyright (C) 2022 |
4
| |
5
| , __ , __ |
6
| /|/ \ /|/ \ |
7
| | __/ _ ,_ | __/ _ ,_ |
8
| | \|/ / | | | | \|/ / | | | |
9
| |(__/|__/ |_/ \_/|/|(__/|__/ |_/ \_/|/ |
10
| /| /| |
11
| \| \| |
12
| |
13
| Enrico Bertolazzi |
14
| Dipartimento di Ingegneria Industriale |
15
| Università degli Studi di Trento |
16
| email: enrico.bertolazzi@unitn.it |
17
| |
18
\*--------------------------------------------------------------------------*/
19
20
//
21
// file: Utils_TVD.hh
22
//
23
24
#pragma once
25
26
#ifndef UTILS_TVD_dot_HH
27
#define UTILS_TVD_dot_HH
28
29
#include <iostream>
30
#include <sstream>
31
#include <string>
32
#include <algorithm>
33
#include <cmath>
34
35
#include "
Utils.hh
"
36
37
namespace
Utils
{
38
70
template
<
typename
Real>
71
class
TVD
{
72
using
Integer = int;
73
public
:
74
86
static
87
void
88
denoise
(
89
Integer N,
90
Real
const
y[],
91
Real lambda,
92
Real x[]
93
) {
94
denoise
( N, y, 1, lambda, x, 1 );
95
}
96
118
static
119
void
120
denoise
(
121
Integer N,
122
Real
const
y[],
123
Integer incy,
124
Real lambda,
125
Real x[],
126
Integer incx
127
);
128
};
129
130
#ifndef UTILS_OS_WINDOWS
131
extern
template
class
TVD<float>;
132
extern
template
class
TVD<double>;
133
#endif
134
135
}
136
137
#endif
138
139
//
140
// eof: Utils_TVD.hh
141
//
Utils.hh
Utils::TVD
Class for performing Total Variation Denoising (TVD) on 1D signals.
Definition
Utils_TVD.hh:71
Utils::TVD::denoise
static void denoise(Integer N, Real const y[], Real lambda, Real x[])
Denoises a 1D signal using total variation denoising.
Definition
Utils_TVD.hh:88
Utils
Definition
SystemUtils.cc:39
src
Utils_TVD.hh
Generated by
1.13.2