Crates.io | lib_xalg |
lib.rs | lib_xalg |
version | 0.3.1 |
source | src |
created_at | 2019-07-19 02:54:32.457769 |
updated_at | 2019-07-23 14:42:47.245524 |
description | A library for generating random formulas |
homepage | |
repository | https://github.com/LEXUGE/xalg |
max_upload_size | |
id | 149994 |
size | 18,280 |
A library for generating random formulas.
use {
lib_xalg::{
formula::{OperatorFlag, OperatorFlag::*},
generate,
},
std::collections::HashSet,
};
let hashset = [Add, Sub, Mul, Div, Pow].iter().copied().collect::<HashSet<OperatorFlag>>();
println!("{}", generate(5, 3, 3, &hashset).unwrap());