Trait rustitude_core::Field

source ·
pub trait Field:
    RealField
    + Sum
    + Product
    + Copy
    + Clone
    + Default
    + Field
    + Float
    + FloatConst {
Show 16 associated constants and 46 methods const MIN_POSITIVE: Self; const MAX: Self; const MIN: Self; const INFINITY: Self; const NEG_INFINITY: Self; const ZERO: Self; const ONE: Self; const TWO: Self; const THREE: Self; const FOUR: Self; const FIVE: Self; const SIX: Self; const SEVEN: Self; const EIGHT: Self; const NINE: Self; const TEN: Self; // Required methods fn convert_f64(x: f64) -> Self; fn convert_f32(x: f32) -> Self; fn convert_usize(x: usize) -> Self; fn convert_isize(x: isize) -> Self; fn convert_u32(x: u32) -> Self; // Provided methods fn f(x: f64) -> Self { ... } fn fv(x: Vec<f64>) -> Vec<Self> { ... } fn fa<const N: usize>(x: [f64; N]) -> [Self; N] { ... } fn convert_array_f64<const N: usize>(x: [f64; N]) -> [Self; N] { ... } fn convert_vec_f64(x: Vec<f64>) -> Vec<Self> { ... } fn fabs(self) -> Self { ... } fn fsqrt(self) -> Self { ... } fn fcbrt(self) -> Self { ... } fn fpowi(self, n: i32) -> Self { ... } fn fpowf(self, n: Self) -> Self { ... } fn fsin(self) -> Self { ... } fn fcos(self) -> Self { ... } fn ftan(self) -> Self { ... } fn fasin(self) -> Self { ... } fn facos(self) -> Self { ... } fn fatan(self) -> Self { ... } fn fatan2(self, other: Self) -> Self { ... } fn fsinh(self) -> Self { ... } fn fcosh(self) -> Self { ... } fn ftanh(self) -> Self { ... } fn fasinh(self) -> Self { ... } fn facosh(self) -> Self { ... } fn fatanh(self) -> Self { ... } fn flog(self, base: Self) -> Self { ... } fn flog2(self) -> Self { ... } fn flog10(self) -> Self { ... } fn fln(self) -> Self { ... } fn fln_1p(self) -> Self { ... } fn fexp(self) -> Self { ... } fn fexp2(self) -> Self { ... } fn fexp_m1(self) -> Self { ... } fn fhypot(self, other: Self) -> Self { ... } fn frecip(self) -> Self { ... } fn fmul_add(self, a: Self, b: Self) -> Self { ... } fn ffloor(self) -> Self { ... } fn fceil(self) -> Self { ... } fn fround(self) -> Self { ... } fn ftrunc(self) -> Self { ... } fn ffract(self) -> Self { ... } fn fmin(self, other: Self) -> Self { ... } fn fmax(self, other: Self) -> Self { ... }
}
Expand description

A trait which describes a field of “Real” numbers which can be used in calculating amplitudes.

Required Associated Constants§

source

const MIN_POSITIVE: Self

source

const MAX: Self

source

const MIN: Self

source

const INFINITY: Self

source

const NEG_INFINITY: Self

source

const ZERO: Self

Alias for 0.0

source

const ONE: Self

Alias for 1.0

source

const TWO: Self

Alias for 2.0

source

const THREE: Self

Alias for 3.0

source

const FOUR: Self

Alias for 4.0

source

const FIVE: Self

Alias for 5.0

source

const SIX: Self

Alias for 6.0

source

const SEVEN: Self

Alias for 7.0

source

const EIGHT: Self

Alias for 8.0

source

const NINE: Self

Alias for 9.0

source

const TEN: Self

Alias for 10.0

Required Methods§

source

fn convert_f64(x: f64) -> Self

Converts an f64 into a Field.

source

fn convert_f32(x: f32) -> Self

Converts an f32 into a Field.

source

fn convert_usize(x: usize) -> Self

Converts a usize into a Field.

source

fn convert_isize(x: isize) -> Self

Converts an isize into a Field.

source

fn convert_u32(x: u32) -> Self

Converts a u32 into a Field.

Provided Methods§

source

fn f(x: f64) -> Self

Shorthand to convert an f64 into a Field. See also: Field::convert_f64.

source

fn fv(x: Vec<f64>) -> Vec<Self>

Shorthand to convert a Vec<f64> into a Vec<Field>. See also: Field::convert_vec_f64.

source

fn fa<const N: usize>(x: [f64; N]) -> [Self; N]

Shorthand to convert a [f64; N] into a [Field; N]. See also: Field::convert_array_f64.

source

fn convert_array_f64<const N: usize>(x: [f64; N]) -> [Self; N]

Converts a [f64; N] into a [Field; N].

source

fn convert_vec_f64(x: Vec<f64>) -> Vec<Self>

Converts a Vec<f64> into a Vec<Field>.

source

fn fabs(self) -> Self

Shorthand for num::Float::abs.

