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§
sourceconst MIN_POSITIVE: Self
const MIN_POSITIVE: Self
sourceconst INFINITY: Self
const INFINITY: Self
See f64::INFINITY
sourceconst NEG_INFINITY: Self
const NEG_INFINITY: Self
Required Methods§
sourcefn convert_f64(x: f64) -> Self
fn convert_f64(x: f64) -> Self
Converts an f64 into a Field.
sourcefn convert_f32(x: f32) -> Self
fn convert_f32(x: f32) -> Self
Converts an f32 into a Field.
sourcefn convert_usize(x: usize) -> Self
fn convert_usize(x: usize) -> Self
Converts a usize into a Field.
sourcefn convert_isize(x: isize) -> Self
fn convert_isize(x: isize) -> Self
Converts an isize into a Field.
sourcefn convert_u32(x: u32) -> Self
fn convert_u32(x: u32) -> Self
Converts a u32 into a Field.
Provided Methods§
sourcefn f(x: f64) -> Self
fn f(x: f64) -> Self
Shorthand to convert an f64 into a Field.
See also: Field::convert_f64.
sourcefn fv(x: Vec<f64>) -> Vec<Self>
fn fv(x: Vec<f64>) -> Vec<Self>
Shorthand to convert a Vec<f64> into a Vec<Field>.
See also: Field::convert_vec_f64.
sourcefn fa<const N: usize>(x: [f64; N]) -> [Self; N]
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.
sourcefn convert_array_f64<const N: usize>(x: [f64; N]) -> [Self; N]
fn convert_array_f64<const N: usize>(x: [f64; N]) -> [Self; N]
Converts a [f64; N] into a [Field; N].
sourcefn convert_vec_f64(x: Vec<f64>) -> Vec<Self>
fn convert_vec_f64(x: Vec<f64>) -> Vec<Self>
Converts a Vec<f64> into a Vec<Field>.
sourcefn fabs(self) -> Self
fn fabs(self) -> Self
Shorthand for num::Float::abs.
sourcefn fsqrt(self) -> Self
fn fsqrt(self) -> Self
Shorthand for num::Float::sqrt.
sourcefn fcbrt(self) -> Self
fn fcbrt(self) -> Self
Shorthand for num::Float::cbrt.
sourcefn fpowi(self, n: i32) -> Self
fn fpowi(self, n: i32) -> Self
Shorthand for num::Float::powi.
sourcefn fpowf(self, n: Self) -> Self
fn fpowf(self, n: Self) -> Self
Shorthand for num::Float::powf.
sourcefn fsin(self) -> Self
fn fsin(self) -> Self
Shorthand for num::Float::sin.
sourcefn fcos(self) -> Self
fn fcos(self) -> Self
Shorthand for num::Float::cos.
sourcefn ftan(self) -> Self
fn ftan(self) -> Self
Shorthand for num::Float::tan.
sourcefn fasin(self) -> Self
fn fasin(self) -> Self
Shorthand for num::Float::asin.
sourcefn facos(self) -> Self
fn facos(self) -> Self
Shorthand for num::Float::acos.
sourcefn fatan(self) -> Self
fn fatan(self) -> Self
Shorthand for num::Float::atan.
sourcefn fatan2(self, other: Self) -> Self
fn fatan2(self, other: Self) -> Self
Shorthand for nalgebra::RealField::atan2.
sourcefn fsinh(self) -> Self
fn fsinh(self) -> Self
Shorthand for num::Float::sinh.
sourcefn fcosh(self) -> Self
fn fcosh(self) -> Self
Shorthand for num::Float::cosh.
sourcefn ftanh(self) -> Self
fn ftanh(self) -> Self
Shorthand for num::Float::tanh.
sourcefn fasinh(self) -> Self
fn fasinh(self) -> Self
Shorthand for num::Float::asinh.
sourcefn facosh(self) -> Self
fn facosh(self) -> Self
Shorthand for num::Float::acosh.
sourcefn fatanh(self) -> Self
fn fatanh(self) -> Self
Shorthand for num::Float::atanh.
sourcefn flog(self, base: Self) -> Self
fn flog(self, base: Self) -> Self
Shorthand for num::Float::log.
sourcefn flog2(self) -> Self
fn flog2(self) -> Self
Shorthand for num::Float::log2.
sourcefn flog10(self) -> Self
fn flog10(self) -> Self
Shorthand for num::Float::log10.
sourcefn fln(self) -> Self
fn fln(self) -> Self
Shorthand for num::Float::ln.
sourcefn fln_1p(self) -> Self
fn fln_1p(self) -> Self
Shorthand for num::Float::ln_1p.
sourcefn fexp(self) -> Self
fn fexp(self) -> Self
Shorthand for num::Float::exp.
sourcefn fexp2(self) -> Self
fn fexp2(self) -> Self
Shorthand for num::Float::exp2.
sourcefn fexp_m1(self) -> Self
fn fexp_m1(self) -> Self
Shorthand for num::Float::exp_m1.
sourcefn fhypot(self, other: Self) -> Self
fn fhypot(self, other: Self) -> Self
Shorthand for num::Float::hypot.
sourcefn frecip(self) -> Self
fn frecip(self) -> Self
Shorthand for num::Float::recip.
sourcefn fmul_add(self, a: Self, b: Self) -> Self
fn fmul_add(self, a: Self, b: Self) -> Self
Shorthand for num::Float::mul_add.
sourcefn ffloor(self) -> Self
fn ffloor(self) -> Self
Shorthand for num::Float::floor.
sourcefn fceil(self) -> Self
fn fceil(self) -> Self
Shorthand for num::Float::ceil.
sourcefn fround(self) -> Self
fn fround(self) -> Self
Shorthand for num::Float::round.
sourcefn ftrunc(self) -> Self
fn ftrunc(self) -> Self
Shorthand for num::Float::trunc.
sourcefn ffract(self) -> Self
fn ffract(self) -> Self
Shorthand for num::Float::fract.
sourcefn fmin(self, other: Self) -> Self
fn fmin(self, other: Self) -> Self
Shorthand for num::Float::min.
sourcefn fmax(self, other: Self) -> Self
fn fmax(self, other: Self) -> Self
Shorthand for num::Float::max.