Main Page | Namespace List | Class List | File List | Class Members

Cerc::Cerc< T > Class Template Reference

#include <cerc.h>

Collaboration diagram for Cerc::Cerc< T >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Cerc (int l)
 ~Cerc ()
std::string string ()
void append (T val)
double mean ()
double stdev ()
double variance ()
double absdev ()
double skew ()
double kurtosis ()
min ()
max ()
int size ()
operator[] (int dx)
at (int dx)

Detailed Description

template<class T>
class Cerc::Cerc< T >

Cerc creates an easy and safe interface to some of the GSL statistic routines (currently double and int). It allows you to create and manipulate a fixed length array and perform some operations on that data

Data can only be appended to the end of the array, but any the array allows for random access to array elements. When an element is appended, the front element is popped off.

The name "Cerc" comes for the original code to create a Circular list.

Definition at line 29 of file cerc.h.


Constructor & Destructor Documentation

template<class T>
Cerc::Cerc< T >::Cerc int  l  )  [inline]
 

Parameters:
l -- length of the array

Definition at line 38 of file cerc.h.

template<class T>
Cerc::Cerc< T >::~Cerc  )  [inline]
 

Definition at line 46 of file cerc.h.


Member Function Documentation

template<class T>
double Cerc::Cerc< T >::absdev  )  [inline]
 

returns the absolute deviation of the array

Definition at line 169 of file cerc.h.

template<class T>
void Cerc::Cerc< T >::append val  )  [inline]
 

appends a value at the end of the fixed array, and shuffles the values downward from the end.

Parameters:
val -- the value to append

Definition at line 64 of file cerc.h.

template<class T>
T Cerc::Cerc< T >::at int  dx  )  [inline]
 

returns the element found at position dx. Indexed from zero and throws an std::out_of_range if the value requested is out of range

Parameters:
dx -- index of value in array
Exceptions:
-- out_of_range

Definition at line 135 of file cerc.h.

template<class T>
double Cerc::Cerc< T >::kurtosis  )  [inline]
 

returns the kurtosis of the array

Definition at line 184 of file cerc.h.

template<class T>
T Cerc::Cerc< T >::max  )  [inline]
 

return the maximum value found in the array

Definition at line 104 of file cerc.h.

template<class T>
double Cerc::Cerc< T >::mean  )  [inline]
 

returns a double of the mean value of the array

Definition at line 145 of file cerc.h.

template<class T>
T Cerc::Cerc< T >::min  )  [inline]
 

returns the minimum value found in the array

Definition at line 90 of file cerc.h.

template<class T>
T Cerc::Cerc< T >::operator[] int  dx  )  [inline]
 

returns the element found at position dx. This function does no bounds checking

Parameters:
dx -- index of value in array

Definition at line 125 of file cerc.h.

template<class T>
int Cerc::Cerc< T >::size  )  [inline]
 

return the size of the array

Definition at line 116 of file cerc.h.

template<class T>
double Cerc::Cerc< T >::skew  )  [inline]
 

returns the skew of the array

Definition at line 176 of file cerc.h.

template<class T>
double Cerc::Cerc< T >::stdev  )  [inline]
 

returns a double of the std. deviation of the array

Definition at line 153 of file cerc.h.

template<class T>
std::string Cerc::Cerc< T >::string  )  [inline]
 

return the array as a space seperated string, this should probably be though of as an unsafe method since the returned string could be huge

Definition at line 53 of file cerc.h.

template<class T>
double Cerc::Cerc< T >::variance  )  [inline]
 

returns the variance of the array

Definition at line 161 of file cerc.h.


The documentation for this class was generated from the following file:
Generated on Wed Jun 23 00:09:36 2004 for Cerc by doxygen 1.3.5