#include <CNCL/DLREF.h>
Distribution Function F(x)
#include <CNCL/DLREG.h>
Complementary Distr. Function G(x)
#include <CNCL/DLREP.h>
Probability Function P(x)
TYPE
CN_DLREF
CN_DLREG
CN_DLREP
CNStatistics, CNDLRE
None
LREF, LREG
The Discrete Limited Relative Error algorithm (DLRE or LRE III) is a special LRE for evaluating discrete random variables. The possible values must be known before the evalution is initialized, because F(x) resp. G(x) or P(x) of each value will be estimated. So, the DLRE is not a better histogramm with an error measure. The implementation is a generalized version of the algorithm.
If a test value does not agree with any x--interval, the following warning
is printed: Warning: Wrong x value in DLRE[FGP]::put !
. Since
CNCL 1.8, values are rounded in order to find a suitable interval. Thus the
above error message should not occur any longer.
Constructors:
CNDLREF( CNParam * param );
CNDLREF( double XMIN, double XMAX, double INT_SIZE, double MAX_ERR, double PRE_FIRST = 0.0,
const char* NAME = NIL, const char* TEXT = NIL, double Fmin = 0.0,
unsigned long MAX_NRV = ULONG_MAX);
CNDLREF( double * XVALUES, long LEVEL, double MAX_ERR, double PRE_FIRST = 0.0,
const char* NAME = NIL, const char* TEXT = NIL, double Fmin = 0.0,
unsigned long MAX_NRV = ULONG_MAX);
CNDLREF
evaluation. There are two types of the
initializing: The first constructor (second of the list above)
should be used for equidistant x--values and the second for non--equidistant
x--values.
XMIN, XMAX
INT_SIZE
XVALUES
LEVEL
MAX_ERR
PRE_FIRST
NAME
TEXT
Fmin
MAX_NRV
CNDLREG( CNParam * param )
CNDLREG( double XMIN, double XMAX, double INT_SIZE, double MAX_ERR, double PRE_FIRST = 0.0,
const char* NAME = NIL, const char* TEXT = NIL, double Gmin = 0.0,
unsigned long MAX_NRV = ULONG_MAX);
CNDLREG( double * XVALUES, long LEVEL, double MAX_ERR, double PRE_FIRST = 0.0,
const char* NAME = NIL, const char* TEXT = NIL, double Gmin = 0.0,
unsigned long MAX_NRV = ULONG_MAX);
CNDLREG
evaluation. The parameters are as described
above (except Gmin which replaces Fmin, of course).
CNDLREP( CNParam * param )
CNDLREP( double XMIN, double XMAX, double INT_SIZE, double MAX_ERR, double PRE_FIRST = 0.0,
const char* NAME = NIL, const char* TEXT = NIL, bool force_rminusa_ok = false,
unsigned long MAX_NRV = ULONG_MAX);
CNDLREP( double * XVALUES, long LEVEL, double MAX_ERR, double PRE_FIRST = 0.0,
const char* NAME = NIL, const char* TEXT = NIL, bool force_rminusa_ok = false,
unsigned long MAX_NRV = ULONG_MAX);
CNDLREP
evaluation. The parameters are as described
above. The new parameter force_rminusa_ok
is used to force (hence
the name) the large sample condition r-a >= 10. This condition cannot
necessary be fulfilled by all kind of simulations, but most often it
only results in a longer run time. To ensure the correctness of the
results this option should be set TRUE whenever possible (default is FALSE).
In addition to the member functions required by CNCL and CNStatistics
,
CNDLREF
, CNDLREG
and CNDLREP
provide:
void set_base( double ba );
virtual void change_error( double err );
virtual double cur_x_lev();
double cur_f_lev();
double cur_g_lev();
virtual long min_index();
virtual long max_index();
get_result()
.
virtual const struct CNDLRE::resultline *get_result( long index );
x
,
vf
-- holds F, G or P ---, rho
-- local correlation ---,
sigrho
, d
-- the relative error -- and nx
-- the
absolut hits of x.
virtual double f( double xt );
virtual double g( double xt );
virtual double p( double xt );
Go to the first, previous, next, last section, table of contents.