pub struct Mrf {
pub n_nodes: usize,
pub n_labels: usize,
pub edges: Vec<(usize, usize)>,
pub unary: Vec<f64>,
pub pairwise: Vec<f64>,
}Expand description
Pairwise Markov Random Field on an undirected graph.
unary[i*n_labels + l]— local cost on nodeifor labellpairwise[(edge_idx)*n_labels*n_labels + l_i*n_labels + l_j]— pairwise compatibility onedge[edge_idx] = (u, v).
Fields§
§n_nodes: usize§n_labels: usize§edges: Vec<(usize, usize)>§unary: Vec<f64>§pairwise: Vec<f64>Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Mrf
impl RefUnwindSafe for Mrf
impl Send for Mrf
impl Sync for Mrf
impl Unpin for Mrf
impl UnsafeUnpin for Mrf
impl UnwindSafe for Mrf
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