User Documentation
Centre for Vision, Speech & Signal Processing
DEVELOP IN NAMESPACE AMMA TREE ROOT AMMA SEARCH AMMA HOME
 

  PUBLIC
SDFunction1dC::SDFunction1dC(void)
SDFunction1dC::SDFunction1dC(const SizeT)
SDFunction1dC::SDFunction1dC(const SDFunction1dC &)
SDFunction1dC::SDFunction1dC(const RealSArray1dC &)
SDFunction1dC::SDFunction1dC(RealT *,const SizeT)
SDFunction1dC::SDFunction1dC(const char *)
SDFunction1dC::SDFunction1dC(istream &)
SDFunction1dC::Copy(void) const
SDFunction1dC::Constant(const SizeT,const RealT)
SDFunction1dC::Slope(const SizeT,const RealT,const RealT)
SDFunction1dC::Sin(const SizeT,const RealT,const RealT)
SDFunction1dC::Gauss(const SizeT,RealT)
SDFunction1dC::Binomial(const SizeT,const BooleanT)
SDFunction1dC::RandomGauss(const SizeT,const RealT,const RealT)
SDFunction1dC::RectWindow(const SizeT,const IndexT,const IndexT,const RealT)
SDFunction1dC::HammingWindow(const SizeT)
SDFunction1dC::KaiserWindow(const SizeT,const RealT)
SDFunction1dC::TotalPower(void) const
SDFunction1dC::Enlarge(const IntT) const
SDFunction1dC::Convolution(const SDFunction1dC &) const
SDFunction1dC::FConvolution(const SDFunction1dC &)
SDFunction1dC::Correlation(const SDFunction1dC &) const
SDFunction1dC::AutoCorrelation(void) const
SDFunction1dC::DFT(const BooleanT) const
RealSArray1dC::Copy(void) const
RealSArray1dC::operator*(const RealT &) const
RealSArray1dC::operator+=(const RealSArray1dC &)
RealSArray1dC::operator-=(const RealSArray1dC &)
RealSArray1dC::operator*=(const RealT &)
RealSArray1dC::operator/=(const RealT &)
RealSArray1dC::SetZero(void)
RealSArray1dC::MaxValue(void) const
RealSArray1dC::MaxIndex(void) const
RealSArray1dC::MinIndex(void) const
RealSArray1dC::MaxAbsIndex(void) const
RealSArray1dC::Sum(void) const
RealSArray1dC::StraightSort(void)
RealSArray1dC::StraightSort(const SizeT)
RealSArray1dC::Join(const RealSArray1dC &) const
SArray1dC::Copy(void) const
SArray1dC::operator=(const SArray1dC &)
SArray1dC::SArray1d(void) const
SArray1dC::SArray1d(void)
SArray1dC::Enlarge(const IntT) const
SArray1dC::Append(const SArray1dC &)
SArray1dC::Join(const SArray1dC &) const
SArray1dC::DebugAddresses(void) const
SArray1dC::RefCounter(void) const
SArray1dC::Buffer(void)
SArray1dC::Buffer(void) const
SizeBufferAccessC::operator=(DataC *)
SizeBufferAccessC::ReferenceElm(void) const
SizeBufferAccessC::ReferenceVoid(void) const
SizeBufferAccessC::Access(void) const
SizeBufferAccessC::DataStart(void) const
SizeBufferAccessC::N(void) const
SizeBufferAccessC::Size(void) const
SizeBufferAccessC::Limits(void) const
SizeBufferAccessC::Range(void) const
SizeBufferAccessC::IMin(void) const
SizeBufferAccessC::IMax(void) const
SizeBufferAccessC::operator[](const IndexT) const
SizeBufferAccessC::operator[](const IndexT)
SizeBufferAccessC::SAccess(void) const
SizeBufferAccessC::IsEmpty(void) const
SizeBufferAccessC::Contains(const IndexT) const
SizeBufferAccessC::ShrinkHigh(const SizeT)
SizeBufferAccessC::Swap(SizeBufferAccessC &)
SizeBufferAccessC::Attach(const SizeBufferAccessC &)
SizeBufferAccessC::Attach(const BufferAccessC &,const SizeT)
SizeBufferAccessC::operator+(const SizeT) const
SizeBufferAccessC::Fill(const DataC &)
SizeBufferAccessC::CopyFrom(const SizeBufferAccessC &)
SDFunction1dC
 
1 Dimensional function
 
include "amma/SDFunct1.hh"
User Level:Default
Library:Msignal
Example:exBnd.cc
Section:Signal Processing
In Scope:std

Comments:
The class SDFunction1dC represents an uniformly sampled one dimensional function. The samples can be accessed using integer index starting from 0.

Parent Classes: Methods:
SDFunction1dC()
Creates the empty function.

SDFunction1dC(const SizeT dim)
Creates a not-initialized function with the index range <0, 'dim'-1>.

SDFunction1dC(const SDFunction1dC & s)
Creates another access to the function 's'.

