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 | List of all members
dnf_composer::element::NeuralField2D Class Referencefinal

#include <neural_field_2d.h>

Inheritance diagram for dnf_composer::element::NeuralField2D:
Collaboration diagram for dnf_composer::element::NeuralField2D:

Public Member Functions

std::shared_ptr< Elementclone () const override
 
std::vector< NeuralField2DBumpgetBumps () const
 
bool getComputeStateMetrics () const
 
double getHighestActivation () const
 
double getLowestActivation () const
 
NeuralField2DParameters getParameters () const
 
double getStabilityThreshold () const
 
void init () override
 Initialize the element (called once before the simulation loop).
 
bool isStable () const
 
 NeuralField2D (const ElementCommonParameters &elementCommonParameters, const NeuralField2DParameters &parameters)
 
void setComputeStateMetrics (bool enable)
 
void setParameters (const NeuralField2DParameters &parameters)
 
void setThresholdForStability (double threshold)
 
void step (double t, double deltaT) override
 Advance the element by one time step.
 
std::string toString () const override
 
- Public Member Functions inherited from dnf_composer::element::Element
virtual void addInput (const std::shared_ptr< Element > &inputElement, const std::string &inputComponent="output")
 Register inputElement as an upstream source for this element.
 
void buildInputCache ()
 Cache raw pointers to input component data. Call after all element init()s complete.
 
virtual void changeDimensions (const ElementDimensions &newDimensions)
 Resize all components to newDimensions and re-initialize.
 
void close ()
 
 Element (const ElementCommonParameters &parameters)
 Construct an element with the given common parameters.
 
std::vector< double > getComponent (const std::string &componentName)
 Return a copy of the named component vector.
 
std::vector< std::string > getComponentList () const
 
std::vector< double > * getComponentPtr (const std::string &componentName)
 
const std::unordered_map< std::string, std::vector< double > > * getComponents () const
 Return a read-only pointer to the full components map.
 
ElementCommonParameters getElementCommonParameters () const
 
std::vector< std::shared_ptr< Element > > getInputs ()
 
std::unordered_map< std::shared_ptr< Element >, std::string > getInputsAndComponents ()
 Return all inputs mapped to the component name they expose.
 
ElementLabel getLabel () const
 
int getMaxSpatialDimension () const
 
std::vector< std::shared_ptr< Element > > getOutputs ()
 
int getSize () const
 Return the number of spatial samples (size = round(x_max / d_x)).
 
double getStepSize () const
 Return the spatial resolution (d_x).
 
int getUniqueIdentifier () const
 
std::string getUniqueName () const
 
bool hasInput () const
 
bool hasInput (const std::string &inputElementName, const std::string &inputComponent)
 
bool hasInput (int inputElementId, const std::string &inputComponent)
 
bool hasOutput () const
 
bool hasOutput (const std::string &outputElementName, const std::string &outputComponent)
 
bool hasOutput (int outputElementId, const std::string &outputComponent)
 
void print () const
 
void removeInput (const std::string &inputElementId)
 
void removeInput (int uniqueId)
 
void removeInputs ()
 
void removeOutput (const std::string &outputElementId)
 Deregister this element as an input of outputElementId.
 
void removeOutput (int uniqueId)
 Deregister this element as an input of the element with uniqueId.
 
void removeOutputs ()
 
void setUniqueName (const std::string &name)
 
void updateInput ()
 Pull data from all registered input elements into this element's components.
 
virtual ~Element ()=default
 

Additional Inherited Members

- Protected Attributes inherited from dnf_composer::element::Element
ElementCommonParameters commonParameters
 Name, label, and spatial dimensions.
 
std::unordered_map< std::string, std::vector< double > > components
 Named data arrays (e.g. "output").
 
std::unordered_map< std::shared_ptr< Element >, std::string > inputs
 Upstream elements and the component they expose.
 
std::unordered_map< std::shared_ptr< Element >, std::string > outputs
 Downstream elements that read this element's output.
 

Constructor & Destructor Documentation

◆ NeuralField2D()

dnf_composer::element::NeuralField2D::NeuralField2D ( const ElementCommonParameters elementCommonParameters,
const NeuralField2DParameters parameters 
)

Member Function Documentation

◆ clone()

std::shared_ptr< Element > dnf_composer::element::NeuralField2D::clone ( ) const
overridevirtual

◆ getBumps()

std::vector< NeuralField2DBump > dnf_composer::element::NeuralField2D::getBumps ( ) const
inline

◆ getComputeStateMetrics()

bool dnf_composer::element::NeuralField2D::getComputeStateMetrics ( ) const
inline

◆ getHighestActivation()

double dnf_composer::element::NeuralField2D::getHighestActivation ( ) const
inline

◆ getLowestActivation()

double dnf_composer::element::NeuralField2D::getLowestActivation ( ) const
inline

◆ getParameters()

NeuralField2DParameters dnf_composer::element::NeuralField2D::getParameters ( ) const

◆ getStabilityThreshold()

double dnf_composer::element::NeuralField2D::getStabilityThreshold ( ) const
inline

◆ init()

void dnf_composer::element::NeuralField2D::init ( )
overridevirtual

Initialize the element (called once before the simulation loop).

Implements dnf_composer::element::Element.

Here is the caller graph for this function:

◆ isStable()

bool dnf_composer::element::NeuralField2D::isStable ( ) const
inline

◆ setComputeStateMetrics()

void dnf_composer::element::NeuralField2D::setComputeStateMetrics ( bool  enable)
inline

◆ setParameters()

void dnf_composer::element::NeuralField2D::setParameters ( const NeuralField2DParameters parameters)
Here is the call graph for this function:

◆ setThresholdForStability()

void dnf_composer::element::NeuralField2D::setThresholdForStability ( double  threshold)
inline

◆ step()

void dnf_composer::element::NeuralField2D::step ( double  t,
double  deltaT 
)
overridevirtual

Advance the element by one time step.

Parameters
tCurrent simulation time.
deltaTIntegration step size.

Implements dnf_composer::element::Element.

Here is the call graph for this function:

◆ toString()

std::string dnf_composer::element::NeuralField2D::toString ( ) const
overridevirtual

Implements dnf_composer::element::Element.

Here is the call graph for this function:

The documentation for this class was generated from the following files: