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

◆ sort_indices_only()

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

Generate sort indices only.

Definition at line 188 of file StandardSorter.hpp.

189 {
190 if constexpr (std::same_as<OutputType, std::vector<size_t>>) {
191 auto result = output_type {};
192 result.data = generate_compute_data_indices(input, this->get_direction());
193 result.metadata = input.metadata;
194 result.metadata["sort_type"] = "indices_only";
195 return result;
196 } else {
197 // If output type is not vector<size_t>, fall back to copy sort
198 return sort_copy(input);
199 }
200 }
output_type sort_copy(const input_type &input)
Copy-based sorting (preserves input)
typename base_type::output_type output_type
SortingDirection get_direction() const
std::vector< std::vector< size_t > > generate_compute_data_indices(const IO< T > &data, SortingDirection direction)
Generate sort indices for any ComputeData type.
T data
The actual computation data.
Definition DataIO.hpp:25

References MayaFlux::Yantra::generate_compute_data_indices().

+ Here is the call graph for this function: