Dynamic Neural Field Composer 0.0.0
A C++20 library and interactive application for building and simulating Dynamic Neural Field (DNF) architectures.
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
dnf_composer::element::ActivationFunction Struct Referenceabstract

Abstract base for activation functions applied to a neural field. More...

#include <activation_function.h>

Inheritance diagram for dnf_composer::element::ActivationFunction:
Collaboration diagram for dnf_composer::element::ActivationFunction:

Public Member Functions

 ActivationFunction ()=default
 
 ActivationFunction (const ActivationFunction &)=default
 
virtual void apply (const std::vector< double > &input, std::vector< double > &out) const =0
 Apply the activation function in-place into a pre-allocated out buffer. out must already be sized to input.size(). No heap allocation occurs.
 
virtual std::unique_ptr< ActivationFunctionclone () const =0
 
virtual std::vector< double > operator() (const std::vector< double > &input)=0
 Apply the activation function to input and return the result.
 
ActivationFunctionoperator= (const ActivationFunction &)=delete
 
virtual void print () const =0
 
virtual std::string toString () const =0
 
virtual ~ActivationFunction ()=default
 

Public Attributes

ActivationFunctionType type
 Concrete function type.
 

Detailed Description

Abstract base for activation functions applied to a neural field.

Subclasses implement operator() to transform an activation vector element-wise into an output (field "output" component).

Constructor & Destructor Documentation

◆ ActivationFunction() [1/2]

dnf_composer::element::ActivationFunction::ActivationFunction ( )
default

◆ ActivationFunction() [2/2]

dnf_composer::element::ActivationFunction::ActivationFunction ( const ActivationFunction )
default

◆ ~ActivationFunction()

virtual dnf_composer::element::ActivationFunction::~ActivationFunction ( )
virtualdefault

Member Function Documentation

◆ apply()

virtual void dnf_composer::element::ActivationFunction::apply ( const std::vector< double > &  input,
std::vector< double > &  out 
) const
pure virtual

Apply the activation function in-place into a pre-allocated out buffer. out must already be sized to input.size(). No heap allocation occurs.

Implemented in dnf_composer::element::SigmoidFunction, dnf_composer::element::HeavisideFunction, and dnf_composer::element::AbsSigmoidFunction.

◆ clone()

virtual std::unique_ptr< ActivationFunction > dnf_composer::element::ActivationFunction::clone ( ) const
pure virtual

◆ operator()()

virtual std::vector< double > dnf_composer::element::ActivationFunction::operator() ( const std::vector< double > &  input)
pure virtual

Apply the activation function to input and return the result.

Implemented in dnf_composer::element::SigmoidFunction, dnf_composer::element::HeavisideFunction, and dnf_composer::element::AbsSigmoidFunction.

◆ operator=()

ActivationFunction & dnf_composer::element::ActivationFunction::operator= ( const ActivationFunction )
delete

◆ print()

virtual void dnf_composer::element::ActivationFunction::print ( ) const
pure virtual

◆ toString()

virtual std::string dnf_composer::element::ActivationFunction::toString ( ) const
pure virtual

Member Data Documentation

◆ type

ActivationFunctionType dnf_composer::element::ActivationFunction::type

Concrete function type.


The documentation for this struct was generated from the following file: