Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

RazorBack::Stat2_ Class Reference

Class Stat2_: Two-variable simple statistics class. More...

#include <Stat2.hh>

Collaboration diagram for RazorBack::Stat2_:

Collaboration graph
[legend]
List of all members.

Public Methods

 Stat2_ ()
 constructor.

void clear ()
 clear(): clear the calling object.

void add (double X, double Y)
 add(): adds a pair of values X,Y to the calling object.

unsigned int data_no () const
 Returns the number of data pairs seen.

const Stat_xs () const
 xs(), ys(): return the one-stat objects for X and Y. More...

const Stat_ys () const
double corr () const
 corr(): returns the correlation coefficient between the X and Y points. More...


Private Attributes

Stat_ Xs
Stat_ Ys
 X and Y fields.

double Sxy
 mixed product sum.


Detailed Description

Class Stat2_: Two-variable simple statistics class.

A Stat2_ object contains two Stat_ objects (Xs and Ys) plus a mixed-sum member Sxy for correlation. Data point addition is done by pairs. The one-var stats (min/max/avg, SD) are done via returning Xs or Ys and then using the appropriate Stat_ methods.

Definition at line 149 of file Stat2.hh.


Constructor & Destructor Documentation

RazorBack::Stat2_::Stat2_ ( ) [inline]
 

constructor.

Definition at line 159 of file Stat2.hh.


Member Function Documentation

void RazorBack::Stat2_::clear ( ) [inline]
 

clear(): clear the calling object.

Definition at line 162 of file Stat2.hh.

void RazorBack::Stat2_::add ( double X,
double Y ) [inline]
 

add(): adds a pair of values X,Y to the calling object.

Definition at line 165 of file Stat2.hh.

unsigned int RazorBack::Stat2_::data_no ( ) const [inline]
 

Returns the number of data pairs seen.

Definition at line 168 of file Stat2.hh.

const Stat_ & RazorBack::Stat2_::xs ( ) const [inline]
 

xs(), ys(): return the one-stat objects for X and Y.

Use the Stat_ methods on these to obtain avg, sd, min, max.

Definition at line 174 of file Stat2.hh.

const Stat_ & RazorBack::Stat2_::ys ( ) const [inline]
 

Definition at line 175 of file Stat2.hh.

double RazorBack::Stat2_::corr ( ) const
 

corr(): returns the correlation coefficient between the X and Y points.

Throws Statexc_ if there were no data points. Throws Sdevexc_ if the s.d. was not larger than 0.0.


Member Data Documentation

Stat_ RazorBack::Stat2_::Xs [private]
 

Definition at line 152 of file Stat2.hh.

Stat_ RazorBack::Stat2_::Ys [private]
 

X and Y fields.

Definition at line 152 of file Stat2.hh.

double RazorBack::Stat2_::Sxy [private]
 

mixed product sum.

Definition at line 153 of file Stat2.hh.


The documentation for this class was generated from the following file:
Generated at Wed Aug 21 09:33:19 2002 for The Razorback C++ Library: Statistics by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001