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

◆ set_initial_conditions()

template<typename T >
void MayaFlux::Memory::HistoryBuffer< T >::set_initial_conditions ( const std::vector< T > &  values)
inline

Set initial conditions.

Parameters
valuesInitial values (ordered newest to oldest)

Sets the first min(values.size(), capacity) elements to the given values, fills remainder with zeros. Sets count to full capacity.

Definition at line 588 of file RingBuffer.hpp.

589 {
590 std::ranges::fill(m_data, T {});
591
592 size_t count = std::min(values.size(), m_capacity);
593 for (size_t i = 0; i < count; ++i) {
594 m_data[i] = values[i];
595 }
596
597 m_head = 0;
599 }
size_t count

References count, MayaFlux::Memory::HistoryBuffer< T >::m_capacity, MayaFlux::Memory::HistoryBuffer< T >::m_count, MayaFlux::Memory::HistoryBuffer< T >::m_data, and MayaFlux::Memory::HistoryBuffer< T >::m_head.

Referenced by MayaFlux::Nodes::Generator::Polynomial::set_initial_conditions().

+ Here is the caller graph for this function: