LibRan  0.1
Pseudo-random number distribution generator
Data Fields
LR_obj Struct Reference

the fundamental LibRan random variate distribution object More...

#include <libran.h>

Collaboration diagram for LR_obj:
Collaboration graph
[legend]

Data Fields

const char const * type
 
LR_type t
 
LR_data_type d
 
LR_val a
 
LR_val b
 
LR_val m
 
LR_val s
 
LR_val x
 
int k
 
int n
 
float p
 
float q
 
LR_val iy
 
LR_val iy0
 
int(* ui )(LR_obj *)
 
long(* ul )(LR_obj *)
 
float(* uf )(LR_obj *)
 
double(* ud )(LR_obj *)
 
float(* rnf )(LR_obj *)
 
double(* rnd )(LR_obj *)
 
int(* rni )(LR_obj *)
 
float(* pdff )(LR_obj *, float)
 
double(* pdfd )(LR_obj *, double)
 
float(* pdfi )(LR_obj *, int)
 
float(* cdff )(LR_obj *, float)
 
double(* cdfd )(LR_obj *, double)
 
float(* cdfi )(LR_obj *, int)
 
void * aux
 
int errno
 

Detailed Description

the fundamental LibRan random variate distribution object

The LR_obj object is the fundemental LibRan random variate distribution object containing the basic attributes defining the specific distribution characteristics.

If the built-in pseudo-random number generator is used then the generator values are also stored within the object to allow each object to act independently.

Other of the attributes serve the object-oriented aspect of the LR_obj object by having pointers to the random variate distribution's RAN, PDF, and CDF functions.

Some random variate distributions (e.g. piece and lspline ) require auxiliary methods to define the distribution.

Lastly there is errno which contains the last error number encountered. Use LR_perror() to display the error description.

Definition at line 134 of file libran.h.

Field Documentation

◆ a

LR_val a

a - lower bound of interval

Definition at line 138 of file libran.h.

◆ aux

void* aux

aux - auxiliary object

Definition at line 168 of file libran.h.

◆ b

LR_val b

b - upper bound of interval

Definition at line 139 of file libran.h.

◆ cdfd

double(* cdfd) (LR_obj *, double)

cdfd - double _CDF fn

Definition at line 165 of file libran.h.

◆ cdff

float(* cdff) (LR_obj *, float)

cdff - float _CDF fn

Definition at line 164 of file libran.h.

◆ cdfi

float(* cdfi) (LR_obj *, int)

cdfi - float _PDF fn generic (void) pointer to some other object

Definition at line 166 of file libran.h.

◆ d

d - data type

Definition at line 137 of file libran.h.

◆ errno

int errno

errno - last error encountered

Definition at line 169 of file libran.h.

◆ iy

LR_val iy

iy - current random number sequence value

Definition at line 148 of file libran.h.

◆ iy0

LR_val iy0

iy0- initial random number sequence value set of uniform random number generators - one for each data type

Definition at line 149 of file libran.h.

◆ k

int k

k - integer attribute

Definition at line 143 of file libran.h.

◆ m

LR_val m

m - middle value of distribution

Definition at line 140 of file libran.h.

◆ n

int n

n - integer attribute

Definition at line 144 of file libran.h.

◆ p

float p

p - float attribute

Definition at line 145 of file libran.h.

◆ pdfd

double(* pdfd) (LR_obj *, double)

pdfd - double _PDF fn

Definition at line 161 of file libran.h.

◆ pdff

float(* pdff) (LR_obj *, float)

pdff - float _PDF fn

Definition at line 160 of file libran.h.

◆ pdfi

float(* pdfi) (LR_obj *, int)

pdfi - float _PDF fn set of CDFs for this distribution type

Definition at line 162 of file libran.h.

◆ q

float q

q - float attribute object random values

Definition at line 146 of file libran.h.

◆ rnd

double(* rnd) (LR_obj *)

rnd - double _RAN fn

Definition at line 157 of file libran.h.

◆ rnf

float(* rnf) (LR_obj *)

rnf - float _RAN fn

Definition at line 156 of file libran.h.

◆ rni

int(* rni) (LR_obj *)

rni - int _RAN fn set of PDFs for this distribution type

Definition at line 158 of file libran.h.

◆ s

LR_val s

s - measure of distribution width

Definition at line 141 of file libran.h.

◆ t

t - distribution type

Definition at line 136 of file libran.h.

◆ type

const char const* type

named distribution type

Definition at line 135 of file libran.h.

◆ ud

double(* ud) (LR_obj *)

ud - double random number fn set of Random Fns for this distribution type

Definition at line 154 of file libran.h.

◆ uf

float(* uf) (LR_obj *)

uf - float random number fn

Definition at line 153 of file libran.h.

◆ ui

int(* ui) (LR_obj *)

ui - int random number fn

Definition at line 151 of file libran.h.

◆ ul

long(* ul) (LR_obj *)

ul - long random number fn

Definition at line 152 of file libran.h.

◆ x

LR_val x

x - auxiliary value

Definition at line 142 of file libran.h.


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