Skip to main content

GraphAnalysis

Struct GraphAnalysis 

Source
pub struct GraphAnalysis<'graph> { /* private fields */ }
Expand description

One borrowed graph, the selection applied to it, and the indexes that selection produced.

Implementations§

Source§

impl<'graph> GraphAnalysis<'graph>

Source

pub fn new( graph: &'graph CodeGraph, selection: GraphEdgeSelection, limits: GraphAnalysisLimits, ) -> Result<GraphAnalysis<'graph>, GraphAnalysisError>

Index one graph under one stated selection and one stated set of ceilings.

The node count is proved before any node-indexed table exists and the selected-edge count is proved before any adjacency storage does, so a refusal costs the counts alone.

Source

pub fn graph(&self) -> &'graph CodeGraph

The graph this analysis reads. Every identity it answers with indexes back into this value.

Source

pub fn selection(&self) -> GraphEdgeSelection

The selection every index was built from.

Source

pub fn limits(&self) -> GraphAnalysisLimits

The ceilings this analysis was admitted under.

Source

pub fn declared_partition(&self) -> &DeclaredModulePartition

The declared module partition, derived once from logical containment.

Source

pub fn neighbors( &self, node: GraphNodeId, depth: u32, direction: GraphDirection, ) -> Result<Box<[GraphNeighbor]>, GraphAnalysisError>

Every node connected to node within depth selected steps in direction, at its minimum distance, in distance then node order.

Source

pub fn path( &self, source: GraphNodeId, target: GraphNodeId, ) -> Result<Option<GraphPath>, GraphAnalysisError>

The shortest route from source to target over selected outgoing edges, or None when no route exists.

Source

pub fn subgraph( &self, seed: GraphNodeId, depth: u32, direction: GraphDirection, ) -> Result<GraphSubgraph, GraphAnalysisError>

The selection into this graph induced by the nodes seed reaches within depth selected steps.

Source

pub fn degree_centrality(&self) -> Box<[DegreeCentrality]>

How many selected edges arrive at and leave each node, in raw node-id order.

Source

pub fn betweenness_centrality( &self, ) -> Result<Box<[BetweennessCentrality]>, GraphAnalysisError>

How much of the selected topology’s shortest routing passes through each node, in raw node-id order.

Source

pub fn strongly_connected_components(&self) -> GraphComponents

Which nodes reach each other over selected edges.

Source

pub fn condensation(&self) -> CondensationGraph

The same selected topology with every component contracted, ordered, and still carrying every raw edge it coalesced.

Source

pub fn divergence(&self) -> GraphDivergence

What the selected topology says about the module partition this graph declares.

Source

pub fn layout_assist(&self) -> Result<LayoutAssistMetadata, GraphAnalysisError>

Every admitted node and selected edge, described for a consumer that ranks or draws them.

Auto Trait Implementations§

§

impl<'graph> Freeze for GraphAnalysis<'graph>

§

impl<'graph> RefUnwindSafe for GraphAnalysis<'graph>

§

impl<'graph> Send for GraphAnalysis<'graph>

§

impl<'graph> Sync for GraphAnalysis<'graph>

§

impl<'graph> Unpin for GraphAnalysis<'graph>

§

impl<'graph> UnsafeUnpin for GraphAnalysis<'graph>

§

impl<'graph> UnwindSafe for GraphAnalysis<'graph>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.