1 个不稳定版本

0.1.1 2023年6月23日

#1311 in 数学


dynast 中使用

GPL-3.0-or-later

6KB
101

math-symbols

用于计算机代数系统的命名符号。符号名称集中存储,以便复制成本低且内存占用小。

示例

use math_symbols::*;

// Define a number of symbols with variable name equal to symbol name
symbols!(x, y, z);
assert_eq!(x.name(), "x");
assert_eq!(y.name(), "y");
assert_eq!(z.name(), "z");

// Symbols are identified by their names
let xx = Symbol::new("x");
assert_eq!(x, xx);

// Symbols are ordered by their creation time
assert!(x < y);

类似Crates

许可协议:GPL-3.0-or-later


lib.rs:

用于计算机代数系统的命名符号。符号名称集中存储,以便复制成本低且内存占用小。

示例

use math_symbols::*;

// Define a number of symbols with variable name equal to symbol name
symbols!(x, y, z);
assert_eq!(x.name(), "x");
assert_eq!(y.name(), "y");
assert_eq!(z.name(), "z");

// Symbols are identified by their names
let xx = Symbol::new("x");
assert_eq!(x, xx);

// Symbols are ordered by their creation time
assert!(x < y);

类似Crates

依赖

~1.2–1.9MB
~35K SLoC