Arcelyth/mqc/maths does not have a README file

    Array3

    type Array3[T]

    A mutable, fixed-shape three-dimensional array with contiguous storage. Coordinates (i, j, k) map to (i * dim1 + j) * dim2 + k.

    Array3::copy

    fn[T] Array3::copy(self : Array3[T]) -> Array3[T]

    Copy the backing storage and shape. Elements themselves are shallow-copied.

    Array3::get

    fn[T] Array3::get(self : Array3[T], i : Int, j : Int, k : Int) -> T?

    Read an element, or return None if any coordinate is out of bounds.

    Array3::length

    fn[T] Array3::length(self : Array3[T]) -> Int

    Array3::make

    fn[T] Array3::make(dim0 : Int, dim1 : Int, dim2 : Int, value : T) -> Array3[T]

    Create an array filled with the supplied value. Zero dimensions are valid. Aborts for negative dimensions or an element count exceeding Int32 capacity. Like Array::make, mutable element values are shared; use makei for fresh values.

    Array3::makei

    fn[T] Array3::makei(dim0 : Int, dim1 : Int, dim2 : Int, init : (Int, Int, Int) -> T) -> Array3[T]

    Initialize each coordinate once, in row-major order (last axis fastest). Empty arrays do not invoke init.

    Array3::set

    fn[T] Array3::set(self : Array3[T], i : Int, j : Int, k : Int, value : T) -> Bool

    Write an element. Return false without mutation if any coordinate is invalid.

    Array3::shape

    fn[T] Array3::shape(self : Array3[T]) -> (Int, Int, Int)

    Array3::to_array

    fn[T] Array3::to_array(self : Array3[T]) -> Array[T]

    Export an independent flat row-major array. Elements are shallow-copied.

    Complex

    pub(all) struct Complex {
    re : Double
    im : Double
    } derive(Eq,
    Debug
    )

    A complex number. Components are immutable.
    impl Add for Complex
    impl Mul for Complex
    impl Neg for Complex
    impl Sub for Complex

    Complex::add

    fn Complex::add(a : Complex, b : Complex) -> Complex

    Expose Add operations as methods on Complex.

    Complex::conjugate

    fn Complex::conjugate(self : Complex) -> Complex

    Return the complex conjugate by negating the imaginary part.

    Complex::equal

    fn Complex::equal(Complex, Complex) -> Bool

    Expose Eq operations as methods on Complex.

    Complex::is_finite

    fn Complex::is_finite(self : Complex) -> Bool

    Whether both parts are finite, with neither NaN nor infinity.

    Complex::mul

    fn Complex::mul(a : Complex, b : Complex) -> Complex

    Expose Mul operations as methods on Complex.

    Complex::neg

    fn Complex::neg(a : Complex) -> Complex

    Expose Neg operations as methods on Complex.

    Complex::new

    fn Complex::new(re : Double, im : Double) -> Complex

    Build a complex number from its real and imaginary parts. Values are stored as supplied; this constructor does not check finiteness.

    Complex::norm_squared

    fn Complex::norm_squared(self : Complex) -> Double

    Return re² + im², the squared magnitude. Large values may overflow.

    Complex::not_equal

    fn Complex::not_equal(x : Complex, y : Complex) -> Bool

    Expose Eq operations as methods on Complex.

    Complex::phase

    fn Complex::phase(angle : Double) -> Complex

    Return exp(i * angle), with the angle in radians.

    Complex::real

    fn Complex::real(re : Double) -> Complex

    Build a complex number with zero imaginary part.

    Complex::scale

    fn Complex::scale(self : Complex, factor : Double) -> Complex

    Multiply both parts by a real factor and return a new number.

    Complex::sub

    fn Complex::sub(a : Complex, b : Complex) -> Complex

    Expose Sub operations as methods on Complex.

    Complex::to_repr

    Expose Debug operations as methods on Complex.