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

◆ advance()

size_t MayaFlux::Nodes::Network::WalkOperator::advance ( )

Step once.

Returns
The active slot after the step

Definition at line 54 of file WalkOperator.cpp.

55{
57
58 const size_t here = m_current.load(std::memory_order_relaxed);
59 auto row = m_table->row(here);
60
61 const size_t next = m_pick ? m_pick(row) : Kinesis::Stochastic::Weights::weighted_pick(row, m_generator);
62 if (next >= row.size()) {
63 return here;
64 }
65
66 jump(next);
67 return next;
68}
void ensure_established()
Activate slot m_current and deactivate every other slot that currently exists.
void jump(size_t index)
Make a slot the active one.
std::shared_ptr< Kinesis::Stochastic::Weights > m_table
Kinesis::Stochastic::Stochastic m_generator
@ Kinesis
General mathematical and physics algorithns.

References ensure_established(), jump(), m_current, m_generator, m_pick, m_table, and MayaFlux::Kinesis::Stochastic::Weights::weighted_pick().

Referenced by process().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: