MCPcopy Create free account
hub / github.com/ashvardanian/StringZilla / argsort

Function argsort

include/stringzilla/stringzilla.hpp:4778–4784  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4776 */
4777template <typename container_type_, typename string_extractor_>
4778std::vector<sorted_idx_t> argsort( //
4779 container_type_ const &container, string_extractor_ const &extractor) noexcept(false) {
4780 std::vector<sorted_idx_t> order(container.size());
4781 status_t status = try_argsort(container, extractor, order.data());
4782 raise(status);
4783 return order;
4784}
4785
4786/**
4787 * @brief Computes the permutation of an array, that would lead to sorted order.

Callers 1

Calls 4

try_argsortFunction · 0.85
raiseFunction · 0.85
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…