31 #if defined(Signal_RECURSES)
32 #error Recursive header files inclusion detected in Signal.h
33 #else // defined(Signal_RECURSES)
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,
86 const Value & def =
Value( 0 ) );
97 void init(
const Value* t,
unsigned int size,
int z = 0,
bool p =
false,
98 const Value & def =
Value( 0 ) );
108 SignalData(
unsigned int s,
int z = 0,
bool p =
false,
109 const Value & def =
Value( 0 ) );
119 SignalData(
const Value* t,
unsigned int size,
int z = 0,
bool p =
false,
120 const Value & def =
Value( 0 ) );
144 const Value&
defaut()
const;
161 template <
typename TValue>
222 Signal(
unsigned int size,
int z,
bool periodic,
223 const TValue & def = TValue( 0 ) );
233 Signal(
const TValue* t,
unsigned int size,
int z,
bool periodic,
234 const TValue & def = TValue( 0 ) );
258 void init(
unsigned int s,
int z = 0,
bool p =
false,
259 const TValue & def = TValue( 0 ) );
270 void init(
const TValue* t,
unsigned int size,
int z = 0,
bool p =
false,
271 const TValue & def = TValue( 0 ) );
277 unsigned int size()
const;
307 void setAll(
const TValue & val = TValue( 0 ) );
316 void multiply(
const TValue & val );
366 template <
typename TValue>
368 operator<< ( std::ostream & out, const Signal<TValue> & object );
375 #include "DGtal/math/Signal.ih"
380 #endif // !defined Signal_h
382 #undef Signal_RECURSES
383 #endif // else defined(Signal_RECURSES)
static Signal< TValue > Delta()
static Signal< TValue > G2()
static Signal< TValue > G2n(unsigned int n)
void setAll(const TValue &val=TValue(0))
const Value & defaut() const
Signal< TValue > operator*(const Signal< TValue > &G)
CowPtr< SignalData< TValue > > m_data
static Signal< TValue > H2()
void multiply(const TValue &val)
unsigned int size
the size of the array data.
void init(unsigned int s, int z=0, bool p=false, const TValue &def=TValue(0))
static Signal< TValue > H2n(unsigned int n)
Value * data
a dyn. array on Value s.
Aim: Represents a discrete signal, periodic or not. The signal can be passed by value since it is onl...
Signal< TValue > & operator=(const Signal< TValue > &other)
int zero
the true index of the zero abscissa.
DGtal is the top-level namespace which contains all DGtal functions and types.
void selfDisplay(std::ostream &out) const
static Signal< TValue > D2n(unsigned int n)
unsigned int size() const
void init(unsigned int s, int z=0, bool p=false, const Value &def=Value(0))
TValue & operator[](int i)
SignalData & operator=(const SignalData &other)
Aim: Copy on write shared pointer.