pub struct f16(/* private fields */);Expand description
A half-precision floating point number.
Trait Implementations§
Source§impl ComplexProducts for f16
impl ComplexProducts for f16
Source§impl ProbabilitySimilarity for f16
impl ProbabilitySimilarity for f16
Source§fn jensenshannon(a: &[Self], b: &[Self]) -> Option<f64>
fn jensenshannon(a: &[Self], b: &[Self]) -> Option<f64>
Computes the Jensen-Shannon divergence between two probability distributions.
The Jensen-Shannon divergence is a method of measuring the similarity between
two probability distributions. It is based on the Kullback-Leibler divergence,
but is symmetric and always has a finite value.
Source§fn kullbackleibler(a: &[Self], b: &[Self]) -> Option<f64>
fn kullbackleibler(a: &[Self], b: &[Self]) -> Option<f64>
Computes the Kullback-Leibler divergence between two probability distributions.
The Kullback-Leibler divergence is a measure of how one probability distribution
diverges from a second, expected probability distribution.
Source§impl SpatialSimilarity for f16
impl SpatialSimilarity for f16
Source§fn cos(a: &[Self], b: &[Self]) -> Option<f64>
fn cos(a: &[Self], b: &[Self]) -> Option<f64>
Computes the cosine similarity between two slices.
The cosine similarity is a measure of similarity between two non-zero vectors
of an dot product space that measures the cosine of the angle between them.
Source§fn dot(a: &[Self], b: &[Self]) -> Option<f64>
fn dot(a: &[Self], b: &[Self]) -> Option<f64>
Computes the inner product (also known as dot product) between two slices.
The dot product is the sum of the products of the corresponding entries
of the two sequences of numbers.
Source§fn l2sq(a: &[Self], b: &[Self]) -> Option<f64>
fn l2sq(a: &[Self], b: &[Self]) -> Option<f64>
Computes the squared Euclidean distance between two slices.
The squared Euclidean distance is the sum of the squared differences
between corresponding elements of the two slices.
Source§fn sqeuclidean(a: &[Self], b: &[Self]) -> Option<f64>
fn sqeuclidean(a: &[Self], b: &[Self]) -> Option<f64>
Computes the squared Euclidean distance between two slices.
The squared Euclidean distance is the sum of the squared differences
between corresponding elements of the two slices.
Auto Trait Implementations§
impl Freeze for f16
impl RefUnwindSafe for f16
impl Send for f16
impl Sync for f16
impl Unpin for f16
impl UnwindSafe for f16
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more