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

◆ convert_and_sort()

template<ComputeData InputType = Kakshya::DataVariant, ComputeData OutputType = InputType>
output_type MayaFlux::Yantra::StandardSorter< InputType, OutputType >::convert_and_sort ( const input_type input)
inlineprivate

Handle type conversion scenarios.

Definition at line 340 of file StandardSorter.hpp.

341 {
342 std::vector<std::vector<double>> working_buffer;
343 auto [working_spans, structure_info] = OperationHelper::setup_operation_buffer(
344 const_cast<input_type&>(input), working_buffer);
345
346 Kinesis::Discrete::sort_channels(working_spans, this->get_direction(), SortingAlgorithm::PARTIAL);
347 return this->convert_result(working_buffer, structure_info);
348 }
output_type convert_result(std::vector< std::vector< double > > &result_data, DataStructureInfo &metadata)
Convert processed double data back to OutputType using metadata and optional callback.
static auto setup_operation_buffer(T &input, std::vector< std::vector< double > > &working_buffer)
Setup operation buffer from Datum or ComputeData type.
typename base_type::input_type input_type
SortingDirection get_direction() const
void sort_channels(std::vector< std::span< double > > &channels, SortingDirection direction, SortingAlgorithm algorithm)
Sort all channels in-place.
Definition Sort.cpp:19