GNU Octave  3.8.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Macros | Functions
oct-rand.cc File Reference
#include <map>
#include <vector>
#include <stdint.h>
#include "data-conv.h"
#include "f77-fcn.h"
#include "lo-error.h"
#include "lo-ieee.h"
#include "lo-mappers.h"
#include "mach-info.h"
#include "oct-locbuf.h"
#include "oct-rand.h"
#include "oct-time.h"
#include "randgamma.h"
#include "randmtzig.h"
#include "randpoisson.h"
#include "singleton-cleanup.h"
Include dependency graph for oct-rand.cc:

Go to the source code of this file.

Macros

#define MAKE_RAND(len)
#define RAND_FUNC(x)   F77_FUNC (dgenunf, DGENUNF) (0.0, 1.0, x)
#define RAND_FUNC(x)   F77_FUNC (dgennor, DGENNOR) (0.0, 1.0, x)
#define RAND_FUNC(x)   F77_FUNC (dgenexp, DGENEXP) (1.0, x)
#define RAND_FUNC(x)   x = octave_NaN;
#define RAND_FUNC(x)   F77_FUNC (dignpoi, DIGNPOI) (a, x)
#define RAND_FUNC(x)   x = octave_NaN;
#define RAND_FUNC(x)   F77_FUNC (dgengam, DGENGAM) (1.0, a, x)
#define RAND_FUNC(x)   F77_FUNC (dgenunf, DGENUNF) (0.0, 1.0, x)
#define RAND_FUNC(x)   F77_FUNC (dgennor, DGENNOR) (0.0, 1.0, x)
#define RAND_FUNC(x)   F77_FUNC (dgenexp, DGENEXP) (1.0, x)
#define RAND_FUNC(x)   x = octave_NaN;
#define RAND_FUNC(x)   F77_FUNC (dignpoi, DIGNPOI) (da, x)
#define RAND_FUNC(x)   x = octave_NaN;
#define RAND_FUNC(x)   F77_FUNC (dgengam, DGENGAM) (1.0, da, x)

Functions

