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

◆ set_extraction_parameter()

template<ComputeData InputType = std::vector<Kakshya::DataVariant>, ComputeData OutputType = std::vector<std::vector<double>>>
void MayaFlux::Yantra::FeatureExtractor< InputType, OutputType >::set_extraction_parameter ( const std::string &  name,
std::any  value 
)
inlineoverrideprotected

Handle extractor-specific parameters.

Definition at line 312 of file FeatureExtractor.hpp.

313 {
314 if (name == "method") {
315 if (auto* method_str = std::any_cast<std::string>(&value)) {
316 m_method = string_to_method(*method_str);
317 return;
318 }
319 if (auto* method_enum = std::any_cast<ExtractionMethod>(&value)) {
320 m_method = *method_enum;
321 return;
322 }
323 throw std::invalid_argument("Method parameter must be string or ExtractionMethod enum");
324 }
325 if (name == "window_size") {
326 if (auto* size = std::any_cast<uint32_t>(&value)) {
327 m_window_size = *size;
329 return;
330 }
331 }
332 if (name == "hop_size") {
333 if (auto* size = std::any_cast<uint32_t>(&value)) {
334 m_hop_size = *size;
336 return;
337 }
338 }
339
340 base_type::set_extraction_parameter(name, std::move(value));
341 }
void validate_parameters() const
Validate extraction parameters.
static ExtractionMethod string_to_method(const std::string &str)
Convert string to extraction method enum.
virtual void set_extraction_parameter(const std::string &name, std::any value)
Extraction-specific parameter handling (override for custom parameters)