Main Page Modules Class Hierarchy Compound List File List Compound Members

# cADByStddev Class Reference

`#include <cdetect.h>`

Inheritance diagram for cADByStddev::

List of all members.

## Public Methods

Constructors, destructor, assignment.
| cADByStddev (const cADByStddev &r)
| cADByStddev (const char *name=NULL, double acc=0.01, int reps=3, PostADFunc f=NULL, void *p=NULL)
virtual | ~cADByStddev ()
cADByStddev& | operator= (const cADByStddev &res)
Redefined cObject member functions.
virtual cObject* | dup () const
Redefined cAccuracyDetection 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 (PostADFunc f, void *p)
void | setParameters (double acc=0.1, int reps=3)

## Detailed Description

An algorithm for result accuracy detection. The actual algorithm: divide the standard deviation by the square of the number of values and check if this is small enough.

## Constructor & Destructor Documentation

cADByStddev::cADByStddev ( | const cADByStddev & r )

| Copy constructor.

cADByStddev::cADByStddev ( | const char * name = NULL,
| double acc = 0.01,
| int reps = 3,
| PostADFunc f = NULL,
| void * p = NULL )`[explicit]`

| Constructor.

cADByStddev::~cADByStddev ( | )`[inline, virtual]`

| Destructor.

## Member Function Documentation

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

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

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

| Returns true if required accuracy has been reached. Reimplemented from cAccuracyDetection.

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

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

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

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

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

| Resets detection algorithm. Reimplemented from cAccuracyDetection.

void cADByStddev::setParameters ( | double acc = 0.1,
| int reps = 3 )`[inline]`

| Sets the parameters of the detection algorithm.

void cADByStddev::setPostDetectFunction ( | PostADFunc f,
| void * p )`[inline]`

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

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

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

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

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

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

- cdetect.h