Crates.io | gap-sys |
lib.rs | gap-sys |
version | 0.2.3 |
source | src |
created_at | 2023-07-01 21:13:32.690212 |
updated_at | 2023-07-01 21:13:32.690212 |
description | Rust bindings to GAP - Groups, Algorithms, Programming - a System for Computational Discrete Algebra |
homepage | https://www.gap-system.org/ |
repository | https://github.com/symbolica-ai/gap-sys |
max_upload_size | |
id | 905709 |
size | 12,264 |
This crate contains bindings to GAP - Groups, Algorithms, Programming - a System for Computational Discrete Algebra. It is currently in a very early state, and contribution is encouraged.
let mut gap = Gap::init();
let gap_element = gap.eval("Group((1,2,3),(1,2));").unwrap();
assert_eq!(gap.elem_string(&gap_element), "Group( [ (1,2,3), (1,2) ] )");
let mut gap = Gap::init();
let outer_list = gap.eval("[[1, 2, 3], [4, 5, 6]];;").unwrap();
let inner_list = gap.get_list_elem(&outer_list, 1).unwrap();
let element = gap.get_list_elem(&inner_list, 1).unwrap();
let string = gap.elem_string(&element);
assert_eq!(string, "5");