package odin-algebra:algebraic_structures/euclidean_ring

⌘K
Ctrl+K
or
/

    Overview

    Interface for a Euclidean Ring euclidean_div - called to perform the operation euclidean_div operation such that left == right * quotient + remainder where remainder == 0 or norm(remainder) < norm(right) norm - rough measure of size for a type all functions can be called where 2 or 3 input parameters point to the same piece of memory.

    Index

    Variables (0)

    This section is empty.

    Procedure Groups (0)

    This section is empty.

    Types

    EuclideanRing ¶

    EuclideanRing :: struct($T: typeid) {
    	… // See source for fields
    }
     

    Interface for a Euclidean Ring: euclidean_div - called to perform the operation euclidean_div operation such that left == right * quotient + remainder where remainder == 0 or norm(remainder) < norm(right) norm - rough measure of size for a type all functions can be called where 2 or 3 input parameters point to the same piece of memory.

    Related Procedures With Parameters

    NumericEuclideanRing ¶

    NumericEuclideanRing :: struct($T: typeid) {
    	… // See source for fields
    }

    Constants

    EUCLIDEAN_RING_F32 ¶

    EUCLIDEAN_RING_F32: EuclideanRing($T=f32) : EuclideanRing(f32){integral_domain.INTEGRAL_DOMAIN_F32, euclidean_div_f32, norm_f32}

    EUCLIDEAN_RING_I64 ¶

    EUCLIDEAN_RING_I64: EuclideanRing($T=i64) : EuclideanRing(i64){integral_domain.INTEGRAL_DOMAIN_I64, euclidean_div_i64, norm_i64}

    EUCLIDEAN_RING_U32 ¶

    EUCLIDEAN_RING_U32: EuclideanRing($T=u32) : EuclideanRing(u32){integral_domain.INTEGRAL_DOMAIN_U32, euclidean_div_u32, norm_u32}

    Variables

    This section is empty.

    Procedures

    euclidean_div_f32 ¶

    euclidean_div_f32 :: proc(quot: ^f32, rem: ^f32, l: f32, r: f32) {…}

    euclidean_div_i64 ¶

    euclidean_div_i64 :: proc(quot: ^i64, rem: ^i64, l: i64, r: i64) {…}

    euclidean_div_u32 ¶

    euclidean_div_u32 :: proc(quot: ^u32, rem: ^u32, l: u32, r: u32) {…}

    gcd ¶

    gcd :: proc(p: $T, q: $T, ring: EuclideanRing($T)) -> $T {…}

    norm_f32 ¶

    norm_f32 :: proc(f: f32) -> u64 {…}

    norm_i64 ¶

    norm_i64 :: proc(u: i64) -> u64 {…}

    norm_u32 ¶

    norm_u32 :: proc(u: u32) -> u64 {…}

    test_euclidean_ring_axioms ¶

    test_euclidean_ring_axioms :: proc(t: ^testing.T, generator: prop_test.Generator($T), er: EuclideanRing($T)) {…}
     

    called to run prop based tests to see if a ring implementation violates the euclidean ring axioms

    Procedure Groups

    This section is empty.

    Source Files

    Generation Information

    Generated with odin version dev-2025-04 (vendor "odin") Linux_amd64 @ 2025-05-13 09:15:55.502102136 +0000 UTC