Skip to content

Latest commit

 

History

74 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mylib-rs

My Rust Utilities

Quick Start

运行测试

cargo test

生成并查看文档

cargo doc --workspace --open

Quick Start With xtask

cargo xtask ci

依次执行:

  1. 格式化检查 (cargo fmt --all --check)
  2. Clippy lint (cargo clippy --workspace --all-targets --all-features -D warnings)
  3. 单元测试 (cargo test --workspace --all-targets)
  4. 文档生成 (cargo doc --workspace --all-features --no-deps)
  5. Miri 检查 (cargo +nightly miri test ...)
cargo xtask run fmt
cargo xtask run test -- --nocapture
cargo xtask run clippy -- -D clippy::pedantic

将执行单个任务

Plan

  • math
    • num 数值库:包含常用数值 trait、分数 Frac、复数 Complex、向量 Vector2/Vector3、矩阵 Matrix
    • bignum 高精度数值库:包含高精度整数 BigInteger、高精度浮点数 BigDecimal
    • expr 表达式库:包含表达式求值 Expr
    • graph 图算法库
  • net
    • http 服务器
  • data structure
    • 红黑树:RBTreeMap
    • 斐波那契堆:FibonacciHeap,给 graph 用
    • 并查集:UnionFind,给 graph 用
    • 线段树:SegmentTree,数组实现,支持区间求和/最大/最小查询和更新
    • 树状数组:FenwickTree,数组实现,支持区间前缀和/更新,O(log n)
    • trie 树:Trie
    • hierarchy 层次结构库:包含 LCRS 封装层次结构 LCRSTree、Vec 存储层次结构 Tree,提供统一接口

Task

num crate 重构

  1. 运算底层编写独立函数,上层封装多种引用模式,并与多种标量互运算,使用宏简化
  2. unchecked 函数推荐加#[inline(always)],将所有 unsafe 函数放在一个独立的 impl 块中

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages