Expand description
A balanced ternary data structure.
A Ternary object in this module represents a number in the balanced ternary numeral system.
Balanced ternary is a non-standard positional numeral system that uses three digits: {-1, 0, +1}
represented here as Neg for -1, Zero for 0, and Pos for +1. It is useful in some domains
of computer science and mathematics due to its arithmetic properties and representation
symmetry.
§Data Structures
DigitEnum: Represents a single digit for balanced ternary values, with possible values:Negfor -1Zerofor 0Posfor +1
Re-exports§
pub use crate::digit::Digit::Neg;pub use crate::digit::Digit::Pos;pub use crate::digit::Digit::Zero;
Structs§
- Ternary
- Represents a balanced ternary number using a sequence of
Digits. - Tryte
- The
Tryte<S>struct represents a Copy type balanced ternary number with exactly S digits (6 by default). Each digit in a balanced ternary system can have one of three values: -1, 0, or 1.
Enums§
- Digit
- Module: Balanced Ternary
Digit