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

◆ extract_numeric_data()

std::vector< std::span< double > > MayaFlux::Kakshya::extract_numeric_data ( const std::shared_ptr< SignalSourceContainer > &  container)

Extracts numeric data from container with fallback handling.

Parameters
containerContainer to extract from
Returns
Vector of double values from container data
Exceptions
std::runtime_errorif no numeric data can be extracted

Definition at line 171 of file ContainerUtils.cpp.

172{
173 if (!container || !container->has_data()) {
174 throw std::invalid_argument("Container is null or has no data");
175 }
176
177 auto container_data = container->get_data();
178
179 return container_data
180 | std::views::transform([](DataVariant& variant) -> std::span<double> {
181 return convert_variant_to_double(variant);
182 })
183 | std::ranges::to<std::vector>();
184}

References convert_variant_to_double().

+ Here is the call graph for this function: