pub struct Analyzer;Implementations§
Source§impl Analyzer
impl Analyzer
pub fn god_nodes( &self, nodes: &[Node], edges: &[Edge], top_n: usize, ) -> Vec<Node>
pub fn surprising_connections( &self, edges: &[Edge], cross_language_suppression: bool, ) -> Vec<Edge>
pub fn suggest_questions(&self, nodes: &[Node], edges: &[Edge]) -> Vec<String>
pub fn cohesion_score( &self, _nodes: &[Node], edges: &[Edge], community_nodes: &[NodeId], ) -> f64
pub fn pagerank( &self, edges: &[Edge], damping: f64, max_iter: usize, ) -> HashMap<String, f64>
pub fn graph_diff(&self, old: &[Edge], new: &[Edge]) -> (Vec<Edge>, Vec<Edge>)
pub fn tarjan_scc(&self, edges: &[Edge]) -> Vec<Vec<String>>
pub fn bridge_edges(&self, nodes: &[Node], edges: &[Edge]) -> Vec<Edge>
pub fn topological_sort(&self, edges: &[Edge]) -> Vec<String>
pub fn analyze(&self, nodes: &[Node], edges: &[Edge]) -> Result<AnalysisResult>
pub fn find_similar( &self, edges: &[Edge], node_id: &str, top_n: usize, ) -> Vec<(String, f64)>
Sourcepub fn compute_temporal_risk(
&self,
nodes: &mut [Node],
edges: &[Edge],
) -> Result<()>
pub fn compute_temporal_risk( &self, nodes: &mut [Node], edges: &[Edge], ) -> Result<()>
Compute temporal risk for file nodes based on git history.
For each file node, the risk score is: risk_score = churn_rate * degree_centrality * community_bridge_factor where:
- churn_rate: number of commits that touched the file (
git rev-list --count HEAD -- <file>) - degree_centrality: number of edges connected to the node
- community_bridge_factor: 1.0 + number of bridge edges the node participates in
Auto Trait Implementations§
impl Freeze for Analyzer
impl RefUnwindSafe for Analyzer
impl Send for Analyzer
impl Sync for Analyzer
impl Unpin for Analyzer
impl UnsafeUnpin for Analyzer
impl UnwindSafe for Analyzer
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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