351 {
352 if (input.data.empty()) {
354 }
355 try {
358
359 std::vector<std::span<const double>> channel_spans;
360 for (const auto& span : data_span)
361 channel_spans.emplace_back(span.data(), span.size());
362
363 std::vector<std::vector<double>> stat_values;
364 stat_values.reserve(channel_spans.size());
365 for (const auto& ch_span : channel_spans) {
367 }
368
370 stat_values, channel_spans, structure_info);
371
374 } catch (const std::exception& e) {
377 error_result.
metadata = input.metadata;
378 error_result.metadata["error"] = std::string("Analysis failed: ") + e.what();
379 return error_result;
380 }
381 }
#define MF_ERROR(comp, ctx,...)
static std::tuple< std::vector< std::span< double > >, DataStructureInfo > extract_structured_double(T &compute_data)
Extract structured double data from Datum container or direct ComputeData with automatic container ha...
Datum< OutputType > output_type
Datum< InputType > input_type
StatisticalMethod m_method
StatisticalAnalysis create_analysis_result(const std::vector< std::vector< double > > &stat_values, std::vector< std::span< const double > > original_data, const auto &) const
Create comprehensive analysis result.
std::vector< double > compute_statistical_values(std::span< const double > data, StatisticalMethod method) const
Compute statistical values using span (zero-copy processing)
output_type create_pipeline_output(const input_type &input, const StatisticalAnalysis &analysis_result, DataStructureInfo &info)
Create pipeline output for operation chaining.
void store_current_analysis(AnalysisResultType &&result) const
@ ComputeMatrix
Compute operations (Yantra - algorithms, matrices, DSP)
@ Yantra
DSP algorithms, computational units, matrix operations, Grammar.
std::unordered_map< std::string, std::any > metadata
Associated metadata.