Crates.io | ordist |
lib.rs | ordist |
version | 0.2.0 |
source | src |
created_at | 2020-11-02 07:57:02.107228 |
updated_at | 2020-11-07 09:16:44.014592 |
description | Order distance package |
homepage | |
repository | https://github.com/doraneko94/ordist |
max_upload_size | |
id | 307775 |
size | 26,771 |
Order distance package.
use ordist::distances::*;
use ordist::permutation::*;
fn main() {
let v1 = vec![1, 2, 3, 4, 5];
let v2 = vec![3, 4, 1, 2, 5];
println!(
"{} == {}",
cayley_dist(&v1, &v2).unwrap(),
v1.len() - n_circle(&v1, &v2).unwrap()
);
}