10 个不稳定版本 (3 个重大更改)
使用旧的 Rust 2015
0.4.1 | 2022年7月21日 |
---|---|
0.4.0 | 2022年1月25日 |
0.3.0 | 2022年1月24日 |
0.2.5 | 2017年7月17日 |
0.1.0 | 2017年3月26日 |
#349 在 算法 中
每月下载量 27,662
在 53 个 包中使用 (22 直接使用)
41KB
600 行
Rust 排列
排列是一个用于操作和应用的 Rust 库。
//! A module for representing permutations, applying them to slices and indices,
//! and computing them from sort orders.
//!
//! Some practical uses of this module are:
//! * Calculate a sort, and apply it later.
//! * Calculate a sort on one vector, and apply it to multiple other vectors.
//! * Calculate the new index of an element before sorting.
//! * Remember the prior index of an element after sorting.
//! * Undo a sort.
//! * Compare the orderings of elements.
许可证
Apache-2.0 和 MIT 双许可
致谢
版权所有 2017-2022 Jeremy Salwen [email protected] 和贡献者
- Patrick Chieppe
- Sean Prendi
- Philippe Solodov
- Andrii Borziak
lib.rs
:
一个表示排列、将它们应用于切片和索引以及从排序顺序计算排列的模块。
此模块的一些实际用途包括
- 计算一个排序,并在以后应用它。
- 在一个向量上计算排序,并将其应用于另一个向量。
- 在一个向量上计算排序,并将其应用于多个其他向量。
- 计算排序前元素的新的索引。
- 记住排序后元素的先前索引。
- 撤销排序。
- 比较元素的顺序。