MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ set_direct_function() [1/2]

void MayaFlux::Nodes::Generator::Logic::set_direct_function ( CoefDirectFunction  function)

Sets a stateless function that receives the coefficient array.

Parameters
functionFunction receiving the input and the coefficient array

Definition at line 560 of file Logic.cpp.

561{
562 DirectFunction bound = [this](double input) {
563 return m_coef_direct_function(input, std::span<double>(m_coefficients));
564 };
565 set_direct_function(std::move(bound));
566 m_coef_direct_function = std::move(function);
567 m_coef_bound = true;
568}
Core::GlobalInputConfig input
Definition Config.cpp:42
void set_direct_function(DirectFunction function)
Sets a custom combinational logic function.
Definition Logic.cpp:552
CoefDirectFunction m_coef_direct_function
The function behind m_direct_function while bound.
Definition Logic.hpp:720
std::function< bool(double)> DirectFunction
Function type for stateless boolean evaluation.
Definition Logic.hpp:185
std::vector< double > m_coefficients
Coefficient array handed to coefficient-aware functions.
Definition Logic.hpp:718
bool m_coef_bound
True while the active mode runs a coefficient function.
Definition Logic.hpp:723

References input, m_coef_bound, m_coef_direct_function, m_coefficients, and set_direct_function().

+ Here is the call graph for this function: