pub struct JointDegreeDistributionOptions {
pub from_mode: NeighborMode,
pub to_mode: NeighborMode,
pub directed_neighbors: bool,
pub normalized: bool,
pub max_from_degree: Option<usize>,
pub max_to_degree: Option<usize>,
}Expand description
Options of Graph::joint_degree_distribution.
The defaults describe the classical joint degree distribution: for each
directed connection u -> v, the out-degree of u and the in-degree of
v, normalized so that the entries sum to one, with automatically sized
rows and columns.
Fields§
§from_mode: NeighborModeHow to compute the degree of source vertices (NeighborMode::Out,
NeighborMode::In or NeighborMode::All). Ignored for undirected
graphs. Default: NeighborMode::Out.
to_mode: NeighborModeHow to compute the degree of target vertices. Ignored for undirected
graphs. Default: NeighborMode::In.
directed_neighbors: boolWhether to consider u -> v connections as directed. When false,
every edge is counted in both directions. Ignored for undirected
graphs. Default: true.
normalized: boolWhether to normalize the matrix so that its entries sum to 1. If
false, entries are connection counts (or total weights).
Default: true.
max_from_degree: Option<usize>Largest source degree to consider (the result has one more row);
None uses the largest source degree in the graph. Default: None.
max_to_degree: Option<usize>Largest target degree to consider (the result has one more column);
None uses the largest target degree in the graph. Default: None.
Implementations§
Source§impl JointDegreeDistributionOptions
impl JointDegreeDistributionOptions
Sourcepub fn with_modes(self, from_mode: NeighborMode, to_mode: NeighborMode) -> Self
pub fn with_modes(self, from_mode: NeighborMode, to_mode: NeighborMode) -> Self
Sets how source and target degrees are computed.
Sourcepub fn with_directed_neighbors(self, directed_neighbors: bool) -> Self
pub fn with_directed_neighbors(self, directed_neighbors: bool) -> Self
Sets directed_neighbors.
Sourcepub fn with_normalized(self, normalized: bool) -> Self
pub fn with_normalized(self, normalized: bool) -> Self
Sets normalized.
Trait Implementations§
Source§impl Clone for JointDegreeDistributionOptions
impl Clone for JointDegreeDistributionOptions
Source§fn clone(&self) -> JointDegreeDistributionOptions
fn clone(&self) -> JointDegreeDistributionOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for JointDegreeDistributionOptions
impl Eq for JointDegreeDistributionOptions
Source§impl PartialEq for JointDegreeDistributionOptions
impl PartialEq for JointDegreeDistributionOptions
Source§fn eq(&self, other: &JointDegreeDistributionOptions) -> bool
fn eq(&self, other: &JointDegreeDistributionOptions) -> bool
self and other values to be equal, and is used by ==.