static uint32_t double2uint32 (double d)
F77_RET_T F77_FUNC (dgennor, DGENNOR)(const double &
F77_RET_T const double double
&F77_RET_T 
F77_FUNC (dgenunf, DGENUNF)(const double &
F77_RET_T const double double
&F77_RET_T const double double
&F77_RET_T 
F77_FUNC (dgenexp, DGENEXP)(const double &
F77_RET_T const double double
&F77_RET_T const double double
&F77_RET_T double &F77_RET_T 
F77_FUNC (dignpoi, DIGNPOI)(const double &
F77_RET_T const double double
&F77_RET_T const double double
&F77_RET_T double &F77_RET_T
double &F77_RET_T 
F77_FUNC (dgengam, DGENGAM)(const double &
F77_RET_T const double double
&F77_RET_T const double double
&F77_RET_T double &F77_RET_T
double &F77_RET_T const double
double &F77_RET_T 
F77_FUNC (setall, SETALL)(const int32_t &
F77_RET_T const double double
&F77_RET_T const double double
&F77_RET_T double &F77_RET_T
double &F77_RET_T const double
double &F77_RET_T const
int32_t &F77_RET_T 
F77_FUNC (getsd, GETSD)(int32_t &
F77_RET_T const double double
&F77_RET_T const double double
&F77_RET_T double &F77_RET_T
double &F77_RET_T const double
double &F77_RET_T const
int32_t &F77_RET_T int32_t
&F77_RET_T 
F77_FUNC (setsd, SETSD)(const int32_t &
F77_RET_T const double double
&F77_RET_T const double double
&F77_RET_T double &F77_RET_T
double &F77_RET_T const double
double &F77_RET_T const
int32_t &F77_RET_T int32_t
&F77_RET_T const int32_t
&F77_RET_T 
F77_FUNC (setcgn, SETCGN)(const int32_t &)
static int32_t force_to_fit_range (int32_t i, int32_t lo, int32_t hi)

Macro Definition Documentation

#define MAKE_RAND (   len)
Value:
do \
{ \
double val; \
for (volatile octave_idx_type i = 0; i < len; i++) \
{ \
octave_quit (); \
RAND_FUNC (val); \
v[i] = val; \
} \
} \
while (0)

Definition at line 718 of file oct-rand.cc.

Referenced by octave_rand::fill().

#define RAND_FUNC (   x)    F77_FUNC (dgenunf, DGENUNF) (0.0, 1.0, x)
#define RAND_FUNC (   x)    F77_FUNC (dgennor, DGENNOR) (0.0, 1.0, x)
#define RAND_FUNC (   x)    F77_FUNC (dgenexp, DGENEXP) (1.0, x)
#define RAND_FUNC (   x)    x = octave_NaN;
#define RAND_FUNC (   x)    F77_FUNC (dignpoi, DIGNPOI) (a, x)
#define RAND_FUNC (   x)    x = octave_NaN;
#define RAND_FUNC (   x)    F77_FUNC (dgengam, DGENGAM) (1.0, a, x)
#define RAND_FUNC (   x)    F77_FUNC (dgenunf, DGENUNF) (0.0, 1.0, x)
#define RAND_FUNC (   x)    F77_FUNC (dgennor, DGENNOR) (0.0, 1.0, x)
#define RAND_FUNC (   x)    F77_FUNC (dgenexp, DGENEXP) (1.0, x)
#define RAND_FUNC (   x)    x = octave_NaN;
#define RAND_FUNC (   x)    F77_FUNC (dignpoi, DIGNPOI) (da, x)
#define RAND_FUNC (   x)    x = octave_NaN;
#define RAND_FUNC (   x)    F77_FUNC (dgengam, DGENGAM) (1.0, da, x)

Function Documentation

static uint32_t double2uint32 ( double  d)
static

Definition at line 672 of file oct-rand.cc.

References d, max(), and xfinite().

Referenced by octave_rand::set_internal_state().

F77_RET_T F77_FUNC ( dgennor  ,
DGENNOR   
) const
F77_RET_T const double double& F77_RET_T F77_FUNC ( dgenunf  ,
DGENUNF   
) const
F77_RET_T const double double& F77_RET_T const double double& F77_RET_T F77_FUNC ( dgenexp  ,
DGENEXP   
) const
F77_RET_T const double double& F77_RET_T const double double& F77_RET_T double& F77_RET_T F77_FUNC ( dignpoi  ,
DIGNPOI   
) const
F77_RET_T const double double& F77_RET_T const double double& F77_RET_T double& F77_RET_T double& F77_RET_T F77_FUNC ( dgengam  ,
DGENGAM   
) const
F77_RET_T const double double& F77_RET_T const double double& F77_RET_T double& F77_RET_T double& F77_RET_T const double double& F77_RET_T F77_FUNC ( setall  ,
SETALL   
) const
F77_RET_T const double double& F77_RET_T const double double& F77_RET_T double& F77_RET_T double& F77_RET_T const double double& F77_RET_T const int32_t& F77_RET_T F77_FUNC ( getsd  ,
GETSD   
)
F77_RET_T const double double& F77_RET_T const double double& F77_RET_T double& F77_RET_T double& F77_RET_T const double double& F77_RET_T const int32_t& F77_RET_T int32_t& F77_RET_T F77_FUNC ( setsd  ,
SETSD   
) const
F77_RET_T const double double& F77_RET_T const double double& F77_RET_T double& F77_RET_T double& F77_RET_T const double double& F77_RET_T const int32_t& F77_RET_T int32_t& F77_RET_T const int32_t& F77_RET_T F77_FUNC ( setcgn  ,
SETCGN   
) const
static int32_t force_to_fit_range ( int32_t  i,
int32_t  lo,
int32_t  hi 
)
static

Definition at line 133 of file oct-rand.cc.

Referenced by octave_rand::do_seed(), and octave_rand::initialize_ranlib_generators().