Skip to content

Latest commit

 

History

History
102 lines (66 loc) · 2.54 KB

utilities.md

File metadata and controls

102 lines (66 loc) · 2.54 KB

Utilities
Parameters
Experiment ━━ Genus ━━ Species ━━ Organism ━━ Genotype ━━ Chromosome ━━ Node
                                                                ┗━━━━ Phenotype              ┗━━━━━ Link

Utilities

Probability Sampling

std::mt19937 PRNG;

A Mersenne Twister pseudo-random number generator which underpins all other probability sampling functions.
 

int P(std::vector<double> w_, int condition_ = true)

Samples an integer from a probability mass function defined by a collection of weights w_ whenever the input condition_ is true. If the input condition_ is false, returns zero.
 

int U(int a_, int b_)

Samples a uniformly-distributed integer from the interval [a_, b_).
 

double U(double a_, double b_)

Samples a uniformly-distributed double from the interval [a_, b_).
 

double N(double u_, double s_)

Samples a normally-distributed double with mean u_ and standard deviation s_.
 

Activation Functions

double Unity(std::vector<double>& x_)

Unity function evaluated at the sum of all entries of x_.
 

double Identity(std::vector<double>& x_)

Identity function evaluated at the sum of all entries of x_.
 

double Heaviside(std::vector<double>& x_)

Heaviside function evaluated at the sum of all entries of x_.
 

double Logistic(std::vector<double>& x_)

Logistic function evaluated at the sum of all entries of x_.
 

double ReLU(std::vector<double>& x_)

Rectified Linear Unit function evaluated at the sum of all entries of x_.
 

Assorted Functions

long int Key(unsigned int i_, unsigned int j_, unsigned int k_, unsigned int l_)

Generates a unique key from the inputs: i_ (3 bits), j_ (1 bit), k_ (30 bits), l_ (30 bits).