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

◆ validate_extraction_input()

template<ComputeData InputType = std::vector<Kakshya::DataVariant>, ComputeData OutputType = std::vector<std::vector<double>>>
bool MayaFlux::Yantra::FeatureExtractor< InputType, OutputType >::validate_extraction_input ( const input_type input) const
inlineoverride

Input validation.

Definition at line 187 of file FeatureExtractor.hpp.

188 {
189 try {
190 if constexpr (RequiresContainer<input_type>) {
191 if (!input.has_container())
192 return false;
193 }
194 auto numeric_data = OperationHelper::extract_numeric_data(input.data);
195 if (numeric_data.empty())
196 return false;
197 for (const auto& span : numeric_data) {
199 }
200 return true;
201 } catch (const std::exception& e) {
202 MF_ERROR(Journal::Component::Yantra, Journal::Context::ComputeMatrix, "Input validation failed: {}", e.what());
203 return false;
204 }
205 }
#define MF_ERROR(comp, ctx,...)
static std::span< double > extract_numeric_data(const T &compute_data)
extract numeric data from single-variant types
@ ComputeMatrix
Compute operations (Yantra - algorithms, matrices, DSP)
@ Yantra
DSP algorithms, computational units, matrix operations, Grammar.
bool validate_window_parameters(uint32_t window_size, uint32_t hop_size, size_t data_size) noexcept
Validate window/hop parameters for windowed processing.
Definition Extract.cpp:5

References MayaFlux::Yantra::Datum< T >::data, MayaFlux::Yantra::Datum< T >::has_container(), and MF_ERROR.

+ Here is the call graph for this function: