pub struct PerfectMatching {
pub peer_matchings: Vec<(DualNodePtr, DualNodePtr)>,
pub virtual_matchings: Vec<(DualNodePtr, VertexIndex)>,
}Fields§
§peer_matchings: Vec<(DualNodePtr, DualNodePtr)>matched pairs; note that each pair will only appear once. (defect_node_1, defect_node_2)
virtual_matchings: Vec<(DualNodePtr, VertexIndex)>those nodes matched to the boundary. (syndrome node, virtual_vertex)
Implementations§
Source§impl PerfectMatching
impl PerfectMatching
pub fn new() -> Self
Sourcepub fn legacy_get_mwpm_result(
&self,
defect_vertices: Vec<VertexIndex>,
) -> Vec<DefectIndex> ⓘ
pub fn legacy_get_mwpm_result( &self, defect_vertices: Vec<VertexIndex>, ) -> Vec<DefectIndex> ⓘ
this interface is not very optimized, but is compatible with blossom V algorithm’s result
Trait Implementations§
Source§impl Debug for PerfectMatching
impl Debug for PerfectMatching
Source§impl Default for PerfectMatching
impl Default for PerfectMatching
Source§impl FusionVisualizer for PerfectMatching
impl FusionVisualizer for PerfectMatching
Auto Trait Implementations§
impl Freeze for PerfectMatching
impl !RefUnwindSafe for PerfectMatching
impl Send for PerfectMatching
impl Sync for PerfectMatching
impl Unpin for PerfectMatching
impl !UnwindSafe for PerfectMatching
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
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