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

◆ set_sequential_function() [1/2]

void MayaFlux::Nodes::Generator::Logic::set_sequential_function ( CoefSequentialFunction  function,
size_t  history_size 
)

Sets a state-based function that receives the coefficient array.

Parameters
functionFunction receiving the bit history and the coefficient array
history_sizeSize of the state history buffer

Definition at line 638 of file Logic.cpp.

639{
640 SequentialFunction bound = [this](std::span<bool> history) {
641 return m_coef_sequential_function(history, std::span<double>(m_coefficients));
642 };
643 set_sequential_function(std::move(bound), history_size);
644 m_coef_sequential_function = std::move(function);
645 m_coef_bound = true;
646}
void set_sequential_function(SequentialFunction function, size_t history_size)
Sets a custom state-based evaluation function.
Definition Logic.cpp:622
CoefSequentialFunction m_coef_sequential_function
The function behind m_sequential_function while bound.
Definition Logic.hpp:721
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
std::function< bool(std::span< bool >)> SequentialFunction
Function type for state-based evaluation.
Definition Logic.hpp:195

References m_coef_bound, m_coef_sequential_function, m_coefficients, and set_sequential_function().

+ Here is the call graph for this function: