# cAccuracyDetection Class Reference
[Statistical data collection]

`#include <cdetect.h>`

Inheritance diagram for cAccuracyDetection:

List of all members.

## Detailed Description

Virtual base class for result accuracy detection classes.

## Public Member Functions

Constructors, destructor, assignment.
| cAccuracyDetection (const cAccuracyDetection &r)
| cAccuracyDetection (const char *name=NULL)
virtual | ~cAccuracyDetection ()
cAccuracyDetection & | operator= (const cAccuracyDetection &)
New methods.
virtual void | collect (double val)=0
virtual bool | detected () const =0
virtual void | reset ()=0
virtual void | stop ()=0
virtual void | start ()=0
void | setPostDetectFunction (PostADFunc f, void *p)
Host object.
virtual void | setHostObject (cStatistic *ptr)
virtual cStatistic * | hostObject () const

## Constructor & Destructor Documentation

cAccuracyDetection::cAccuracyDetection | ( | const cAccuracyDetection & | r | ) | `[inline]`

| Copy constructor.

cAccuracyDetection::cAccuracyDetection | ( | const char * | name = `NULL` | ) | `[inline, explicit]`

| Constructor.

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

| Destructor.

## Member Function Documentation

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

| Should be redefined to update the detection algorithm with a value. Implemented in cADByStddev.

virtual bool cAccuracyDetection::detected | ( |  | ) | const`[pure virtual]`

| Should be redefined to return true if required accuracy has been reached. Implemented in cADByStddev.

virtual cStatistic* cAccuracyDetection::hostObject | ( |  | ) | const`[inline, virtual]`

| Returns a pointer to the host object.

cAccuracyDetection& cAccuracyDetection::operator= | ( | const cAccuracyDetection & |  | ) | `[inline]`

| Assignment is not supported by this class: this method throws a cRuntimeError when called.

virtual void cAccuracyDetection::reset | ( |  | ) | `[pure virtual]`

| Should be redefined to reset detection algorithm. Implemented in cADByStddev.

virtual void cAccuracyDetection::setHostObject | ( | cStatistic * | ptr | ) | `[inline, virtual]`

| Sets the host object. This is internally called by cStatistic's addTransientDetection() method.

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

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

virtual void cAccuracyDetection::start | ( |  | ) | `[pure virtual]`

| Should be redefined to start detection (further calls to collect() will update the detection algorithm). Implemented in cADByStddev.

virtual void cAccuracyDetection::stop | ( |  | ) | `[pure virtual]`

| Should be redefined to stop detection (further calls to collect() should be ignored). Implemented in cADByStddev.

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

- cdetect.h