Main Page Modules Class Hierarchy Compound List File List Compound Members

# cTDExpandingWindows Class Reference

`#include <cdetect.h>`

Inheritance diagram for cTDExpandingWindows::

List of all members.

## Public Methods

Constructors, destructor, assignment.
| cTDExpandingWindows (const cTDExpandingWindows &r)
| cTDExpandingWindows (const char *name=NULL, int reps=3, int minw=4, double wind=1.3, double acc=0.3, PostTDFunc f=NULL, void *p=NULL)
virtual | ~cTDExpandingWindows ()
cTDExpandingWindows& | operator= (const cTDExpandingWindows &res)
Redefined cObject member functions.
virtual cObject* | dup () const
Redefined cTransientDetection member functions.
virtual void | collect (double val)
virtual bool | detected () const
virtual void | reset ()
virtual void | stop ()
virtual void | start ()
Setting up the detection object.
void | setPostDetectFunction (PostTDFunc f, void *p)
void | setParameters (int reps=3, int minw=4, double wind=1.3, double acc=0.3)

## Detailed Description

A transient detection algorithm. Uses sliding window approach with two windows, and checks the difference of the two averages to see if the transient period is over.

## Constructor & Destructor Documentation

cTDExpandingWindows::cTDExpandingWindows ( | const cTDExpandingWindows & r )

| Copy constructor.

cTDExpandingWindows::cTDExpandingWindows ( | const char * name = NULL,
| int reps = 3,
| int minw = 4,
| double wind = 1.3,
| double acc = 0.3,
| PostTDFunc f = NULL,
| void * p = NULL )`[explicit]`

| Constructor.

cTDExpandingWindows::~cTDExpandingWindows ( | )`[virtual]`

| Destructor.

## Member Function Documentation

void cTDExpandingWindows::collect ( | double val )`[virtual]`

| Updates the detection algorithm with a value. Reimplemented from cTransientDetection.

bool cTDExpandingWindows::detected ( | ) const`[inline, virtual]`

| Returns true if end of transient has been detected. Reimplemented from cTransientDetection.

cObject * cTDExpandingWindows::dup ( | ) const`[inline, virtual]`

| Dupping is not implemented for this class. This function gives an error (throws cException) when called. Reimplemented from cObject.

cTDExpandingWindows & cTDExpandingWindows::operator= ( | const cTDExpandingWindows & res )

| Assignment operator. The name member doesn't get copied; see cObject's operator=() for more details.

void cTDExpandingWindows::reset ( | )`[virtual]`

| Resets detection algorithm. Reimplemented from cTransientDetection.

void cTDExpandingWindows::setParameters ( | int reps = 3,
| int minw = 4,
| double wind = 1.3,
| double acc = 0.3 )

| Sets the parameters of the detection algorithm.

void cTDExpandingWindows::setPostDetectFunction ( | PostTDFunc f,
| void * p )`[inline]`

| Adds a function that will be called when accuracy has reached the configured limit.

void cTDExpandingWindows::start ( | )`[inline, virtual]`

| Start detection; further calls to collect() will update the detection algorithm. Reimplemented from cTransientDetection.

void cTDExpandingWindows::stop ( | )`[inline, virtual]`

| Stop detection; further calls to collect() will be ignored. Reimplemented from cTransientDetection.

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

- cdetect.h