source

fn fsqrt(self) -> Self

Shorthand for num::Float::sqrt.

source

fn fcbrt(self) -> Self

Shorthand for num::Float::cbrt.

source

fn fpowi(self, n: i32) -> Self

Shorthand for num::Float::powi.

source

fn fpowf(self, n: Self) -> Self

Shorthand for num::Float::powf.

source

fn fsin(self) -> Self

Shorthand for num::Float::sin.

source

fn fcos(self) -> Self

Shorthand for num::Float::cos.

source

fn ftan(self) -> Self

Shorthand for num::Float::tan.

source

fn fasin(self) -> Self

Shorthand for num::Float::asin.

source

fn facos(self) -> Self

Shorthand for num::Float::acos.

source

fn fatan(self) -> Self

Shorthand for num::Float::atan.

source

fn fatan2(self, other: Self) -> Self

source

fn fsinh(self) -> Self

Shorthand for num::Float::sinh.

source

fn fcosh(self) -> Self

Shorthand for num::Float::cosh.

source

fn ftanh(self) -> Self

Shorthand for num::Float::tanh.

source

fn fasinh(self) -> Self

Shorthand for num::Float::asinh.

source

fn facosh(self) -> Self

Shorthand for num::Float::acosh.

source

fn fatanh(self) -> Self

Shorthand for num::Float::atanh.

source

fn flog(self, base: Self) -> Self

Shorthand for num::Float::log.

source

fn flog2(self) -> Self

Shorthand for num::Float::log2.

source

fn flog10(self) -> Self

Shorthand for num::Float::log10.

source

fn fln(self) -> Self

Shorthand for num::Float::ln.

source

fn fln_1p(self) -> Self

Shorthand for num::Float::ln_1p.

source

fn fexp(self) -> Self

Shorthand for num::Float::exp.

source

fn fexp2(self) -> Self

Shorthand for num::Float::exp2.

source

fn fexp_m1(self) -> Self

Shorthand for num::Float::exp_m1.

source

fn fhypot(self, other: Self) -> Self

Shorthand for num::Float::hypot.

source

fn frecip(self) -> Self

Shorthand for num::Float::recip.

source

fn fmul_add(self, a: Self, b: Self) -> Self

Shorthand for num::Float::mul_add.

source

fn ffloor(self) -> Self

Shorthand for num::Float::floor.

source

fn fceil(self) -> Self

Shorthand for num::Float::ceil.

source

fn fround(self) -> Self

Shorthand for num::Float::round.

source

fn ftrunc(self) -> Self

Shorthand for num::Float::trunc.

source

fn ffract(self) -> Self

Shorthand for num::Float::fract.

source

fn fmin(self, other: Self) -> Self

Shorthand for num::Float::min.

source

fn fmax(self, other: Self) -> Self

Shorthand for num::Float::max.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Field for f32

source§

const MIN_POSITIVE: Self = 1.17549435E-38f32

source§

const MAX: Self = 3.40282347E+38f32

source§

const MIN: Self = -3.40282347E+38f32

source§

const INFINITY: Self = +Inf_f32

source§

const NEG_INFINITY: Self = -Inf_f32

source§

const ZERO: Self = 0f32

source§

const ONE: Self = 1f32

source§

const TWO: Self = 2f32

source§

const THREE: Self = 3f32

source§

const FOUR: Self = 4f32

source§

const FIVE: Self = 5f32

source§

const SIX: Self = 6f32

source§

const SEVEN: Self = 7f32

source§

const EIGHT: Self = 8f32

source§

const NINE: Self = 9f32

source§

const TEN: Self = 10f32

source§

fn convert_f64(x: f64) -> Self

source§

fn convert_f32(x: f32) -> Self

source§

fn convert_usize(x: usize) -> Self

source§

fn convert_isize(x: isize) -> Self

source§

fn convert_u32(x: u32) -> Self

source§

impl Field for f64

source§

const MIN_POSITIVE: Self = 2.2250738585072014E-308f64

source§

const MAX: Self = 1.7976931348623157E+308f64

source§

const MIN: Self = -1.7976931348623157E+308f64

source§

const INFINITY: Self = +Inf_f64

source§

const NEG_INFINITY: Self = -Inf_f64

source§

const ZERO: Self = 0f64

source§

const ONE: Self = 1f64

source§

const TWO: Self = 2f64

source§

const THREE: Self = 3f64

source§

const FOUR: Self = 4f64

source§

const FIVE: Self = 5f64

source§

const SIX: Self = 6f64

source§

const SEVEN: Self = 7f64

source§

const EIGHT: Self = 8f64

source§

const NINE: Self = 9f64

source§

const TEN: Self = 10f64

source§

fn convert_f64(x: f64) -> Self

source§

fn convert_f32(x: f32) -> Self

source§

fn convert_usize(x: usize) -> Self

source§

fn convert_isize(x: isize) -> Self

source§

fn convert_u32(x: u32) -> Self

Implementors§