pub struct FactorGraphStats {
pub variable_count: usize,
pub factor_count: usize,
pub edge_count: usize,
pub max_factor_arity: usize,
pub avg_factor_arity: f64,
pub max_variable_degree: usize,
pub avg_variable_degree: f64,
pub is_tree: bool,
pub treewidth_upper_bound: usize,
}Expand description
Structural statistics for a factor graph.
Fields§
§variable_count: usizeNumber of variable nodes.
factor_count: usizeNumber of factor nodes.
edge_count: usizeTotal edges (variable-factor connections).
max_factor_arity: usizeMaximum number of variables any single factor connects.
avg_factor_arity: f64Average factor arity.
max_variable_degree: usizeMaximum degree of any variable (number of factors it participates in).
avg_variable_degree: f64Average variable degree.
is_tree: boolWhether the factor graph forms a tree (no loops).
treewidth_upper_bound: usizeUpper bound on treewidth (max factor arity - 1).
Implementations§
Source§impl FactorGraphStats
impl FactorGraphStats
Sourcepub fn compute(model: &FactorGraphModel) -> Self
pub fn compute(model: &FactorGraphModel) -> Self
Compute statistics from a FactorGraphModel.
Trait Implementations§
Source§impl Clone for FactorGraphStats
impl Clone for FactorGraphStats
Source§fn clone(&self) -> FactorGraphStats
fn clone(&self) -> FactorGraphStats
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 moreSource§impl Debug for FactorGraphStats
impl Debug for FactorGraphStats
Source§impl Default for FactorGraphStats
impl Default for FactorGraphStats
Source§fn default() -> FactorGraphStats
fn default() -> FactorGraphStats
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for FactorGraphStats
impl<'de> Deserialize<'de> for FactorGraphStats
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for FactorGraphStats
impl RefUnwindSafe for FactorGraphStats
impl Send for FactorGraphStats
impl Sync for FactorGraphStats
impl Unpin for FactorGraphStats
impl UnsafeUnpin for FactorGraphStats
impl UnwindSafe for FactorGraphStats
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.