|
| AurynDelayVector (NeuronID n, unsigned int delay_buffer_size) |
| Default constructor. More...
|
|
virtual | ~AurynDelayVector () |
| Default destructor. More...
|
|
void | advance () |
| Advances memory buffer by one step. More...
|
|
AurynVectorFloat * | mem_get_vector (int delay=-1) |
| Returns delayed state vector. More...
|
|
AurynFloat | mem_get (NeuronID i, int delay=-1) |
| Returns delayed element. More...
|
|
AurynVectorFloat * | mem_ptr (int delay=-1) |
| Returns pointer to delayed array element. More...
|
|
void | resize (NeuronID new_size) |
| Resizes the vector and the buffer vectors. More...
|
|
AurynTime | get_delay_size () |
| Returns delay buffer size in units of AurynTime. More...
|
|
| AurynVectorFloat (NeuronID n) |
| Default constructor. More...
|
|
| ~AurynVectorFloat () |
| Default destructor. More...
|
|
void | scale (const float a) |
|
void | saxpy (const float a, AurynVectorFloat *x) |
|
void | clip (const float min, const float max) |
|
void | add (const float c) |
|
void | add (AurynVectorFloat *v) |
|
void | sum (AurynVectorFloat *a, AurynVectorFloat *b) |
|
void | sum (AurynVectorFloat *a, const float b) |
|
void | mul (const float a) |
|
void | mul (AurynVectorFloat *v) |
|
void | diff (AurynVectorFloat *a, AurynVectorFloat *b) |
|
void | diff (AurynVectorFloat *a, const float b) |
|
void | diff (const float a, AurynVectorFloat *b) |
|
void | follow (AurynVectorFloat *v, const float rate) |
|
| AurynVector (NeuronID n) |
| Default constructor. More...
|
|
| AurynVector (AurynVector *vec) |
| Copy constructor. More...
|
|
virtual | ~AurynVector () |
| Default destructor. More...
|
|
void | copy (AurynVector *v) |
| Copies vector v. More...
|
|
float | get (NeuronID i) |
| Gets element i from vector. More...
|
|
float * | ptr (NeuronID i=0) |
| Gets pointer to element i from vector. More...
|
|
void | set (NeuronID i, float value) |
| Sets element i in vector to value. More...
|
|
void | set_all (const float v) |
| Set all elements to value v. More...
|
|
void | set_zero () |
| Set all elements to zero. More...
|
|
void | scale (const float a) |
| Scales all vector elements by a. More...
|
|
void | add (const float c) |
| Adds constant c to each vector element. More...
|
|
void | add (AurynVector *v) |
| Adds a vector v to the vector. More...
|
|
void | add_specific (const NeuronID i, const float c) |
| Adds the value c to specific vector element i. More...
|
|
void | mul_specific (const NeuronID i, const float c) |
| Multiply to specific vector element with data index i with the constant c. More...
|
|
void | sub (const float c) |
| Subtract constant c to each vector element. More...
|
|
void | sub (AurynVector *v) |
| Elementwise subtraction. More...
|
|
void | mul (const float a) |
| Multiply all vector elements by constant. More...
|
|
void | mul (AurynVector *v) |
| Element-wise vector multiply. More...
|
|
void | div (const float a) |
| Element-wise division. More...
|
|
void | div (AurynVector *v) |
| Element-wise vector division. More...
|
|
void | div (AurynVector *a, AurynVector *b) |
| Element-wise vector division which stores the result in this. More...
|
|
void | saxpy (const float a, AurynVector *x) |
| SAXPY operation as in GSL. More...
|
|
void | follow (AurynVector< float, NeuronID > *v, const float rate) |
| Follows target vector v with rate. More...
|
|
void | follow_scalar (const float a, const float rate) |
| Like follow but with a scalar target value a. More...
|
|
void | elementwise_max (AurynVector *v1, AurynVector *v2) |
| Elementwise max operation. More...
|
|
void | elementwise_max (AurynVector *v1) |
| Elementwise max operation with another vector. More...
|
|
void | pow (const unsigned int n) |
| Takes each element to the n-th power. More...
|
|
void | fast_exp () |
| Computes an approximation of exp(x) for each vector element. More...
|
|
void | exp () |
| Computes exp(x) for each vector element. More...
|
|
void | sigmoid (AurynVector *x, const float beta, const float thr) |
| Computes sigmoid(beta*(x-thr)) for each vector element and stores result in this instance. More...
|
|
void | sqrt () |
| Takes the square root of each element. More...
|
|
void | neg () |
| Flips the sign of all elements. More...
|
|
void | inv () |
| Computes 1./x of each element. More...
|
|
void | sum (AurynVector *a, AurynVector *b) |
| Computes the sum a+b and stores the result in this instance. More...
|
|
void | sum (AurynVector *a, const float b) |
| Computes the sum a+b and stores the result in this instance. More...
|
|
void | diff (AurynVector *a, AurynVector *b) |
| Computes the difference a-b and stores the result in this instance. More...
|
|
void | diff (AurynVector *a, const float b) |
| Computes the difference a-b and stores the result in this instance. More...
|
|
void | diff (const float a, AurynVector *b) |
| Computes the difference a-b and stores the result in this instance. More...
|
|
void | sqr () |
| Squares each element. More...
|
|
void | abs () |
| Takes absolute value of each element. More...
|
|
void | rect () |
| Rectifies all elements. More...
|
|
void | neg_rect () |
| Negatively rectifies all elements. More...
|
|
void | clip (float min, float max) |
| Clips all vector elements to the range min max. More...
|
|
double | var () |
| Computes the variance of the vector elements on this rank. More...
|
|
double | std () |
| Computes the standard deviation of all elements on this rank. More...
|
|
double | mean () |
| Computes the mean of the vector elements on this rank. More...
|
|
double | element_sum () |
| Computes the sum of the vector elements. More...
|
|
double | l1norm () |
| Computes the l1 norm of the vector. More...
|
|
double | l2norm () |
| Computes the l2 norm of the vector. More...
|
|
double | max () |
| Returns the max of the vector elements. More...
|
|
double | min () |
| Returns the min of the vector elements. More...
|
|
NeuronID | nonzero () |
| Computes number of nonzero elements on this rank. More...
|
|
void | zero_effective_zeros (const float epsilon=1e-3) |
| Sets all values whose absolute value is smaller than epsilon to zero. More...
|
|
void | add_random_normal (AurynState mean=0.0, AurynState sigma=1.0, unsigned int seed=8721) |
|
void | set_random_normal (AurynState mean=0.0, AurynState sigma=1.0, unsigned int seed=8721) |
|
void | set_random (unsigned int seed=0) |
| Initializes vector elements with Gaussian of unit varince and a seed derived from system time if no seed or seed of 0 is given. More...
|
|
bool | any () |
| Returns true if any element is nonzero. More...
|
|
bool | any (float eps) |
| Returns true if any element is nonzero. More...
|
|
void | print () |
| Print vector elements to stdout for debugging. More...
|
|
void | write_to_file (std::string filename) |
| Print vector elements to a text file for debugging. More...
|
|
AurynDelayVector is a AurynVectorFloat which keeps its own history in a ring buffer.
Note that AurynDelayVector does not tap into the Auryn clock and the method advance() has to be run to store a copy in the vector queue.
Public member methods:
advance(): Stores corrent vector state into a queue mem_get(i,d) : Retrieves element i from the d delayed version mem_ptr(d) : Returns pointer to the d delayed version of the vector.