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

◆ generate_compute_data_indices()

template<ComputeData T>
std::vector< std::vector< size_t > > MayaFlux::Yantra::generate_compute_data_indices ( const IO< T > &  data,
SortingDirection  direction 
)

Generate sort indices for any ComputeData type.

Template Parameters
TComputeData type
Parameters
dataData to generate indices for
directionSort direction
Returns
Vector of index vectors (one per channel)

Definition at line 334 of file SortingHelper.hpp.

336{
337 if constexpr (RequiresContainer<T>) {
338 auto channels = OperationHelper::extract_numeric_data(data.data, data.container.value());
339 return generate_channels_sort_indices(channels, direction);
340 }
341
342 if constexpr (SingleVariant<T>) {
343 auto channel = OperationHelper::extract_numeric_data(data.data);
344 return { generate_span_sort_indices({ channel }, direction) };
345 } else {
346 auto channels = OperationHelper::extract_numeric_data(data.data, data.needs_processig());
347 return generate_channels_sort_indices(channels, direction);
348 }
349}
std::vector< std::vector< size_t > > generate_channels_sort_indices(const std::vector< std::span< double > > &channels, SortingDirection direction)
Generate sort indices for multiple channels.
bool needs_processig() const
Check if processing is needed (for container types)
Definition DataIO.hpp:164
T data
The actual computation data.
Definition DataIO.hpp:25
std::optional< std::shared_ptr< Kakshya::SignalSourceContainer > > container
Optional reference to container, required for regions.
Definition DataIO.hpp:31

References MayaFlux::Yantra::IO< T >::container, MayaFlux::Yantra::IO< T >::data, MayaFlux::Yantra::OperationHelper::extract_numeric_data(), generate_channels_sort_indices(), generate_span_sort_indices(), and MayaFlux::Yantra::IO< T >::needs_processig().

Referenced by MayaFlux::Yantra::StandardSorter< InputType, OutputType >::sort_indices_only().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: