Hcomplex
Lightweight complex and hypercomplex algebra library
Install / Use
/learn @agerasev/HcomplexREADME
hcomplex
Lightweight complex and hypercomplex algebra library.
Contents
- Complex and hypercomplex numbers:
Complex<T>- 2-dimensional commutative and associative algebra.Quaternion<T>- 4-dimensional associative but non-commutative algebra.Octonion<T>- 8-dimensional non-commutative and non-associative algebra.Sedenion<T>- 16-dimensional non-commutative and non-associative algebra with nontrivial zero divisors.- and following algebras created by Cayley-Dickson construction
Construct<T, A<T>>whereA<T>is previous algebra.
- Transformations:
transform::Moebius<T, A<T>>- Moebius transform, whereA<T>is some algebra.
To construct hypercomplex types from your own type you need to implement Algebra trait for it.
Crate Features
Crate could be used in no_std mode.
std- Usestd. Enabled by default.random- Hypercomplex number random generator.approx- Approximate comparison of hypercomplex numbers.
Testing
cargo test --features random,approx
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Related Skills
node-connect
351.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
351.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
351.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
