31 #if defined(Signal_RECURSES)
32 #error Recursive header files inclusion detected in Signal.h
35 #define Signal_RECURSES
44 #include "DGtal/base/Common.h"
45 #include "DGtal/base/CowPtr.h"
57 template <
typename TValue>
85 void init(
unsigned int s,
int z = 0,
bool p =
false,
97 void init(
const Value* t,
unsigned int size,
int z = 0,
bool p =
false,
160 template <
typename TValue>
221 Signal(
unsigned int size,
int z,
bool periodic,
222 const TValue & def = TValue( 0 ) );
232 Signal(
const TValue* t,
unsigned int size,
int z,
bool periodic,
233 const TValue & def = TValue( 0 ) );
257 void init(
unsigned int s,
int z = 0,
bool p =
false,
258 const TValue & def = TValue( 0 ) );
269 void init(
const TValue* t,
unsigned int size,
int z = 0,
bool p =
false,
270 const TValue & def = TValue( 0 ) );
306 void setAll(
const TValue & val = TValue( 0 ) );
365 template <
typename TValue>
374 #include "DGtal/math/Signal.ih"
381 #undef Signal_RECURSES
Aim: Copy on write shared pointer.
Aim: Represents a discrete signal, periodic or not. The signal can be passed by value since it is onl...
static Signal< TValue > H2()
void init(const TValue *t, unsigned int size, int z=0, bool p=false, const TValue &def=TValue(0))
static Signal< TValue > H2n(unsigned int n)
Signal< TValue > operator*(const Signal< TValue > &G)
static Signal< TValue > D2n(unsigned int n)
void init(unsigned int s, int z=0, bool p=false, const TValue &def=TValue(0))
unsigned int size() const
void setAll(const TValue &val=TValue(0))
CowPtr< SignalData< TValue > > m_data
Signal(unsigned int size, int z, bool periodic, const TValue &def=TValue(0))
const TValue & operator[](int i) const
TValue & operator[](int i)
static Signal< TValue > G2()
void selfDisplay(std::ostream &out) const
static Signal< TValue > G2n(unsigned int n)
static Signal< TValue > Delta()
Signal< TValue > & operator=(const Signal< TValue > &other)
Signal(const Signal< TValue > &other)
Signal(const TValue *t, unsigned int size, int z, bool periodic, const TValue &def=TValue(0))
void multiply(const TValue &val)
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ATu0v1< TKSpace, TLinearAlgebra > &object)
unsigned int size
the size of the array data.
void init(unsigned int s, int z=0, bool p=false, const Value &def=Value(0))
SignalData(const SignalData &other)
const Value & defaut() const
Value * data
a dyn. array on Value s.
SignalData(const Value *t, unsigned int size, int z=0, bool p=false, const Value &def=Value(0))
SignalData(unsigned int s, int z=0, bool p=false, const Value &def=Value(0))
int zero
the true index of the zero abscissa.
SignalData & operator=(const SignalData &other)
void init(const Value *t, unsigned int size, int z=0, bool p=false, const Value &def=Value(0))