pub struct MinCutFeatures {
pub global_mincut: f64,
pub local_cuts: Vec<f64>,
pub edge_in_cut: HashMap<(usize, usize), bool>,
pub error_chain_prob: Vec<f64>,
}Expand description
Min-cut features extracted from detector graph
Fields§
§global_mincut: f64Global minimum cut value
local_cuts: Vec<f64>Local cut values for each node
edge_in_cut: HashMap<(usize, usize), bool>Edge participation in min-cut
error_chain_prob: Vec<f64>Cut-based error chain probability
Implementations§
Source§impl MinCutFeatures
impl MinCutFeatures
Sourcepub fn extract(
adjacency: &HashMap<usize, Vec<usize>>,
edge_weights: &HashMap<(usize, usize), f32>,
num_nodes: usize,
) -> Result<Self>
pub fn extract( adjacency: &HashMap<usize, Vec<usize>>, edge_weights: &HashMap<(usize, usize), f32>, num_nodes: usize, ) -> Result<Self>
Extract min-cut features from a detector graph
§Arguments
adjacency- Adjacency list of detector graphedge_weights- Edge weights (error probabilities)num_nodes- Number of detector nodes
Trait Implementations§
Source§impl Clone for MinCutFeatures
impl Clone for MinCutFeatures
Source§fn clone(&self) -> MinCutFeatures
fn clone(&self) -> MinCutFeatures
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for MinCutFeatures
impl RefUnwindSafe for MinCutFeatures
impl Send for MinCutFeatures
impl Sync for MinCutFeatures
impl Unpin for MinCutFeatures
impl UnwindSafe for MinCutFeatures
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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