pub trait HyperSpheresSketch<I>: Sized + SetLike<I>where
I: Copy + Default + Add<Output = I> + Sub<Output = I> + Div<Output = I> + Mul<Output = I> + AddAssign + Debug + One + MaxMin,{
// Provided methods
fn overlap_and_differences_cardinality_matrices<const L: usize, const R: usize>(
left: &[Self; L],
right: &[Self; R],
) -> ([[I; R]; L], [I; L], [I; R]) { ... }
fn normalized_overlap_and_differences_cardinality_matrices<const L: usize, const R: usize>(
left: &[Self; L],
right: &[Self; R],
) -> ([[I; R]; L], [I; L], [I; R]) { ... }
}
Provided Methods§
Sourcefn overlap_and_differences_cardinality_matrices<const L: usize, const R: usize>(
left: &[Self; L],
right: &[Self; R],
) -> ([[I; R]; L], [I; L], [I; R])
fn overlap_and_differences_cardinality_matrices<const L: usize, const R: usize>( left: &[Self; L], right: &[Self; R], ) -> ([[I; R]; L], [I; L], [I; R])
Returns the overlap and differences cardinality matrices of two lists of sets.
§Arguments
left
- The first list of sets.right
- The second list of sets.
§Returns
overlap_cardinality_matrix
- Matrix of estimated overlapping cardinalities between the elements of the left and right arrays.left_difference_cardinality_vector
- Vector of estimated difference cardinalities between the elements of the left array and the last element of the right array.right_difference_cardinality_vector
- Vector of estimated difference cardinalities between the elements of the right array and the last element of the left array.
§Implementative details
We expect the elements of the left and right arrays to be increasingly contained in the next one.
§Examples
In the following illustration, we show that for two vectors left and right of three elements, we expect to compute the exclusively overlap matrix $A_{ij}$ and the exclusively differences vectors $B_i$.
Very similarly, for the case of vectors of two elements:
Sourcefn normalized_overlap_and_differences_cardinality_matrices<const L: usize, const R: usize>(
left: &[Self; L],
right: &[Self; R],
) -> ([[I; R]; L], [I; L], [I; R])
fn normalized_overlap_and_differences_cardinality_matrices<const L: usize, const R: usize>( left: &[Self; L], right: &[Self; R], ) -> ([[I; R]; L], [I; L], [I; R])
Returns the normalized overlap and differences cardinality matrices of two lists of sets.
§Arguments
left
- The first list of sets.right
- The second list of sets.
§Returns
overlap_cardinality_matrix
- Matrix of normalized estimated overlapping cardinalities between the elements of the left and right arrays.left_difference_cardinality_vector
- Vector of normalized estimated difference cardinalities between the elements of the left array and the last element of the right array.right_difference_cardinality_vector
- Vector of normalized estimated difference cardinalities between the elements of the right array and the last element of the left array.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.