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

◆ operator=()

Weights & MayaFlux::Kinesis::Stochastic::Weights::operator= ( std::initializer_list< std::initializer_list< double > >  values)
inline

Assign every cell from nested initializer lists.

Parameters
valuesOne inner list per row. Dimensions must match exactly.
Exceptions
std::invalid_argumenton dimension mismatch

Definition at line 94 of file Weights.hpp.

95 {
96 if (values.size() != m_rows) {
97 error<std::invalid_argument>(Journal::Component::Kinesis, Journal::Context::Runtime, std::source_location::current(),
98 "Weights: row count mismatch. Expected {} rows, received {}", m_rows, values.size());
99 }
100 size_t row = 0;
101 for (const auto& source : values) {
102 if (source.size() != m_cols) {
103 error<std::invalid_argument>(Journal::Component::Kinesis, Journal::Context::Runtime, std::source_location::current(),
104 "Weights: column count mismatch at row {}. Expected {} cols, received {}", row, m_cols, source.size());
105 }
106 size_t col = 0;
107 for (double value : source) {
108 (*this)(row, col++) = value;
109 }
110 ++row;
111 }
112 return *this;
113 }
glm::vec3 value
std::vector< std::byte > values
Definition VDBWriter.cpp:26
std::span< const double > row(size_t row) const noexcept
Non-atomic view of one row.
Definition Weights.hpp:150
@ Runtime
General runtime operations (default fallback)
@ Kinesis
General mathematical and physics algorithns.
Source source()
Begin a Source chain.
Definition Plot.hpp:127

References MayaFlux::Journal::Kinesis, m_cols, m_rows, row(), MayaFlux::Journal::Runtime, value, and values.

+ Here is the call graph for this function: