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

◆ set_initial_conditions()

void MayaFlux::Nodes::Generator::Logic::set_initial_conditions ( const std::vector< bool > &  initial_values)

Preloads the state history buffer.

Parameters
initial_valuesVector of initial boolean states

Initializes the history buffer with specified values, allowing sequential logic to begin operation with a predefined state sequence. Useful for testing specific patterns or starting from known states.

Definition at line 471 of file Logic.cpp.

472{
473 m_history.clear();
474
475 for (const auto& value : initial_values) {
476 m_history.push_back(value);
477 }
478
479 if (m_history.size() < m_history_size) {
480 m_history.resize(m_history_size, false);
481 } else if (m_history.size() > m_history_size) {
483 }
484}
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

References m_history, and m_history_size.