|
DGtal
0.6.devel
|
#include <Signal.h>


Public Types | |
| typedef TValue | Value |
Public Member Functions | |
| ~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 |
Static Public Member Functions | |
| static Signal< TValue > | G2 () |
| static Signal< TValue > | H2 () |
| static Signal< TValue > | Delta () |
| static Signal< TValue > | G2n (unsigned int n) |
| static Signal< TValue > | H2n (unsigned int n) |
| static Signal< TValue > | D2n (unsigned int n) |
Private Attributes | |
| CowPtr< SignalData< TValue > > | m_data |
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'
| TValue | the type chosen for each sample (generally float or double). |
This class is a backport from ImaGene.
| typedef TValue DGtal::Signal< TValue >::Value |
|
inline |
|
inline |
|
inline |
Constructor.
| 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. |
Constructor.
| asize | the size of the signal. |
| z | the index of the zero-th element. |
| periodic | 'true' if the signal is periodic. |
| def | the default value. |
Definition at line 246 of file Signal.ih.
References DGtal::Signal< TValue >::init().
|
inline |
Constructor.
| 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. |
Definition at line 264 of file Signal.ih.
References DGtal::Signal< TValue >::init().
|
inline |
|
static |
|
static |
|
static |
TValue must be able to represent real values.
Definition at line 504 of file Signal.ih.
References DGtal::Signal< TValue >::multiply().
|
static |
|
static |
|
static |
|
inline |
Initializer.
| 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. |
Initializer.
| 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. |
Definition at line 323 of file Signal.ih.
Referenced by DGtal::Signal< TValue >::Signal().
|
inline |
Initializer.
| 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. |
Constructor.
| 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. |
|
inline |
| void DGtal::Signal< TValue >::multiply | ( | const TValue & | l | ) |
External product of a signal by a scalar value.
| l | the external value. |
Definition at line 441 of file Signal.ih.
References DGtal::SignalData< TValue >::data, and DGtal::SignalData< TValue >::size.
Referenced by DGtal::Signal< TValue >::G2().
| DGtal::Signal< TValue > DGtal::Signal< TValue >::operator* | ( | const Signal< TValue > & | G | ) |
Convolution product of two signals (F = this). F*G( a ) = sum F(a-i)G(i)
| G | the second signal (not periodic) |
Convolution product of two signals (F = this). F*G( a ) = sum F(a-i)G(i)
| G | the second signal (not periodic) |
Definition at line 459 of file Signal.ih.
References DGtal::SignalData< TValue >::data, DGtal::SignalData< TValue >::defaut(), DGtal::Signal< TValue >::m_data, DGtal::SignalData< TValue >::periodic, DGtal::SignalData< TValue >::size, DGtal::Signal< TValue >::size(), and DGtal::SignalData< TValue >::zero.
|
inline |
Assignment.
| other | the object to copy. |
Assignment.
| other | the object to copy. |
Definition at line 303 of file Signal.ih.
References DGtal::Signal< TValue >::m_data.
| TValue & DGtal::Signal< TValue >::operator[] | ( | int | i | ) |
Protected rw access to value. If index is out of bound, return 0 if not periodic or the correct value otherwise.
| i | the index in the signal . |
Definition at line 376 of file Signal.ih.
References DGtal::SignalData< TValue >::data, DGtal::SignalData< TValue >::periodic, DGtal::SignalData< TValue >::size, and DGtal::SignalData< TValue >::zero.
| const TValue & DGtal::Signal< TValue >::operator[] | ( | int | i | ) | const |
Protected ro access to value. If index is out of bound, return 0 if not periodic or the correct value otherwise.
| i | the index in the signal . |
Definition at line 401 of file Signal.ih.
References DGtal::SignalData< TValue >::data, DGtal::SignalData< TValue >::periodic, DGtal::SignalData< TValue >::size, and DGtal::SignalData< TValue >::zero.
|
inline |
Writes/Displays the object on an output stream.
| out | the output stream where the object is written. |
| void DGtal::Signal< TValue >::setAll | ( | const TValue & | val = TValue( 0 ) | ) |
The signal becomes a constant signal of value [val].
| val | the value of the whole signal. |
Definition at line 424 of file Signal.ih.
References DGtal::SignalData< TValue >::data, and DGtal::SignalData< TValue >::size.
| unsigned int DGtal::Signal< TValue >::size | ( | ) | const |
Definition at line 356 of file Signal.ih.
References DGtal::Signal< TValue >::size().
Referenced by DGtal::Signal< TValue >::operator*(), and DGtal::Signal< TValue >::size().
|
private |
the array that stores the data.
Definition at line 352 of file Signal.h.
Referenced by DGtal::Signal< TValue >::operator*(), and DGtal::Signal< TValue >::operator=().
1.8.1.1