Expand description
§commutator-rs
A Rust library for commutator operations.
§Quick Start
use commutator_rs::{prelude::*, comm};
let x = CommutatorTerm::Atom { coefficient: 1, atom: 'x' };
let y = CommutatorTerm::Atom { coefficient: 1, atom: 'y' };
// Using the trait method
let result1 = x.commutator(&y);
// Using the comm! macro
let result2 = comm![x, y];
assert_eq!(result1, result2);Re-exports§
pub use commutator::Commutator;pub use commutator::CommutatorTerm;pub use formal_indeterminate::FormalIndeterminate;
Modules§
- commutator
- formal_
indeterminate - prelude
- Prelude module for imports
Macros§
- comm
- Shorthand macro for computing commutators
[A, B].