UESMANN CPP
1.0
Reference implementation of UESMANN
|
Contains formats for example data. More...
Go to the source code of this file.
Classes | |
class | ExampleSet |
A set of example data. Each datum consists of hormone (i.e. modulator value), inputs and outputs. The data is stored as a single double array, with each example made up of inputs, followed by outputs, followed by modulator value (h). More... | |
Functions | |
template<class T , class TestFunc > | |
void | alternate (T *arr, int nitems, int cycle, TestFunc f) |
Ensure array has cycling values of some function f mod n. Given an array, this function will rearrange the values to ensure that the integer function passed in has values which cycle. For example, if a cycle length of four is specified, the values will be made to run 0,1,2,3,0,1,2,3. This is done in-place. More... | |
Contains formats for example data.
Definition in file data.hpp.
void alternate | ( | T * | arr, |
int | nitems, | ||
int | cycle, | ||
TestFunc | f | ||
) |
Ensure array has cycling values of some function f mod n. Given an array, this function will rearrange the values to ensure that the integer function passed in has values which cycle. For example, if a cycle length of four is specified, the values will be made to run 0,1,2,3,0,1,2,3. This is done in-place.
The input function has the signature (int)(T). In the shuffling code we use it takes a pointer to the data of the example.