GNU Octave  4.2.1
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
Functions | Variables
rand.cc File Reference
#include <ctime>
#include <unordered_map>
#include <string>
#include "f77-fcn.h"
#include "lo-mappers.h"
#include "oct-rand.h"
#include "quit.h"
#include "defun.h"
#include "error.h"
#include "errwarn.h"
#include "ovl.h"
#include "unwind-prot.h"
#include "utils.h"
#include "ov-re-mat.h"
Include dependency graph for rand.cc:

Go to the source code of this file.

Functions

static octave_value do_rand (const octave_value_list &args, int nargin, const char *fcn, const std::string &distribution, bool additional_arg=false)
 
OCTAVE_EXPORT octave_value_list Frand (const octave_value_list &args, int) you can restore the random number generator to the state ar
 
OCTAVE_EXPORT octave_value_list Frandn (const octave_value_list &args, int) ode
 

Variables

static std::string current_distribution = octave_rand::distribution ()
 
uses the ite {Ziggurat Method for Generating Random Variables}
 
uses the ospell {Marsaglia and Tsang} ``Ziggurat technique'' to transform from a uniform to a normal distribution. The class of the value returned can be controlled by a trailing code{"double"} or code{"single"} argument. These are the only valid classes. Reference: ospell{G. Marsaglia and W.W. Tsang}
 
uses the J Statistical Software
 
uses the J Statistical vol
 

Function Documentation

static octave_value do_rand ( const octave_value_list args,
int  nargin,
const char *  fcn,
const std::string distribution,
bool  additional_arg = false 
)
static
OCTAVE_EXPORT octave_value_list Frand ( const octave_value_list args,
int   
)

Definition at line 414 of file rand.cc.

References do_rand().

Referenced by install_rand_fcns().

OCTAVE_EXPORT octave_value_list Frandn ( const octave_value_list args,
int   
)

Definition at line 537 of file rand.cc.

Referenced by install_rand_fcns().

Variable Documentation

std::string current_distribution = octave_rand::distribution ()
static

Definition at line 504 of file rand.cc.

uses the ite {Ziggurat Method for Generating Random Variables}

Definition at line 537 of file rand.cc.

uses the ospell {Marsaglia and Tsang} ``Ziggurat technique'' to transform from a uniform to a normal distribution. The class of the value returned can be controlled by a trailing code{"double"} or code{"single"} argument. These are the only valid classes. Reference: ospell{G. Marsaglia and W.W. Tsang}

Definition at line 537 of file rand.cc.

uses the J Statistical Software

Definition at line 537 of file rand.cc.

uses the J Statistical vol

Definition at line 537 of file rand.cc.