Acoustic Research Tool (ART)  v0.10
genericDelayModule Class Reference

Abstract class which provides internal methods which can be re-used by all modules requiring fractional delay filters.

This class cannot be instantiated and only provides constructor, destructor and internal functions to calculate parameters for Lagrange FIR and Thiran IIR filters.

Inheritance diagram for genericDelayModule:
ARTItimeModule ARTobject ARTcell DWGcylinderModule fractionalDelayModule DWGconeModule

Public Member Functions

 genericDelayModule (const string &name, const string &sds="", const string &lds="", const string &htm="")
 Constructor of the genericDelayModule class.
 ~genericDelayModule ()
 Destructor of the genericDelayModule class.
- Public Member Functions inherited from ARTItimeModule
 ARTItimeModule (const string &name, const string &sds="", const string &lds="", const string &htm="")
 Constructor of the ARTItimeModule class.
 ARTItimeModule (const ARTItimeModule &orig)
 Copy constructor which creates a new time module based on the given time module.
virtual ARTItimeModuleCreate (const string &name, const string &sds="", const string &lds="", const string &htm="")=0
 Factory function which creates a new interface time module object based on the current child class implementation.
virtual void addIPort (const string &name, const ARTdataProp *refPort)=0
 Adds a new input port to the current time module.
virtual ARTdataPropgetPort (const string &name)
 Returns a pointer to the port object with the given name.
virtual void setLocalParameter (const string &name, const string &expr)
 Sets the definition of the local parameter with the given name.
virtual void setLocalParameter (const string &name, const std::complex< double > &val)
 Sets the definition of the local parameter with the given name.
virtual void setLocalParameter (const string &name, const double val)
 Sets the definition of the local parameter with the given name.
virtual void addGlobalParameter (const ARTdataProp *parameter)
 Adds a global parameter to the current time module by registering it to all output ports and local parameters.
virtual void removeGlobalParameter (const string &name)
 Removes the definition of the given global parameter from all output ports and local parameters.
virtual void setSimulator (ARTsimulator *sim)
 Sets the simulator of the current time module and all its output ports.
virtual void setCurrentIndex (int idx)=0
 Sets the current time module and all output ports to the given time index.
virtual void simulateCurrentIndex (int idx)=0
 Triggers the evaluation of all output ports of the time module for the given time index.
virtual ~ARTItimeModule ()
 Destructor of the ARTItimeModule class.
- Public Member Functions inherited from ARTobject
 ARTobject (const string name, const string sds="", const string lds="", const string htm="")
 objects must have a name, the rest is optional
 ARTobject (const ARTobject &orig)
 copy constructor
virtual ARTcellclone ()
ARTpropertyGetProperties (ARTproperty *pos)
 iterate through property list (pass NULL to restart iteration, receive NULL after last element)
ARTpropertyFindProperty (const string nam)
 find and return named property (or return NULL if no match)
ARTpropertyAppendProperty (const string name, const string sds="", const string lds="", const string htm="")
 Append new property with given name to ARTobject.
ARTdataPropAppendDataProp (const string name, ARTvariant *val, const string sds="", const string lds="", const string htm="")
 append new data property with given name to ARTobject
ARTdataPropAppendDataProp (const string name, const double val, const string sds="", const string lds="", const string htm="")
ARTdataPropAppendDataProp (const string name, const float val, const string sds="", const string lds="", const string htm="")
ARTdataPropAppendDataProp (const string name, const string val, const string sds="", const string lds="", const string htm="")
ARTdataPropAppendDataProp (const string name, const int val, const string sds="", const string lds="", const string htm="")
ARTdataPropAppendDataProp (const string name, const string *val, const string sds="", const string lds="", const string htm="")
ARTdataPropAppendDataProp (ARTdataProp *dataProp)
ARTlistPropAppendListProp (const string name, const string sds="", const string lds="", const string htm="")
 append new listableProperty with given name
bool DeleteProperty (ARTproperty *prp)
 delete current property (which was recently accessed by GetProperties, FindProperty or AppendProperty)
ARTmethodGetMethods (ARTmethod *pos)
 iterate through method list (pass NULL to restart iteration, receive NULL after last element)
ARTmethodFindMethod (const string nam)
 find and return named method (or return NULL if no match)
ARTmethodAppendMethod (const string name, const string sds="", const string lds="", const string htm="")
 append new method with given name
bool DeleteMethod (ARTmethod *mtd)
 delete current method (which was recently accessed by GetProperties, FindProperty or AppendProperty)
void SetPropertyList (list< ARTproperty * > &l)
void CopyPropertyListEntries (ARTobject *obj)
 copies properties from other objects (also copying the objects of all list-entries). OVERWRITES list own list!
void CopyMethodListEntries (ARTobject *obj)
 copies methods from other objects (also copying the objects of all list-entries). OVERWRITES list own list!
list< ARTproperty * > GetPropertyList ()
list< ARTmethod * > GetMethodList ()
- Public Member Functions inherited from ARTcell
 ARTcell (const string name="", const string sds="", const string lds="", const string htm="")
 ARTcell (const ARTcell &orig)
const string & GetName () const
const string & GetShortDescription () const
const string & GetLongDescription () const
const string & GetHelpFilename () const
void SetName (const string name)

Protected Member Functions

virtual double getLagrangeParams (int n, int N, double D)
 Calculates the Lagrange filter parameters for the given input values.
virtual double getThiranParams (int n, int N, double D)
 Calculates the Thiran filter parameters for the given input values.
virtual double fac (int n)
 Returns the faculty (n!) of the given number.
virtual double binom (int n, int k)
 Returns the binomial coefficient for "n choose k".

Additional Inherited Members

- Protected Attributes inherited from ARTItimeModule
ARTtimeSimulator_simulator
 Simulator object to which the current time module belongs.

Constructor & Destructor Documentation

genericDelayModule::genericDelayModule ( const string &  name,
const string &  sds = "",
const string &  lds = "",
const string &  htm = "" 
)
inlineexplicit

Constructor of the genericDelayModule class.

Parameters
[in]nameRepresents the unique identifier of the generic delay module.
[in]sdsShort description (single line) of the generic delay module.
[in]ldsLong description of the generic delay module.
[in]htmPath to help file in HTML format.

Member Function Documentation

double genericDelayModule::binom ( int  n,
int  k 
)
protectedvirtual

Returns the binomial coefficient for "n choose k".

Parameters
[in]nFactor "n" of the binomial coefficient.
[in]kFactor "k" of the binomial coefficient.
Note
The function does not do any boundary checks, i.e., whether k <= n. This may cause useless results of the function although no exception will be thrown.
double genericDelayModule::fac ( int  n)
protectedvirtual

Returns the faculty (n!) of the given number.

Parameters
[in]nThe integer for which the faculty will be calculated.
Note
For invalid input, i.e., n < 0, the function will return 1.
double genericDelayModule::getLagrangeParams ( int  n,
int  N,
double  D 
)
protectedvirtual

Calculates the Lagrange filter parameters for the given input values.

Parameters
[in]nDefines the position of the filter parameter. 0 <= n <= N.
[in]NDefines the order of the filter.
[in]DDefines the delay in samples (not in seconds).
double genericDelayModule::getThiranParams ( int  n,
int  N,
double  D 
)
protectedvirtual

Calculates the Thiran filter parameters for the given input values.

Parameters
[in]nDefines the position of the filter parameter. 0 <= n <= N.
[in]NDefines the order of the filter.
[in]DDefines the delay in samples (not in seconds).