SDFunction1dC(const RealSArray1dC & s)
The function is attached to the array of doubles 's'.

SDFunction1dC(RealT * data,const SizeT dim)
The function is created from the memory location 'data' with the range of access in <0, dim-1>. The memory 'data' is not deallocated during destructing of the array.

SDFunction1dC(const char * fileName)
Creates a function from the file 'fileName'.

SDFunction1dC(istream & s)
A function is created from the input stream 's'.

SDFunction1dC Copy() const
Creates a copy of the function. Generators of functions. ------------------------

SDFunction1dC Constant(const SizeT size,const RealT val)
Creates the constant function with the value 'val'.

SDFunction1dC Slope(const SizeT size,const RealT startVal,const RealT endVal)
Creates the slope function starting with the value 'startVal' and ending with the value 'endVal'.

SDFunction1dC Sin(const SizeT size,const RealT period,const RealT phase = 0)
Creates the sin function generated according to the formula ::Sin(2*PI/period * (t+phase)). All parameters period, t, and phase are related to the units of the parameter 'size'.

SDFunction1dC Gauss(const SizeT size,RealT tau)
Creates an array containing Gaussian.
BUG: not implemented

SDFunction1dC Binomial(const SizeT size,const BooleanT Norm = false)
Creates an array of binomial coefficients (i.e. row "size" from Pascal's triangle).
E.g. Binomial(5) would create the array: 1,4,6,4,1.
Can be used as a finite approximation of a Gaussian. The "variance" of this Gaussian is (size-1)/4.
If Norm = true, the array is normalised so that the sum of the terms = 1.

SDFunction1dC RandomGauss(const SizeT size,const RealT var = 1.0,const RealT mean = 0.0)
Creates a random value function. The values are drawn from Gaussian distribution N(mean, var).

SDFunction1dC RectWindow(const SizeT dim,const IndexT start,const IndexT stop,const RealT v = 0.0)
Creates 1D rectangular window with the value 'v' starting at the 'start' index and ending at the 'stop' index in the function of the length 'dim'. Both limits belong to the window.

SDFunction1dC HammingWindow(const SizeT dim)
Creates 1D Hamming window (alpha=0.54) of the length 'dim'.

SDFunction1dC KaiserWindow(const SizeT dim,const RealT alpha = 7)
Creates 1D Kaiser window which is an approximation to the family of prolate spheroidal wave functions of order zero, which maximize energy in a give band of frequencies for a spedified time duration. The parameter 'alpha' governs the trade off between the main lobe width and the side lobe ripple amplitude of the spectrum. Typical values of 'alpha' are in the range <4; 9>. Special operations. -------------------

RealT TotalPower() const
Returns the total power of the signal, eg. the sum of the squares of the function values.

SDFunction1dC Enlarge(const IntT f) const
Enlarges the array by item duplications. Every item is duplicated 'factor' times. The return array is extended by adding of higher indexes.

SDFunction1dC Convolution(const SDFunction1dC & g) const
Convolves this function with the function 'g'. Both this function and function 'g' are assumed to be zero outside their representation. The implementation uses the definition formula.

SDFunction1dC & FConvolution(const SDFunction1dC & g)
Convolves this function with function 'g'. The result computed only for represented parts of the functions is stored in the original function.

SDFunction1dC Correlation(const SDFunction1dC & g) const
Correlates this function with the function 'g'. Both this function and function 'g' are assumed to be zero outside their representation. The implementation uses the definition formula. The result values indexes are shifted by 'Size()-1'.

SDFunction1dC AutoCorrelation() const
Correlates this function with itself. It is implemented as 'Correlation(*this)'.

SDFunction1dC DFT(const BooleanT forward = TRUE) const
Returns the discrete Fourier transformation. If the parameter 'forward' is set to be FALSE the inverse discrete Fourier transformation is computed. The transformation is computed directly with computation complexity N^2. SDFunction1dC & WalshTransformation(IntT order, const IntSArray1dC & lb); Performs 1D Walsh-Hadamard transformation with Hadamard (order = 1) or Walsh (order =2) ordering. The bit-reversal field of the size N() is specified by the 'lb' array.

#include "amma/ReSArr1.hh"
RealSArray1dC Copy() const
Creates a new physical copy of the real array. Special operations. -------------------

RealSArray1dC operator*(const RealT & r) const
Multiples every item of the array by the real number 'r'.

const RealSArray1dC & operator+=(const RealSArray1dC & arr)
Adds the array 'arr' to this array. The operation is performed on the overlapping part of the arrays only. The function returns this array.

const RealSArray1dC & operator-=(const RealSArray1dC & arr)
Subtracts the array 'arr' to this array. The operation is performed on the overlapping part of the arrays only. The function returns this array.

const RealSArray1dC & operator*=(const RealT & r)
Multiplies each element of this array by the real number 'r'.

const RealSArray1dC & operator/=(const RealT & r)
Divides each element of this array by the real number 'r'.

void SetZero()
Sets all items of the array to be zero.

RealT MaxValue() const
Returns the maximum value saved in the array.

IndexT MaxIndex() const
Returns the index of the maximum value.

IndexT MinIndex() const
Returns the index of the minimum value.

IndexT MaxAbsIndex() const
Returns the index of the maximum absolute value.

RealT Sum() const
Returns the sum of all elements in the array.

RealSArray1dC & StraightSort()
Sorts the array into ascending numerical order by straight insertion. It is an N^2 routine, and should only be used for small N, say < 50.

RealSArray1dC & StraightSort(const SizeT n)
Sorts the first n element of the array into ascending numerical order by straight insertion. It is an N^2 routine, and should only be used for small 'n', say < 50.

RealSArray1dC Join(const RealSArray1dC & it) const
Join this array with another.

#include "amma/SArray1d.hh"
SArray1dC<RealT> Copy() const
Creates a new physical copy of the array.

const SArray1dC<RealT> & operator=(const SArray1dC<RealT> & vv)
Assigment, as for a BIG_OBJECT. Access to the object and its parts. -----------------------------------

const SArray1dC<RealT> & SArray1d() const
Access to the whole constant array.

SArray1dC<RealT> & SArray1d()
Access to the whole array. Modifications of the representation -----------------------------------

SArray1dC<RealT> Enlarge(const IntT factor = 2) const
Enlarges the array by item duplications. Every item is duplicated 'factor' times. The return array is extended by adding of higher indexes.

SArray1dC<RealT> & Append(const SArray1dC<RealT> & a)
This array is extended by the length of the array 'a' and the contents of both arrays are copied to it. The function supports empty arrays.

SArray1dC<RealT> Join(const SArray1dC<RealT> & Oth) const
Join this Array and another into a new Array which is returned. This does not change either of its arguments. This is placed in the array first, followed by 'Oth'. Special operations ------------------

void DebugAddresses() const
Prints addresses into 'cerrAMMA'.

const BodyRefCounterC & RefCounter() const
Returns access to reference counter.

BufferRC<RealT> & Buffer()
Access base data buffer.
Experts only.

const BufferRC<RealT> & Buffer() const
Constant access base data buffer.
Experts only.

#include "amma/SBfAcc.hh"
const SizeBufferAccessC<RealT> & operator=(RealT * bp)
Changes the reference element to the element pointed by 'bp'. Access to the object --------------------

RealT * ReferenceElm(void) const
Returns the pointer to the reference element of the attached buffer. The reference element need not to be the valid element of the buffer.

void * ReferenceVoid(void) const
Returns the pointer to the reference element of the attached buffer. The reference element need not to be the valid element of the buffer. The function is intended to be used in printing.

const BufferAccessC<RealT> & Access(void) const
Returns this object.

RealT * DataStart() const
Returns the address of the first element of the buffer.

SizeT N() const
Returns the number of elements of the array.

SizeT Size() const
Returns the number of elements of the array.

const BufferSizeC & Limits() const
Returns the usable range of indeces expressed by this object.

const BufferSizeC & Range() const
Returns the usable range of indeces expressed by this object.

IndexT IMin() const
Returns the minimum index of the range of this access.

IndexT IMax() const
Returns the maximum index of the range of this access.

const RealT & operator[](const IndexT i) const
Read-only access to the ('i'+1)-th element of the buffer.

RealT & operator[](const IndexT i)
Read-write access to the ('i'+1)-th element of the buffer.

const SizeBufferAccessC<RealT> & SAccess(void) const
Returns this object. Logical functions -----------------

BooleanT IsEmpty() const
Returns TRUE if the size of the array is zero.

BooleanT Contains(const IndexT i) const
Returns TRUE if the array contains an item with the index 'i'. Modifications of the access ---------------------------

const BufferSizeC & ShrinkHigh(const SizeT k)
Changes the number of elements by subtracting the last 'k' elements.

const SizeBufferAccessC<RealT> & Swap(SizeBufferAccessC<RealT> & a)
Exchanges the contents of this buffer with buffer 'a'.

void Attach(const SizeBufferAccessC<RealT> & b)
Changes this buffer access to have the same access rights as 'b'.

void Attach(const BufferAccessC<RealT> & b,const SizeT size)
Changes this buffer access to have the access rights as 'b' limited for 'size' elements.

SizeBufferAccessC<RealT> operator+(const SizeT i) const
Creates the new access object shifted 'i' elements to the right (towards next elements). The size is descreased to fit the the original range of this access. Modifications of the buffer contents ------------------------------------

void Fill(const RealT & d)
'd' value is assigned to all elements of the buffer.

void CopyFrom(const SizeBufferAccessC<RealT> & oth)
Copy contents of another buffer into this one.
NB. Buffers MUST be the same length.


Programmer:Radek Marik, Documentation by CxxDoc: Tue Mar 20 10:48:08 2001