MCPcopy Create free account
hub / github.com/ciphermodelabs/ciphercore / sort

Method sort

ciphercore-base/src/graphs.rs:877–879  ·  view source on GitHub ↗

Adds a node that sorts a table given as named tuple according to the column given by the key argument. The key column must be a 2-d BIT array of shape [n, b], interpreted as bitstrings of length b. Other columns in the named tuple must be arrays of arbitrary type and shape, as long as they share the first dimension: [n, ...]. Bitstrings are sorted lexicographically, and the sorting algorithm is st

(&self, key: String)

Source from the content-addressed store, hash-verified

875 /// let a = a.sort("key".to_string()).unwrap();
876 /// ```
877 pub fn sort(&self, key: String) -> Result<Node> {
878 self.get_graph().sort(self.clone(), key)
879 }
880
881 /// Adds a node to the parent graph that divides a scalar or each entry of the array associated with the node by a positive constant integer `scale`.
882 ///

Callers 15

process_nodeMethod · 0.80
test_sortFunction · 0.80
is_validMethod · 0.80
instantiateMethod · 0.80
test_helperFunction · 0.80
instantiateMethod · 0.80
prepare_contextFunction · 0.80
evaluateFunction · 0.80
create_binary_sort_graphFunction · 0.80

Calls 3

cloneMethod · 0.80
add_nodeMethod · 0.80
get_graphMethod · 0.45

Tested by 7

test_sortFunction · 0.64
test_helperFunction · 0.64
test_sortFunction · 0.64