aureservoir::SimBase< T > Class Template Reference

#include <simulate.h>

Inheritance diagram for aureservoir::SimBase< T >:

Inheritance graph
[legend]
Collaboration diagram for aureservoir::SimBase< T >:

Collaboration graph
[legend]

Detailed Description

template<typename T>
class aureservoir::SimBase< T >

This class is an abstract base class for all different kinds of simulation algorithms. The idea behind this system is that the algorithms can be exchanged at runtime (strategy pattern).
Note:
I did quite some research and benchmarks, if a strategy design pattern should be used here (due to the virtual function overhead). In the end the virtual function call really did not matter, because there is quite much computation inside these methods.
Simply derive from this class if you want to add a new algorithm.

Public Member Functions

virtual ~SimBase ()
virtual SimBase< T > * clone (ESN< T > *esn) const =0
virtual void simulate (const typename ESN< T >::DEMatrix &in, typename ESN< T >::DEMatrix &out)=0
class SimBase Implementation
 SimBase (ESN< T > *esn)
virtual void reallocate ()
additional interface for filter neurons and delay&sum readout
virtual void setBPCutoffConst (T f1, T f2) throw (AUExcept)
virtual void setBPCutoff (const typename ESN< T >::DEVector &f1, const typename ESN< T >::DEVector &f2) throw (AUExcept)
virtual void setIIRCoeff (const typename DEMatrix< T >::Type &B, const typename DEMatrix< T >::Type &A, int series=1) throw (AUExcept)
virtual void initDelayLine (int index, const typename DEVector< T >::Type &initbuf) throw (AUExcept)
virtual DEMatrix< T >
::Type 
getDelays () throw (AUExcept)
virtual DEVector< T >
::Type & 
getDelayBuffer (int output, int nr) throw (AUExcept)

Data Fields

ESN< T >::DEMatrix last_out_
ESN< T >::DEVector t_

Protected Attributes

ESN< T > * esn_

Constructor & Destructor Documentation

template<typename T>
aureservoir::SimBase< T >::SimBase ( ESN< T > *  esn  )  [inline]

Constructor.

template<typename T>
virtual aureservoir::SimBase< T >::~SimBase (  )  [inline, virtual]

Destructor.


Member Function Documentation

template<typename T>
virtual SimBase<T>* aureservoir::SimBase< T >::clone ( ESN< T > *  esn  )  const [pure virtual]

Clones the simulation algorithm with all its internal data (virtual constructor idiom)

Implemented in aureservoir::SimStd< T >, aureservoir::SimLI< T >, aureservoir::SimBP< T >, aureservoir::SimFilter< T >, aureservoir::SimFilter2< T >, aureservoir::SimFilterDS< T >, and aureservoir::SimSquare< T >.

template<typename T>
virtual void aureservoir::SimBase< T >::simulate ( const typename ESN< T >::DEMatrix in,
typename ESN< T >::DEMatrix out 
) [pure virtual]

simulation algorithm

Parameters:
in matrix of input values (inputs x timesteps)
out matrix for output values (outputs x timesteps)

Implemented in aureservoir::SimStd< T >, aureservoir::SimLI< T >, aureservoir::SimBP< T >, aureservoir::SimFilter< T >, aureservoir::SimFilter2< T >, aureservoir::SimFilterDS< T >, and aureservoir::SimSquare< T >.

template<typename T>
void aureservoir::SimBase< T >::reallocate (  )  [inline, virtual]

reallocates data buffers

Reimplemented in aureservoir::SimFilterDS< T >, and aureservoir::SimSquare< T >.

template<typename T>
void aureservoir::SimBase< T >::setBPCutoffConst ( f1,
f2 
) throw (AUExcept) [inline, virtual]

Reimplemented in aureservoir::SimBP< T >.

template<typename T>
void aureservoir::SimBase< T >::setBPCutoff ( const typename ESN< T >::DEVector f1,
const typename ESN< T >::DEVector f2 
) throw (AUExcept) [inline, virtual]

Reimplemented in aureservoir::SimBP< T >.

template<typename T>
void aureservoir::SimBase< T >::setIIRCoeff ( const typename DEMatrix< T >::Type &  B,
const typename DEMatrix< T >::Type &  A,
int  series = 1 
) throw (AUExcept) [inline, virtual]

Reimplemented in aureservoir::SimFilter< T >.

template<typename T>
void aureservoir::SimBase< T >::initDelayLine ( int  index,
const typename DEVector< T >::Type &  initbuf 
) throw (AUExcept) [inline, virtual]

Reimplemented in aureservoir::SimFilterDS< T >.

template<typename T>
DEMatrix< T >::Type aureservoir::SimBase< T >::getDelays (  )  throw (AUExcept) [inline, virtual]

Reimplemented in aureservoir::SimFilterDS< T >.

template<typename T>
DEVector< T >::Type & aureservoir::SimBase< T >::getDelayBuffer ( int  output,
int  nr 
) throw (AUExcept) [inline, virtual]

Reimplemented in aureservoir::SimFilterDS< T >.


Field Documentation

template<typename T>
ESN<T>::DEMatrix aureservoir::SimBase< T >::last_out_

output from last simulation

template<typename T>
ESN<T>::DEVector aureservoir::SimBase< T >::t_

temporary object needed for algorithm calculation

template<typename T>
ESN<T>* aureservoir::SimBase< T >::esn_ [protected]

reference to the data of the network


The documentation for this class was generated from the following files:
Generated on Wed Mar 12 21:16:10 2008 for aureservoir by  doxygen 1.5.3