|
Dynamic Neural Field Composer 0.0.0
A C++20 library and interactive application for building and simulating Dynamic Neural Field (DNF) architectures.
|
Rational (absolute-value) sigmoid — cedar's default activation function. More...
#include <activation_function.h>
Public Member Functions | |
| AbsSigmoidFunction (const AbsSigmoidFunction &)=default | |
| AbsSigmoidFunction (double x_shift, double beta) | |
| Construct an AbsSigmoid with the given threshold and steepness. | |
| void | apply (const std::vector< double > &input, std::vector< double > &out) const override |
Apply the activation function in-place into a pre-allocated out buffer. out must already be sized to input.size(). No heap allocation occurs. | |
| std::unique_ptr< ActivationFunction > | clone () const override |
| double | getBeta () const |
| double | getXShift () const |
| std::vector< double > | operator() (const std::vector< double > &input) override |
Apply the activation function to input and return the result. | |
| bool | operator== (const AbsSigmoidFunction &other) const |
| void | print () const override |
| std::string | toString () const override |
| ~AbsSigmoidFunction () override=default | |
Public Member Functions inherited from dnf_composer::element::ActivationFunction | |
| ActivationFunction ()=default | |
| ActivationFunction (const ActivationFunction &)=default | |
| ActivationFunction & | operator= (const ActivationFunction &)=delete |
| virtual | ~ActivationFunction ()=default |
Public Attributes | |
| double | beta |
| Steepness parameter — cedar/cosivina naming (larger = steeper). | |
| double | x_shift |
| Inflection point / threshold (cedar: theta). | |
Public Attributes inherited from dnf_composer::element::ActivationFunction | |
| ActivationFunctionType | type |
| Concrete function type. | |
Rational (absolute-value) sigmoid — cedar's default activation function.
Formula: 
This is computationally cheaper than SigmoidFunction because it avoids std::exp. At 
Cross-framework equivalence:
| Framework | Type / call | Exact? |
|---|---|---|
| dnf-composer | AbsSigmoidFunction(x_shift, beta) | ✓ |
| cedar | AbsSigmoid(beta=beta, theta=x_shift) | ✓ |
| cosivina | no built-in equivalent | — |
Approximate equivalence to ExpSigmoid: Use SigmoidFunction(x_shift, beta) or cosivina sigmoid(beta=beta, x0=x_shift) — identical for 

|
default |
| dnf_composer::element::AbsSigmoidFunction::AbsSigmoidFunction | ( | double | x_shift, |
| double | beta | ||
| ) |
Construct an AbsSigmoid with the given threshold and steepness.
| x_shift | Inflection point of the sigmoid. |
| beta | Slope parameter. |
|
overridedefault |
|
overridevirtual |
Apply the activation function in-place into a pre-allocated out buffer. out must already be sized to input.size(). No heap allocation occurs.
Implements dnf_composer::element::ActivationFunction.
|
overridevirtual |
Implements dnf_composer::element::ActivationFunction.
| double dnf_composer::element::AbsSigmoidFunction::getBeta | ( | ) | const |
| double dnf_composer::element::AbsSigmoidFunction::getXShift | ( | ) | const |
|
overridevirtual |
Apply the activation function to input and return the result.
Implements dnf_composer::element::ActivationFunction.
| bool dnf_composer::element::AbsSigmoidFunction::operator== | ( | const AbsSigmoidFunction & | other | ) | const |
|
overridevirtual |
|
overridevirtual |
| double dnf_composer::element::AbsSigmoidFunction::beta |
Steepness parameter — cedar/cosivina naming (larger = steeper).
| double dnf_composer::element::AbsSigmoidFunction::x_shift |
Inflection point / threshold (cedar: theta).