Main Page   Alphabetical List   Compound List   File List   Compound Members   File Members  

pdf2.h File Reference

Routine collection for estimating bivariate probability density functions. More...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <float.h>

Include dependency graph for pdf2.h:

Include dependency graph

Go to the source code of this file.

Compounds

struct  Pdfrec2_
 Pdfrec2_ : this structure holds the variables for estimating a joint PDF of 2 random variables. More...


Functions

int init_pdf2 (int Binno1, int Binno2, double Binwidth1, double Binwidth2, double Low1, double Up1, double Low2, double Up2, Pdfrec2_ *Pdf)
 init_pdf2(Binno1, Binno2, Binwidth1, Binwidth2, Low1, Up1, Low2, Up2, Pdf): sets up Pdf for accepting raw data. More...

int add_pdf2 (double Value1, double Value2, Pdfrec2_ *Pdf)
 add_pdf2(Value1, Value2, Pdf): enters the value pair Value1,2 into Pdf. More...

int eval_pdf2 (Pdfrec2_ *Pdf)
 eval_pdf2(Pdf): calculates the PDF and puts the estimated values in Pdf->Y[][] (a normalisation). More...

void remove_pdf2 (Pdfrec2_ *Pdf)
 remove_pdf2(Pdf): frees up the arrays in Pdfrec_ and resets all variables to 0. More...


Detailed Description

Routine collection for estimating bivariate probability density functions.

Definition in file pdf2.h.


Function Documentation

int init_pdf2 ( int Binno1,
int Binno2,
double Binwidth1,
double Binwidth2,
double Low1,
double Up1,
double Low2,
double Up2,
Pdfrec2_ * Pdf )
 

init_pdf2(Binno1, Binno2, Binwidth1, Binwidth2, Low1, Up1, Low2, Up2, Pdf): sets up Pdf for accepting raw data.

Binno1,2 are the bin numbers, Binwidth1, 2 are the bin widths for variables 1 and 2. The range will be Low[12]..Up[12] (everything outside is ignored. It is assumed that Pdf is either empty or has been cleared. Return value: 0 if OK, -1 if some of the parameters make no sense, -2 if memory could not be allocated.

Referenced by Pdfrec2_::N().

int add_pdf2 ( double Value1,
double Value2,
Pdfrec2_ * Pdf )
 

add_pdf2(Value1, Value2, Pdf): enters the value pair Value1,2 into Pdf.

All bins in Pdf->Yint[][] which lie closer to Value1, 2 than the half of the bin widths get incremented by 1 (the "sliding bin" idea by Willie) and the total data count Pdf->N is incremented by 1. Return value: 0 if OK, -1 if Value-s are too small, 1 if they are too large.

Referenced by Pdfrec2_::N().

int eval_pdf2 ( Pdfrec2_ * Pdf )
 

eval_pdf2(Pdf): calculates the PDF and puts the estimated values in Pdf->Y[][] (a normalisation).

Return value: 0 if OK, -1 if no data were in Pdf.

Referenced by Pdfrec2_::N().

void remove_pdf2 ( Pdfrec2_ * Pdf )
 

remove_pdf2(Pdf): frees up the arrays in Pdfrec_ and resets all variables to 0.

Does not remove Pdf itself! This would be a C++ destructor.

Referenced by Pdfrec2_::N().


Generated at Wed Aug 21 09:33:30 2002 for The Razorback C Library: Statistics by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001