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

◆ add_sorting_metadata()

template<ComputeData InputType = std::vector<Kakshya::DataVariant>, ComputeData OutputType = InputType>
virtual output_type MayaFlux::Yantra::UniversalSorter< InputType, OutputType >::add_sorting_metadata ( const output_type raw_output)
inlineprotectedvirtual

Add sorting metadata to results (override for custom attribution)

Definition at line 345 of file UniversalSorter.hpp.

346 {
347 output_type attributed = raw_output;
348 attributed.metadata["sorting_type"] = static_cast<int>(get_sorting_type());
349 attributed.metadata["sorter_name"] = get_sorter_name();
350 attributed.metadata["strategy"] = static_cast<int>(m_strategy);
351 attributed.metadata["direction"] = static_cast<int>(m_direction);
352 attributed.metadata["granularity"] = static_cast<int>(m_granularity);
353 return attributed;
354 }
virtual SortingType get_sorting_type() const =0
Gets the sorting type category for this sorter.
virtual std::string get_sorter_name() const
Get sorter-specific name (derived classes override this)
std::unordered_map< std::string, std::any > metadata
Associated metadata.
Definition DataIO.hpp:28

References MayaFlux::Yantra::UniversalSorter< InputType, OutputType >::get_sorter_name(), MayaFlux::Yantra::UniversalSorter< InputType, OutputType >::get_sorting_type(), MayaFlux::Yantra::UniversalSorter< InputType, OutputType >::m_direction, MayaFlux::Yantra::UniversalSorter< InputType, OutputType >::m_granularity, MayaFlux::Yantra::UniversalSorter< InputType, OutputType >::m_strategy, and MayaFlux::Yantra::Datum< T >::metadata.

Referenced by MayaFlux::Yantra::UniversalSorter< InputType, OutputType >::apply_granularity_formatting(), MayaFlux::Yantra::UniversalSorter< InputType, OutputType >::create_sorting_analysis(), and MayaFlux::Yantra::UniversalSorter< InputType, OutputType >::organize_into_groups().

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