pub struct HrgTree {
pub left: Vec<i32>,
pub right: Vec<i32>,
pub prob: Vec<f64>,
pub vertices: Vec<i32>,
pub edges: Vec<i32>,
/* private fields */
}Expand description
A hierarchical random graph represented as a binary dendrogram.
Internal vertices are identified by negative indices starting at -1
(the root). Leaf vertices use non-negative indices 0..n. Each
internal vertex -(i+1) has its data at index i in the vectors.
§Example
use rust_igraph::HrgTree;
let hrg = HrgTree::new(3);
assert_eq!(hrg.size(), 3);
assert_eq!(hrg.num_internal(), 2);Fields§
§left: Vec<i32>Left child of each internal vertex. Negative = internal, non-negative = leaf.
right: Vec<i32>Right child of each internal vertex.
prob: Vec<f64>Connection probability at each internal vertex.
vertices: Vec<i32>Number of leaf vertices in the subtree of each internal vertex.
edges: Vec<i32>Number of tree edges in the subtree below each internal vertex.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HrgTree
impl RefUnwindSafe for HrgTree
impl Send for HrgTree
impl Sync for HrgTree
impl Unpin for HrgTree
impl UnsafeUnpin for HrgTree
impl UnwindSafe for HrgTree
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