No matching definitions.

frame/sort

src/frame/sort.tur
defn

arrange-indices

(arrange-indices [f :int names :int dirs :int] :int)

compute the permutation that would sort the frame.

f:int frame
namescons list of :cstr column names
dirsparallel cons list of :int directions (0 = asc, 1 = desc)

:int cons list of row indices in sorted order; 0 if any name is missing.

Since: FR4

defn

reorder

(reorder [f :int indices :int] :int)

apply a permutation cons list to f (returns a new frame).

Since: FR4

defn

arrange

(arrange [f :int names :int dirs :int] :int)

return a new frame sorted by the given keys.

Internal definitions
__so-nil
__so-cons
__so-compute-perm-- given a frame and parallel arrays of (col_ix, dir),
__so-perm-free-- length of a perm array (we already passed n-rows but
__so-perm-nth-- read perm[i] (used by arrange-indices to build the
__so-take-- build a new column by applying `perm` (int64_t[n]) to `col`.
__so-name-at
__so-names-to-ixs
__so-list-length
__so-clone-field-at
__so-build-fields
__so-build-cols
__so-perm-to-list
__so-list-to-perm