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

◆ set_sequential_function() [2/2]

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

Sets a custom state-based evaluation function.

Parameters
functionFunction implementing sequential boolean logic
history_sizeSize of the state history buffer

Configures the node to maintain a history of previous states and evaluate new inputs in this context using a user-defined function. Enables implementation of sequential logic, pattern detectors, and finite state machines.

Definition at line 622 of file Logic.cpp.

623{
624 m_sequential_function = std::move(function);
627 m_coef_bound = false;
628
629 if (history_size != m_history_size) {
630 m_history_size = history_size;
631 m_history_ring.resize(history_size, false);
632 m_history_linear.resize(history_size, false);
633 m_history_head = 0;
634 m_history_count = 0;
635 }
636}
SequentialFunction m_sequential_function
Function for sequential mode.
Definition Logic.hpp:698
std::vector< uint8_t > m_history_linear
Linear view of history for easy access.
Definition Logic.hpp:717
size_t m_history_size
Maximum size of the history buffer.
Definition Logic.hpp:702
bool m_coef_bound
True while the active mode runs a coefficient function.
Definition Logic.hpp:723
LogicOperator m_operator
Current logic operator.
Definition Logic.hpp:695
std::vector< uint8_t > m_history_ring
Ring buffer for history storage.
Definition Logic.hpp:716
size_t m_history_count
Number of valid entries in the history buffer.
Definition Logic.hpp:701
size_t m_history_head
Head index for the history ring buffer.
Definition Logic.hpp:700
LogicMode m_mode
Current processing mode.
Definition Logic.hpp:694
@ SEQUENTIAL
State-based evaluation using history of inputs (sequential logic)
@ CUSTOM
User-defined boolean function.

References MayaFlux::Nodes::Generator::CUSTOM, m_coef_bound, m_history_count, m_history_head, m_history_linear, m_history_ring, m_history_size, m_mode, m_operator, m_sequential_function, and MayaFlux::Nodes::Generator::SEQUENTIAL.

Referenced by Logic(), and set_sequential_function().

+ Here is the caller graph for this function: