itpp_sci  1.0.0
it++ based simulation framework for scicoslab, scilab and scipy
Public Member Functions | List of all members
SIM::circbuff Class Reference

circlular buffer
Core functions SIM::circbuff.process(), SIM::circbuff.generate()
More...

Inheritance diagram for SIM::circbuff:
Inheritance graph
[legend]

Public Member Functions

 circbuff ()
 
 ~circbuff ()
 
void set_size (int m)
 
void set_output (double yout)
 
int get_size ()
 
double get_output ()
 
vec generate (const bvec &ce)
 
vec process (const bmat &ceio, const vec &x)
 

Detailed Description

circlular buffer
Core functions SIM::circbuff.process(), SIM::circbuff.generate()

itpp::circular_buffer<double> derived class with clocked interface

Constructor & Destructor Documentation

SIM::circbuff::circbuff ( )
inline
SIM::circbuff::~circbuff ( )
inline

Member Function Documentation

vec SIM::circbuff::generate ( const bvec &  ce)

for active clock ticks [ce] fetch sample and and put back into the buffer
if (ce) {yout = get(); put(yout);

Parameters
ce- [bvec] clock_enable vector
Returns
y - [vec]
double SIM::circbuff::get_output ( void  )

get output value

Returns
- [double] y0
int SIM::circbuff::get_size ( void  )

get buffer size

Returns
- [int] buffer size
vec SIM::circbuff::process ( const bmat &  ceio,
const vec &  x 
)

for active input clock ticks ceio[i,0] put input sample x[i]
if (ceio[i,0]) { put(x[i]) }
for active output clock ticks ceio[i,1] update yout by fetching one sample
if (ceo[i]) { yout = get() }

Parameters
ceio- [bmat][cei|ceo] input/output clock_enable vector
x- [vec] - input samples
Returns
y - [vec] - output samples
void SIM::circbuff::set_output ( double  yout)

set output value y0

Parameters
[in]yout- [double] y0
void SIM::circbuff::set_size ( int  m)

set buffer size

Parameters
[in]m- buffer size

The documentation for this class was generated from the following files: