Skip to main content

CellComparison

Struct CellComparison 

Source
pub struct CellComparison<const DIM_COUNT: usize> {
    pub cell_a: CubeCell<DIM_COUNT>,
    pub cell_b: CubeCell<DIM_COUNT>,
}
Expand description

A comparison between two cube cells — structure for the result shape.

§What this is

The structural shape of a cross-cell comparison result. Two cells at the same number of dimensions DIM_COUNT are named and held together. This shape is the receipt that a comparison was declared between these cells.

§What this is not

Not the comparison computation. Conformance checking, model discovery, or cross-cell difference analysis all graduate to wasm4pm.

§Graduate to wasm4pm

The actual comparison engine (fitness difference, model distance, variant overlap) graduates to wasm4pm.

§Examples

use wasm4pm_compat::process_cube::{CubeCell, CellComparison};
let cmp = CellComparison {
    cell_a: CubeCell::<2>::new(),
    cell_b: CubeCell::<2>::new(),
};
assert_eq!(cmp.cell_a.dim_count(), 2);

Fields§

§cell_a: CubeCell<DIM_COUNT>

The first cell in the comparison.

§cell_b: CubeCell<DIM_COUNT>

The second cell in the comparison.

Auto Trait Implementations§

§

impl<const DIM_COUNT: usize> Freeze for CellComparison<DIM_COUNT>

§

impl<const DIM_COUNT: usize> RefUnwindSafe for CellComparison<DIM_COUNT>

§

impl<const DIM_COUNT: usize> Send for CellComparison<DIM_COUNT>

§

impl<const DIM_COUNT: usize> Sync for CellComparison<DIM_COUNT>

§

impl<const DIM_COUNT: usize> Unpin for CellComparison<DIM_COUNT>

§

impl<const DIM_COUNT: usize> UnsafeUnpin for CellComparison<DIM_COUNT>

§

impl<const DIM_COUNT: usize> UnwindSafe for CellComparison<DIM_COUNT>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> EvidenceKind for T

Source§

default fn kind_label(&self) -> &'static str

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.