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

◆ MotionChannel()

template<typename T >
MayaFlux::Kinesis::MotionChannel< T >::MotionChannel ( Stochastic::EstimateModel  model,
size_t  window,
double  adapt_rate = 0.05,
size_t  history_capacity = 8 
)
inlineexplicit

Construct a channel.

Parameters
modelEstimateModel applied identically to every component. A vec2's x and y each get their own Estimate instance with this model, not one shared instance, since components are independent streams.
windowWindow size forwarded to each Estimate
adapt_rateAdapt rate forwarded to each Estimate, ignored by models other than EWM_VARIANCE
history_capacityHistoryBuffer capacity; must be at least one more than the highest derivative order this channel will be asked to compute, per Differential's own capacity requirements

Definition at line 125 of file MotionChannel.hpp.

130 : m_history(history_capacity)
131 {
132 for (size_t i = 0; i < component_count; ++i)
133 m_estimates.emplace_back(model, adapt_rate, window);
134 }
Memory::HistoryBuffer< T > m_history
std::vector< Stochastic::Estimate > m_estimates
static constexpr size_t component_count

References MayaFlux::Kinesis::MotionChannel< T >::component_count, and MayaFlux::Kinesis::MotionChannel< T >::m_estimates.