MCPcopy Create free account
hub / github.com/cogentcore/core / SortStableColumnName

Method SortStableColumnName

tensor/table/indexview.go:250–258  ·  view source on GitHub ↗

SortStableColumnName sorts the indexes into our Table according to values in given column name, using either ascending or descending order. Only valid for 1-dimensional columns. Returns error if column name not found.

(column string, ascending bool)

Source from the content-addressed store, hash-verified

248// Only valid for 1-dimensional columns.
249// Returns error if column name not found.
250func (ix *IndexView) SortStableColumnName(column string, ascending bool) error {
251 ci, err := ix.Table.ColumnIndexTry(column)
252 if err != nil {
253 log.Println(err)
254 return err
255 }
256 ix.SortStableColumn(ci, ascending)
257 return nil
258}
259
260// SortStableColumn sorts the indexes into our Table according to values in
261// given column index, using either ascending or descending order.

Callers

nothing calls this directly

Calls 3

SortStableColumnMethod · 0.95
ColumnIndexTryMethod · 0.80
PrintlnMethod · 0.80

Tested by

no test coverage detected