General abstraction and structures for Luna Project
No dependencies
Published modules that use this version
pub(open) trait AddGroup : AddMonoid + Neg {}
pub(open) trait AddMonoid : Add + Zero {}
pub(open) trait Conjugate { conjugate(Self) -> Self}
pub(open) trait Inverse { inv(Self) -> Self}
impl Inverse for Int
fn inv(a : Int) -> Int
impl Inverse for Float
fn inv(a : Float) -> Float
impl Inverse for Double
fn inv(a : Double) -> Double
pub(open) trait MulGroup : MulMonoid + Inverse {}
pub(open) trait MulMonoid : Mul + One {}
pub(open) trait Num : Ring { abs(Self) -> Self signum(Self) -> Self}
impl Num for Int
fn abs(a : Int) -> Int
fn signum(a : Int) -> Int
impl Num for Float
fn abs(a : Float) -> Float
fn signum(a : Float) -> Float
impl Num for Double
fn abs(a : Double) -> Double
fn signum(a : Double) -> Double
pub(open) trait One { one() -> Self}
impl One for Int
fn one() -> Int
impl One for Float
fn one() -> Float
impl One for Double
fn one() -> Double
pub(open) trait Ring : Semiring + Neg {}
pub(open) trait Semiring : AddMonoid + MulMonoid {}
pub(open) trait Zero { zero() -> Self}
impl Zero for Int
fn zero() -> Int
impl Zero for Float
fn zero() -> Float
impl Zero for Double
fn zero() -> Double
Install
Powered by MoonBit
© 2026 mooncakes.io