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

◆ sort_channels_extract()

std::vector< std::span< double > > MayaFlux::Yantra::sort_channels_extract ( const std::vector< std::span< const double > > &  channels,
std::vector< std::vector< double > > &  output_storage,
SortingDirection  direction,
SortingAlgorithm  algorithm 
)

Sort multiple channels and return copies.

Parameters
channelsVector of input spans
output_storageVector of vectors to store sorted data per channel
directionSort direction
algorithmSort algorithm
Returns
Vector of spans pointing to sorted data in output_storage

Definition at line 39 of file SortingHelper.cpp.

44{
45 output_storage.resize(channels.size());
46
47 std::vector<std::span<double>> output_spans;
48 output_spans.reserve(channels.size());
49
50 for (size_t i = 0; i < channels.size(); ++i) {
51 auto output_span = sort_span_extract(channels[i], output_storage[i], direction, algorithm);
52 output_spans.push_back(output_span);
53 }
54
55 return output_spans;
56}
std::span< double > sort_span_extract(std::span< const double > data, std::vector< double > &output_storage, SortingDirection direction, SortingAlgorithm algorithm)
Sort a single span and return copy in output vector.

References sort_span_extract().

+ Here is the call graph for this function: