|
Dynamic Neural Field Composer 0.0.0
A C++20 library and interactive application for building and simulating Dynamic Neural Field (DNF) architectures.
|
Enumerations | |
| enum class | ReduceOp { SUM , AVERAGE , MAXIMUM , MINIMUM } |
Functions | |
| template<typename T > | |
| std::vector< T > | absSigmoid (const std::vector< T > &x, T beta, T x0) |
| AbsSigmoid: rational approximation of the logistic sigmoid. | |
| template<typename T > | |
| void | broadcast1DTo2D_into (std::vector< T > &out, const std::vector< T > &profile, int size_x, int size_y, bool alongX) |
| template<typename T > | |
| T | calculateVectorAvg (const std::vector< T > &vec) |
| template<typename T > | |
| T | calculateVectorNorm (const std::vector< T > &vec) |
| template<typename T > | |
| T | calculateVectorSum (const std::vector< T > &vec) |
| double | circular_gaussian_2d (double x, double y, double mu_x, double mu_y, double sigma, double A) |
| template<typename T > | |
| std::vector< T > | circularGauss (uint32_t size, const T &sigma, const T &position) |
| template<typename T > | |
| bool | compareVectors (const std::vector< T > &vec1, const std::vector< T > &vec2, T threshold) |
| std::array< int, 2 > | computeKernelRange (double sigma, int cutOfFactor, int fieldSize, bool circular) |
| template<typename T > | |
| std::vector< T > | conv (std::vector< T > const &f, std::vector< T > const &g) |
| template<typename T > | |
| std::vector< T > | conv2d_separable (const std::vector< T > &field, const std::vector< T > &kernel_x, const std::vector< T > &kernel_y, int size_x, int size_y, const std::vector< int > &extIndex_x, const std::vector< int > &extIndex_y) |
| template<typename T > | |
| void | conv2d_separable_into (std::vector< T > &out, std::vector< T > &tmp, const std::vector< T > &field, const std::vector< T > &kernel_x, const std::vector< T > &kernel_y, int size_x, int size_y, const std::vector< int > &extIndex_x, const std::vector< int > &extIndex_y) |
| template<typename T > | |
| std::vector< T > | conv_same (std::vector< T > const &f, std::vector< T > const &g) |
| template<typename T > | |
| void | conv_same_into (std::vector< T > &out, const std::vector< T > &f, const std::vector< T > &g) |
| template<typename T > | |
| std::vector< T > | conv_valid (std::vector< T > const &f, std::vector< T > const &g) |
| template<typename T > | |
| void | conv_valid_into (std::vector< T > &out, const std::vector< T > &f, const std::vector< T > &g) |
| std::vector< int > | createExtendedIndex (int fieldSize, const std::array< int, 2 > &kernelRange) |
| template<typename T > | |
| std::vector< std::vector< T > > | deltaLearningRuleKroghHertz (std::vector< std::vector< T > > &weights, const std::vector< T > &input, const std::vector< T > &targetOutput, const std::vector< T > &actualOutput, double learningRate) |
| template<typename T > | |
| std::vector< std::vector< T > > | deltaLearningRuleWidrowHoff (std::vector< std::vector< T > > &weights, const std::vector< T > &input, const std::vector< T > &actualOutput, const std::vector< T > &targetOutput, double learningRate) |
| template<typename T > | |
| std::vector< T > | flattenMatrix (const std::vector< std::vector< T > > &matrix) |
| template<typename T > | |
| std::vector< T > | gauss (const std::vector< int > &rangeX, const T &position, const T &sigma) |
| template<typename T > | |
| std::vector< T > | gauss (int size, const T &sigma, const T &position) |
| template<typename T > | |
| std::vector< T > | gaussDerivative (const std::vector< int > &rangeX, const T &position, const T &sigma, const T &litude) |
| template<typename T > | |
| std::vector< T > | gaussDerivativeNorm (const std::vector< int > &rangeX, const T &position, const T &sigma, const T &litude) |
| double | gaussian_2d (double x, double y, double mu_x, double mu_y, double sigma_x, double sigma_y, double A) |
| double | gaussian_2d_periodic (double x, double y, double mu_x, double mu_y, double sigma, double A, double max_x, double max_y) |
| template<typename T > | |
| std::vector< T > | gaussNorm (const std::vector< int > &rangeX, const T &position, const T &sigma) |
| std::vector< double > | generateNormalVector (int size) |
| template<typename T > | |
| std::vector< T > | heaviside (const std::vector< T > &x, T threshold) |
| template<typename T > | |
| std::vector< T > | hebbLearningRule (std::vector< T > &weights, const std::vector< T > &input, const std::vector< T > &output, double learningRate) |
| template<typename T > | |
| std::vector< T > | nonCircularGauss (uint32_t size, const T &sigma, const T &position) |
| double | normalize (const double value, const double min, const double max) |
| template<typename T > | |
| std::vector< T > | normalize (const std::vector< T > &vector) |
| template<typename T > | |
| std::vector< T > | obtainCircularVector (const std::vector< int > &indices, const std::vector< T > &contents) |
| template<typename T > | |
| void | obtainCircularVector_into (std::vector< T > &out, const std::vector< int > &indices, const std::vector< T > &contents) |
| template<typename T > | |
| std::vector< T > | ojaLearningRule (std::vector< T > &weights, const std::vector< T > &input, const std::vector< T > &output, double learningRate) |
| template<typename T > | |
| void | reduce2DAxis_into (std::vector< T > &out, const std::vector< T > &field, int size_x, int size_y, bool keepX, ReduceOp op) |
| template<typename T > | |
| std::vector< T > | resample (const std::vector< T > &input, int outputSize) |
| template<typename T > | |
| void | resampleCubicInto (const std::vector< T > &input, std::vector< T > &output) |
| template<typename T > | |
| void | resampleInto (const std::vector< T > &input, std::vector< T > &output) |
| template<typename T > | |
| void | resampleNearestInto (const std::vector< T > &input, std::vector< T > &output) |
| template<typename T > | |
| std::vector< T > | sigmoid (const std::vector< T > &x, T beta, T x0) |
| template<typename T > | |
| std::vector< T > | sumGauss (const std::vector< T > &gauss1, const std::vector< T > &gauss2) |
| double | wrap (double value, double max_value) |
|
strong |
| std::vector< T > dnf_composer::tools::math::absSigmoid | ( | const std::vector< T > & | x, |
| T | beta, | ||
| T | x0 | ||
| ) |
AbsSigmoid: rational approximation of the logistic sigmoid.
Formula: s(x) = 0.5 * (1 + beta * (x - x0) / (1 + beta * |x - x0|))
Equivalent to cedar's AbsSigmoid(beta, theta=x0). At beta >= 20 virtually indistinguishable from the ExpSigmoid but avoids std::exp() entirely.
| void dnf_composer::tools::math::broadcast1DTo2D_into | ( | std::vector< T > & | out, |
| const std::vector< T > & | profile, | ||
| int | size_x, | ||
| int | size_y, | ||
| bool | alongX | ||
| ) |
| T dnf_composer::tools::math::calculateVectorAvg | ( | const std::vector< T > & | vec | ) |
| T dnf_composer::tools::math::calculateVectorNorm | ( | const std::vector< T > & | vec | ) |
| T dnf_composer::tools::math::calculateVectorSum | ( | const std::vector< T > & | vec | ) |
|
inline |
| std::vector< T > dnf_composer::tools::math::circularGauss | ( | uint32_t | size, |
| const T & | sigma, | ||
| const T & | position | ||
| ) |
| bool dnf_composer::tools::math::compareVectors | ( | const std::vector< T > & | vec1, |
| const std::vector< T > & | vec2, | ||
| T | threshold | ||
| ) |
| std::array< int, 2 > dnf_composer::tools::math::computeKernelRange | ( | double | sigma, |
| int | cutOfFactor, | ||
| int | fieldSize, | ||
| bool | circular | ||
| ) |
| std::vector< T > dnf_composer::tools::math::conv | ( | std::vector< T > const & | f, |
| std::vector< T > const & | g | ||
| ) |
| std::vector< T > dnf_composer::tools::math::conv2d_separable | ( | const std::vector< T > & | field, |
| const std::vector< T > & | kernel_x, | ||
| const std::vector< T > & | kernel_y, | ||
| int | size_x, | ||
| int | size_y, | ||
| const std::vector< int > & | extIndex_x, | ||
| const std::vector< int > & | extIndex_y | ||
| ) |
| void dnf_composer::tools::math::conv2d_separable_into | ( | std::vector< T > & | out, |
| std::vector< T > & | tmp, | ||
| const std::vector< T > & | field, | ||
| const std::vector< T > & | kernel_x, | ||
| const std::vector< T > & | kernel_y, | ||
| int | size_x, | ||
| int | size_y, | ||
| const std::vector< int > & | extIndex_x, | ||
| const std::vector< int > & | extIndex_y | ||
| ) |
| std::vector< T > dnf_composer::tools::math::conv_same | ( | std::vector< T > const & | f, |
| std::vector< T > const & | g | ||
| ) |
| void dnf_composer::tools::math::conv_same_into | ( | std::vector< T > & | out, |
| const std::vector< T > & | f, | ||
| const std::vector< T > & | g | ||
| ) |
| std::vector< T > dnf_composer::tools::math::conv_valid | ( | std::vector< T > const & | f, |
| std::vector< T > const & | g | ||
| ) |
| void dnf_composer::tools::math::conv_valid_into | ( | std::vector< T > & | out, |
| const std::vector< T > & | f, | ||
| const std::vector< T > & | g | ||
| ) |
| std::vector< int > dnf_composer::tools::math::createExtendedIndex | ( | int | fieldSize, |
| const std::array< int, 2 > & | kernelRange | ||
| ) |
| std::vector< std::vector< T > > dnf_composer::tools::math::deltaLearningRuleKroghHertz | ( | std::vector< std::vector< T > > & | weights, |
| const std::vector< T > & | input, | ||
| const std::vector< T > & | targetOutput, | ||
| const std::vector< T > & | actualOutput, | ||
| double | learningRate | ||
| ) |
| std::vector< std::vector< T > > dnf_composer::tools::math::deltaLearningRuleWidrowHoff | ( | std::vector< std::vector< T > > & | weights, |
| const std::vector< T > & | input, | ||
| const std::vector< T > & | actualOutput, | ||
| const std::vector< T > & | targetOutput, | ||
| double | learningRate | ||
| ) |
| std::vector< T > dnf_composer::tools::math::flattenMatrix | ( | const std::vector< std::vector< T > > & | matrix | ) |
| std::vector< T > dnf_composer::tools::math::gauss | ( | const std::vector< int > & | rangeX, |
| const T & | position, | ||
| const T & | sigma | ||
| ) |
| std::vector< T > dnf_composer::tools::math::gauss | ( | int | size, |
| const T & | sigma, | ||
| const T & | position | ||
| ) |
| std::vector< T > dnf_composer::tools::math::gaussDerivative | ( | const std::vector< int > & | rangeX, |
| const T & | position, | ||
| const T & | sigma, | ||
| const T & | amplitude | ||
| ) |
| std::vector< T > dnf_composer::tools::math::gaussDerivativeNorm | ( | const std::vector< int > & | rangeX, |
| const T & | position, | ||
| const T & | sigma, | ||
| const T & | amplitude | ||
| ) |
|
inline |
|
inline |
| std::vector< T > dnf_composer::tools::math::gaussNorm | ( | const std::vector< int > & | rangeX, |
| const T & | position, | ||
| const T & | sigma | ||
| ) |
| std::vector< double > dnf_composer::tools::math::generateNormalVector | ( | int | size | ) |
| std::vector< T > dnf_composer::tools::math::heaviside | ( | const std::vector< T > & | x, |
| T | threshold | ||
| ) |
| std::vector< T > dnf_composer::tools::math::hebbLearningRule | ( | std::vector< T > & | weights, |
| const std::vector< T > & | input, | ||
| const std::vector< T > & | output, | ||
| double | learningRate | ||
| ) |
| std::vector< T > dnf_composer::tools::math::nonCircularGauss | ( | uint32_t | size, |
| const T & | sigma, | ||
| const T & | position | ||
| ) |
|
inline |
| std::vector< T > dnf_composer::tools::math::normalize | ( | const std::vector< T > & | vector | ) |
| std::vector< T > dnf_composer::tools::math::obtainCircularVector | ( | const std::vector< int > & | indices, |
| const std::vector< T > & | contents | ||
| ) |
| void dnf_composer::tools::math::obtainCircularVector_into | ( | std::vector< T > & | out, |
| const std::vector< int > & | indices, | ||
| const std::vector< T > & | contents | ||
| ) |
| std::vector< T > dnf_composer::tools::math::ojaLearningRule | ( | std::vector< T > & | weights, |
| const std::vector< T > & | input, | ||
| const std::vector< T > & | output, | ||
| double | learningRate | ||
| ) |
| void dnf_composer::tools::math::reduce2DAxis_into | ( | std::vector< T > & | out, |
| const std::vector< T > & | field, | ||
| int | size_x, | ||
| int | size_y, | ||
| bool | keepX, | ||
| ReduceOp | op | ||
| ) |
| std::vector< T > dnf_composer::tools::math::resample | ( | const std::vector< T > & | input, |
| int | outputSize | ||
| ) |
| void dnf_composer::tools::math::resampleCubicInto | ( | const std::vector< T > & | input, |
| std::vector< T > & | output | ||
| ) |
| void dnf_composer::tools::math::resampleInto | ( | const std::vector< T > & | input, |
| std::vector< T > & | output | ||
| ) |
| void dnf_composer::tools::math::resampleNearestInto | ( | const std::vector< T > & | input, |
| std::vector< T > & | output | ||
| ) |
| std::vector< T > dnf_composer::tools::math::sigmoid | ( | const std::vector< T > & | x, |
| T | beta, | ||
| T | x0 | ||
| ) |
| std::vector< T > dnf_composer::tools::math::sumGauss | ( | const std::vector< T > & | gauss1, |
| const std::vector< T > & | gauss2 | ||
| ) |
|
inline |