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

◆ WalkOperator()

MayaFlux::Nodes::Network::WalkOperator::WalkOperator ( std::shared_ptr< Kinesis::Stochastic::Weights >  table,
Pick  pick = {},
uint32_t  every_n_blocks = 0,
size_t  starting_index = 0 
)
explicit
Parameters
tableTransition weights, one row per slot
pickSelection rule. When empty, Kinesis::Stochastic::Weights::weighted_pick draws from the row using this operator's own Stochastic generator; a row that sums to zero leaves the walk in place.
every_n_blocksWhen nonzero, process() calls advance() every this many process_batch() calls, with no external driver needed. When zero (the default), process() does nothing and only explicit advance()/jump() calls, or a mapped "current" Source, move the walk.
starting_indexSlot established as active on the first call to process(), advance(), or jump(). 0 by default.

Definition at line 5 of file WalkOperator.cpp.

7 : m_table(std::move(table))
8 , m_pick(std::move(pick))
9 , m_current(starting_index)
10 , m_blocks_until(every_n_blocks)
11{
12 m_every_n_blocks.store(every_n_blocks, std::memory_order_relaxed);
13}
const std::shared_ptr< Kinesis::Stochastic::Weights > & table() const noexcept
std::atomic< uint32_t > m_every_n_blocks
std::shared_ptr< Kinesis::Stochastic::Weights > m_table

References m_every_n_blocks.