pub enum ArrayOp {
CosineSimilarity,
Distance,
InnerProduct,
DotProduct,
CrossProduct,
SquaredDistance,
Intersect,
}Expand description
Array math functions — element-wise operations on numeric lists.
These correspond to the C++ array functions in function/array/:
array_cosine_similarity(a, b)→ cosine similarity between two arraysarray_distance(a, b)→ Euclidean distance between two arraysarray_inner_product(a, b)→ dot/inner product of two arraysarray_cross_product(a, b)→ 3D cross product of two arraysarray_squared_distance(a, b)→ squared Euclidean distance
Variants§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ArrayOp
impl RefUnwindSafe for ArrayOp
impl Send for ArrayOp
impl Sync for ArrayOp
impl Unpin for ArrayOp
impl UnsafeUnpin for ArrayOp
impl UnwindSafe for ArrayOp
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more