I am the proud owner of a new crate. And you are too!
Thursday, January 3, 2019 at 09:28PM
Dustan Doud
 

Frank, the fetch and rank at Rust's website crate.io adds guarded fetching and ranking features to generic vectors.  I went a little fast and ripped apart a little program and poured its guts into a crate largely to learn rustdoc and how cargo publish works.... not my best documentation effort.. but I am happy with the generics vector functions and how they seamless bolt into rust programming language features.  And there can be updates should other people use my reasonably solid code with crummy documentation.

use frank::*;

fn main() {

let myvec = vec!["a is for apple", "b is for bear", "c is for code"]; 

let myranks = myvec.rank();  //Hoeffding 1947 style ranking, a count of greaters for each item in a vec. 

let mypicks = vec![2usize,1,0];

let myreorg = myvec.fetch(&mypicks); 

}

In truth, the fetch and rank are just about that simple to use.

Cheers,  Dusty

Article originally appeared on canceLLogic (http://www.cancellogic.com/).
See website for complete article licensing information.