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

◆ std_dev_combined()

MAYAFLUX_API double MayaFlux::std_dev_combined ( const std::vector< Kakshya::DataVariant > &  channels)

Calculate standard deviation across all channels (mix then analyze)

Parameters
channelsVector of channel data
Returns
Single standard deviation value across all mixed channels

Definition at line 154 of file Yantra.cpp.

155{
156 auto data = Yantra::OperationHelper::extract_numeric_data(channels);
157 if (is_same_size(data)) {
158 auto result = std_dev_per_channel(channels);
159 return std::accumulate(result.begin(), result.end(), 0.0) / result.size();
160 } else {
161 auto mixed = concat_vectors(data);
162 return std_dev(mixed);
163 }
164}
std::vector< double > std_dev_per_channel(const std::vector< Kakshya::DataVariant > &channels)
Calculate standard deviation per channel for multi-channel data.
Definition Yantra.cpp:142
static bool is_same_size(const std::vector< std::span< double > > &data)
Definition Yantra.cpp:12

References concat_vectors(), MayaFlux::Yantra::OperationHelper::extract_numeric_data(), is_same_size(), std_dev(), and std_dev_per_channel().

+ Here is the call graph for this function: