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

◆ mean_combined()

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

Calculate mean across all channels (mix then analyze)

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

Definition at line 91 of file Yantra.cpp.

92{
93 auto data = Yantra::OperationHelper::extract_numeric_data(channels);
94 if (is_same_size(data)) {
95 auto result = mean_per_channel(channels);
96 return std::accumulate(result.begin(), result.end(), 0.0) / (double)result.size();
97 }
98 auto mixed = concat_vectors(data);
99 return mean(mixed);
100}
std::vector< double > mean_per_channel(const std::vector< Kakshya::DataVariant > &channels)
Calculate mean per channel for multi-channel data.
Definition Yantra.cpp:75

References MayaFlux::Yantra::OperationHelper::extract_numeric_data(), mean(), and mean_per_channel().

+ Here is the call graph for this function: