GNU Octave  9.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
rand Class Reference

#include "oct-rand.h"

Public Member Functions

 ~rand ()=default
 

Static Public Member Functions

static std::string distribution ()
 
static void distribution (const std::string &d)
 
static void exponential_distribution ()
 
static FloatNDArray float_nd_array (const dim_vector &dims, float a=1.0)
 
static float float_scalar (float a=1.0)
 
static Array< float > float_vector (octave_idx_type n, float a=1.0)
 
static void gamma_distribution ()
 
static bool instance_ok ()
 
static NDArray nd_array (const dim_vector &dims, double a=1.0)
 
static void normal_distribution ()
 
static void poisson_distribution ()
 
static void reset ()
 
static void reset (const std::string &d)
 
static double scalar (double a=1.0)
 
static double seed ()
 
static void seed (double s)
 
static uint32NDArray state (const std::string &d="")
 
static void state (const uint32NDArray &s, const std::string &d="")
 
static void uniform_distribution ()
 
static Array< double > vector (octave_idx_type n, double a=1.0)
 

Protected Member Functions

 rand ()
 

Detailed Description

Definition at line 44 of file oct-rand.h.

Constructor & Destructor Documentation

◆ rand()

rand::rand ( )
protected

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

Referenced by instance_ok().

◆ ~rand()

rand::~rand ( )
default

Member Function Documentation

◆ distribution() [1/2]

static std::string rand::distribution ( )
inlinestatic

Definition at line 101 of file oct-rand.h.

◆ distribution() [2/2]

static void rand::distribution ( const std::string &  d)
inlinestatic

Definition at line 108 of file oct-rand.h.

References d.

◆ exponential_distribution()

static void rand::exponential_distribution ( )
inlinestatic

Definition at line 126 of file oct-rand.h.

◆ float_nd_array()

static FloatNDArray rand::float_nd_array ( const dim_vector dims,
float  a = 1.0 
)
inlinestatic

Definition at line 179 of file oct-rand.h.

◆ float_scalar()

static float rand::float_scalar ( float  a = 1.0)
inlinestatic

Definition at line 152 of file oct-rand.h.

References NaN.

◆ float_vector()

static Array<float> rand::float_vector ( octave_idx_type  n,
float  a = 1.0 
)
inlinestatic

Definition at line 165 of file oct-rand.h.

References n.

◆ gamma_distribution()

static void rand::gamma_distribution ( )
inlinestatic

Definition at line 138 of file oct-rand.h.

◆ instance_ok()

bool rand::instance_ok ( )
static

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

References rand(), and singleton_cleanup_list::add().

◆ nd_array()

static NDArray rand::nd_array ( const dim_vector dims,
double  a = 1.0 
)
inlinestatic

Definition at line 172 of file oct-rand.h.

Referenced by Frandperm().

◆ normal_distribution()

static void rand::normal_distribution ( )
inlinestatic

Definition at line 120 of file oct-rand.h.

◆ poisson_distribution()

static void rand::poisson_distribution ( )
inlinestatic

Definition at line 132 of file oct-rand.h.

◆ reset() [1/2]

static void rand::reset ( )
inlinestatic

Definition at line 73 of file oct-rand.h.

◆ reset() [2/2]

static void rand::reset ( const std::string &  d)
inlinestatic

Definition at line 94 of file oct-rand.h.

References d.

◆ scalar()

static double rand::scalar ( double  a = 1.0)
inlinestatic

Definition at line 145 of file oct-rand.h.

References NaN.

◆ seed() [1/2]

static double rand::seed ( )
inlinestatic

Definition at line 59 of file oct-rand.h.

References NaN.

◆ seed() [2/2]

static void rand::seed ( double  s)
inlinestatic

Definition at line 66 of file oct-rand.h.

◆ state() [1/2]

static uint32NDArray rand::state ( const std::string &  d = "")
inlinestatic

Definition at line 80 of file oct-rand.h.

References d.

◆ state() [2/2]

static void rand::state ( const uint32NDArray s,
const std::string &  d = "" 
)
inlinestatic

Definition at line 86 of file oct-rand.h.

References d.

◆ uniform_distribution()

static void rand::uniform_distribution ( )
inlinestatic

Definition at line 114 of file oct-rand.h.

◆ vector()

static Array<double> rand::vector ( octave_idx_type  n,
double  a = 1.0 
)
inlinestatic

Definition at line 159 of file oct-rand.h.

References n.


The documentation for this class was generated from the following files: