pub struct DependencyGraph {
pub adjacency_matrix: Array2<Float>,
pub node_names: Vec<String>,
pub edge_weights: Array2<Float>,
pub directed: bool,
pub stats: GraphStatistics,
}Expand description
Dependency graph representation
Fields§
§adjacency_matrix: Array2<Float>Adjacency matrix
node_names: Vec<String>Node names (output names)
edge_weights: Array2<Float>Edge weights (correlation/dependency strengths)
directed: boolWhether the graph is directed
stats: GraphStatisticsGraph statistics
Implementations§
Source§impl DependencyGraph
impl DependencyGraph
Sourcepub fn get_neighbors(&self, node_name: &str) -> Vec<String>
pub fn get_neighbors(&self, node_name: &str) -> Vec<String>
Get neighbors of a node
Sourcepub fn get_edge_weight(&self, node1: &str, node2: &str) -> Option<Float>
pub fn get_edge_weight(&self, node1: &str, node2: &str) -> Option<Float>
Get edge weight between two nodes
Sourcepub fn are_connected(&self, node1: &str, node2: &str) -> bool
pub fn are_connected(&self, node1: &str, node2: &str) -> bool
Check if two nodes are connected
Sourcepub fn get_degree(&self, node_name: &str) -> usize
pub fn get_degree(&self, node_name: &str) -> usize
Get node degree
Trait Implementations§
Source§impl Clone for DependencyGraph
impl Clone for DependencyGraph
Source§fn clone(&self) -> DependencyGraph
fn clone(&self) -> DependencyGraph
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 moreAuto Trait Implementations§
impl Freeze for DependencyGraph
impl RefUnwindSafe for DependencyGraph
impl Send for DependencyGraph
impl Sync for DependencyGraph
impl Unpin for DependencyGraph
impl UnwindSafe for DependencyGraph
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 more