MayaFlux 0.2.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 506 of file RingBuffer.hpp.

507 {
508 std::ranges::fill(m_data, T {});
509
510 size_t count = std::min(values.size(), m_capacity);
511 for (size_t i = 0; i < count; ++i) {
512 m_data[i] = values[i];
513 }
514
515 m_head = 0;
517 }
Eigen::Index 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: