MayaFlux 0.3.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 156 of file Yantra.cpp.

157{
158 auto data = Yantra::OperationHelper::extract_numeric_data(channels);
159 if (is_same_size(data)) {
160 auto result = std_dev_per_channel(channels);
161 return std::accumulate(result.begin(), result.end(), 0.0) / result.size();
162 } else {
163 auto mixed = concat_vectors(data);
164 return std_dev(mixed);
165 }
166}
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:144
static bool is_same_size(const std::vector< std::span< double > > &data)
Definition Yantra.cpp:14

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: