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

◆ set_sequential_function()

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 449 of file Logic.cpp.

450{
451 m_sequential_function = std::move(function);
454
455 if (history_size != m_history_size) {
456 m_history_size = history_size;
457 m_history.clear();
458 m_history.assign(history_size, false);
459 }
460}
SequentialFunction m_sequential_function
Function for sequential mode.
Definition Logic.hpp:563
size_t m_history_size
Maximum size of the history buffer.
Definition Logic.hpp:566
std::deque< bool > m_history
Buffer of input values for feedforward mode.
Definition Logic.hpp:565
LogicOperator m_operator
Current logic operator.
Definition Logic.hpp:560
LogicMode m_mode
Current processing mode.
Definition Logic.hpp:559
@ SEQUENTIAL
State-based evaluation using history of inputs (sequential logic)
@ CUSTOM
User-defined boolean function.

References MayaFlux::Nodes::Generator::CUSTOM, m_history, m_history_size, m_mode, m_operator, m_sequential_function, and MayaFlux::Nodes::Generator::SEQUENTIAL.