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

◆ uniform_excluding_self()

void MayaFlux::Kinesis::Stochastic::Weights::uniform_excluding_self ( )
inlinenoexcept

Every cell uniform except the diagonal, each row normalized to sum to one.

Note
Assumes a square table. A row beyond the column count has no diagonal cell to zero and is filled uniformly as-is.

The common starting point for a transition table that should never pick its own row: every other cell equally likely, before any further shaping.

Definition at line 195 of file Weights.hpp.

196 {
197 fill(1.0);
198 for (size_t i = 0; i < m_rows; ++i) {
199 if (i < m_cols) {
200 (*this)(i, i) = 0.0;
201 }
202 normalize_row(i);
203 }
204 }
void fill(double value) noexcept
Definition Weights.hpp:155
void normalize_row(size_t row) noexcept
Scale a row so its cells sum to one.
Definition Weights.hpp:174

References fill(), m_cols, m_rows, and normalize_row().

+ Here is the call graph for this function: