pub struct LeidenConfigInput {
pub seed: u64,
pub gamma: f64,
pub iterations: usize,
pub quality: QualityFunctionInput,
pub edge_weights: Option<BTreeMap<String, f64>>,
pub min_compression_ratio: f64,
pub max_recursion_depth: u32,
}Expand description
Leiden algorithm configuration for pure-compute callers.
§Examples
use sdivi_core::input::{LeidenConfigInput, QualityFunctionInput};
let cfg = LeidenConfigInput::default();
assert_eq!(cfg.seed, 42);
assert_eq!(cfg.min_compression_ratio, 0.1);Fields§
§seed: u64Random seed for deterministic results.
gamma: f64Resolution parameter (CPM only; ignored for Modularity).
iterations: usizeMaximum outer-loop iterations.
quality: QualityFunctionInputQuality function to optimise.
edge_weights: Option<BTreeMap<String, f64>>Per-edge weights for weighted Leiden; None = 1.0 for all edges.
Keys: "source\x00target" (NUL-sep, source < target); use crate::input::edge_weight_key.
min_compression_ratio: f64Stop recursive Leiden when an aggregation level would compress the graph
by less than this fraction of nodes. Must be in [0.0, 1.0). Default 0.1.
max_recursion_depth: u32Hard cap on Leiden recursion depth. Default 32.
Trait Implementations§
Source§impl Clone for LeidenConfigInput
impl Clone for LeidenConfigInput
Source§fn clone(&self) -> LeidenConfigInput
fn clone(&self) -> LeidenConfigInput
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 LeidenConfigInput
impl Debug for LeidenConfigInput
Source§impl Default for LeidenConfigInput
impl Default for LeidenConfigInput
Source§impl<'de> Deserialize<'de> for LeidenConfigInput
impl<'de> Deserialize<'de> for LeidenConfigInput
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
Source§impl PartialEq for LeidenConfigInput
impl PartialEq for LeidenConfigInput
Source§fn eq(&self, other: &LeidenConfigInput) -> bool
fn eq(&self, other: &LeidenConfigInput) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for LeidenConfigInput
impl Serialize for LeidenConfigInput
impl StructuralPartialEq for LeidenConfigInput
Auto Trait Implementations§
impl Freeze for LeidenConfigInput
impl RefUnwindSafe for LeidenConfigInput
impl Send for LeidenConfigInput
impl Sync for LeidenConfigInput
impl Unpin for LeidenConfigInput
impl UnsafeUnpin for LeidenConfigInput
impl UnwindSafe for LeidenConfigInput
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