pub struct CodeEdge {
pub vertices: (VertexIndex, VertexIndex),
pub p: f64,
pub pe: f64,
pub half_weight: Weight,
pub is_erasure: bool,
}Expand description
Edge flips the measurement result of two vertices
Fields§
§vertices: (VertexIndex, VertexIndex)the two vertices incident to this edge
p: f64probability of flipping the results of these two vertices; do not set p to 0 to remove edge: if desired, create a new code type
pe: f64probability of having a reported event of error on this edge
half_weight: Weightthe integer weight of this edge
is_erasure: boolwhether this edge is erased
Implementations§
Source§impl CodeEdge
impl CodeEdge
pub fn new(a: VertexIndex, b: VertexIndex) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CodeEdge
impl RefUnwindSafe for CodeEdge
impl Send for CodeEdge
impl Sync for CodeEdge
impl Unpin for CodeEdge
impl UnwindSafe for CodeEdge
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)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