Aim: Represents a discrete signal, periodic or not. The signal can be passed by value since it is only cloned when modified.
More...
#include <DGtal/math/Signal.h>
|
| ~Signal () |
|
| Signal () |
|
| Signal (unsigned int size, int z, bool periodic, const TValue &def=TValue(0)) |
|
| Signal (const TValue *t, unsigned int size, int z, bool periodic, const TValue &def=TValue(0)) |
|
| Signal (const Signal< TValue > &other) |
|
Signal< TValue > & | operator= (const Signal< TValue > &other) |
|
void | init (unsigned int s, int z=0, bool p=false, const TValue &def=TValue(0)) |
|
void | init (const TValue *t, unsigned int size, int z=0, bool p=false, const TValue &def=TValue(0)) |
|
unsigned int | size () const |
|
TValue & | operator[] (int i) |
|
const TValue & | operator[] (int i) const |
|
void | setAll (const TValue &val=TValue(0)) |
|
void | multiply (const TValue &val) |
|
Signal< TValue > | operator* (const Signal< TValue > &G) |
|
void | selfDisplay (std::ostream &out) const |
|
bool | isValid () const |
|
template<typename TValue>
class DGtal::Signal< TValue >
Aim: Represents a discrete signal, periodic or not. The signal can be passed by value since it is only cloned when modified.
Description of template class 'Signal'
- Template Parameters
-
TValue | the type chosen for each sample (generally float or double). |
This class is a backport from ImaGene.
Definition at line 161 of file Signal.h.
◆ Value
template<typename TValue >
◆ ~Signal()
template<typename TValue >
◆ Signal() [1/4]
template<typename TValue >
◆ Signal() [2/4]
template<typename TValue >
DGtal::Signal< TValue >::Signal |
( |
unsigned int |
size, |
|
|
int |
z, |
|
|
bool |
periodic, |
|
|
const TValue & |
def = TValue(0) |
|
) |
| |
Constructor.
- Parameters
-
size | the size of the signal. |
z | the index of the zero-th element. |
periodic | 'true' if the signal is periodic. |
def | the default value. |
◆ Signal() [3/4]
template<typename TValue >
DGtal::Signal< TValue >::Signal |
( |
const TValue * |
t, |
|
|
unsigned int |
size, |
|
|
int |
z, |
|
|
bool |
periodic, |
|
|
const TValue & |
def = TValue(0) |
|
) |
| |
Constructor.
- Parameters
-
t | the array containing initial data. |
size | the size of the signal. |
z | the index of the zero-th element. |
periodic | 'true' if the signal is periodic. |
def | the default value. |
◆ Signal() [4/4]
template<typename TValue >
Copy constructor.
- Parameters
-
other | the object to clone. |
◆ D2n()
template<typename TValue >
- Returns
- the differential operator with binomial weights of order 2n.
◆ Delta()
template<typename TValue >
- Returns
- the right difference signal.
◆ G2()
template<typename TValue >
- Returns
- the gaussian signal of order 2 (binomial signal of order 2 / 4).
TValue must be able to represent real values.
◆ G2n()
template<typename TValue >
- Returns
- the gaussian signal of order 2n (binomial signal of order 2n / 2^n).
◆ H2()
template<typename TValue >
- Returns
- the binomial signal of order 2.
◆ H2n()
template<typename TValue >
- Returns
- the binomial signal of order 2n.
◆ init() [1/2]
template<typename TValue >
void DGtal::Signal< TValue >::init |
( |
const TValue * |
t, |
|
|
unsigned int |
size, |
|
|
int |
z = 0 , |
|
|
bool |
p = false , |
|
|
const TValue & |
def = TValue(0) |
|
) |
| |
Initializer.
- Parameters
-
t | the array containing initial data. |
size | the size of the signal. |
z | the index of the zero-th element. |
p | 'true' if the signal is periodic. |
def | the default value. |
◆ init() [2/2]
template<typename TValue >
void DGtal::Signal< TValue >::init |
( |
unsigned int |
s, |
|
|
int |
z = 0 , |
|
|
bool |
p = false , |
|
|
const TValue & |
def = TValue(0) |
|
) |
| |
Initializer.
- Parameters
-
s | the number of data in the signal. |
z | the index of the zero-th element. |
p | 'true' if the signal is periodic. |
def | the default value. |
◆ isValid()
template<typename TValue >
Checks the validity/consistency of the object.
- Returns
- 'true' if the object is valid, 'false' otherwise.
◆ multiply()
template<typename TValue >
External product of a signal by a scalar value.
- Parameters
-
◆ operator*()
template<typename TValue >
Convolution product of two signals (F = this). F*G( a ) = sum F(a-i)G(i)
- Parameters
-
G | the second signal (not periodic) |
- Returns
- the signal that is the convolution of F and G, of type F. The returned signal is periodic iff Fis periodic.
◆ operator=()
template<typename TValue >
Assignment.
- Parameters
-
- Returns
- a reference on 'this'.
◆ operator[]() [1/2]
template<typename TValue >
Protected rw access to value. If index is out of bound, return 0 if not periodic or the correct value otherwise.
- Parameters
-
i | the index in the signal . |
- Returns
- the i-th value in the signal.
◆ operator[]() [2/2]
template<typename TValue >
Protected ro access to value. If index is out of bound, return 0 if not periodic or the correct value otherwise.
- Parameters
-
i | the index in the signal . |
- Returns
- the i-th value in the signal.
◆ selfDisplay()
template<typename TValue >
void DGtal::Signal< TValue >::selfDisplay |
( |
std::ostream & |
out | ) |
const |
Writes/Displays the object on an output stream.
- Parameters
-
out | the output stream where the object is written. |
◆ setAll()
template<typename TValue >
void DGtal::Signal< TValue >::setAll |
( |
const TValue & |
val = TValue(0) | ) |
|
The signal becomes a constant signal of value [val].
- Parameters
-
val | the value of the whole signal. |
◆ size()
template<typename TValue >
- Returns
- the number of elements in the signal.
◆ m_data
template<typename TValue >
the array that stores the data.
Definition at line 350 of file Signal.h.
The documentation for this class was generated from the following file: