Observation

Struct Observation 

Source
#[repr(C)]
pub struct Observation { pub vertex: TileVertexId, pub obs_type: u8, pub flags: u8, pub value: u32, }
Expand description

Observation for evidence accumulation

Represents a measurement or event that affects the e-value calculation.

Fields§

§vertex: TileVertexId

Vertex or region this observation applies to

§obs_type: u8

Observation type/category

§flags: u8

Observation flags

§value: u32

Observation value (interpretation depends on obs_type)

Implementations§

Source§

impl Observation

Source

pub const TYPE_CONNECTIVITY: u8 = 0u8

Observation type: connectivity evidence

Source

pub const TYPE_CUT_MEMBERSHIP: u8 = 1u8

Observation type: cut membership evidence

Source

pub const TYPE_FLOW: u8 = 2u8

Observation type: flow evidence

Source

pub const TYPE_WITNESS: u8 = 3u8

Observation type: witness evidence

Source

pub const fn connectivity(vertex: TileVertexId, connected: bool) -> Self

Create a connectivity observation

Source

pub const fn cut_membership( vertex: TileVertexId, side: u8, confidence: u16, ) -> Self

Create a cut membership observation

Trait Implementations§

Source§

impl Clone for Observation

Source§

fn clone(&self) -> Observation

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Observation

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Observation

Source§

fn default() -> Observation

Returns the “default value” for a type. Read more
Source§

impl Copy for Observation

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.