pub struct PageRankAnalysis { /* private fields */ }Expand description
Main entry point for PageRank centrality analysis
This is the primary interface for computing PageRank centrality scores and integrating them with the Scribe heuristic system.
Implementations§
Source§impl PageRankAnalysis
impl PageRankAnalysis
Sourcepub fn new() -> Result<PageRankAnalysis, ScribeError>
pub fn new() -> Result<PageRankAnalysis, ScribeError>
Create a new PageRank analysis instance with default configuration
Sourcepub fn with_config(
config: CentralityConfig,
) -> Result<PageRankAnalysis, ScribeError>
pub fn with_config( config: CentralityConfig, ) -> Result<PageRankAnalysis, ScribeError>
Create with custom centrality configuration
Sourcepub fn for_code_analysis() -> Result<PageRankAnalysis, ScribeError>
pub fn for_code_analysis() -> Result<PageRankAnalysis, ScribeError>
Create optimized for code dependency analysis
Sourcepub fn for_large_codebases() -> Result<PageRankAnalysis, ScribeError>
pub fn for_large_codebases() -> Result<PageRankAnalysis, ScribeError>
Create optimized for large codebases (>5k files)
Sourcepub fn compute_centrality<T>(
&self,
scan_results: &[T],
) -> Result<CentralityResults, ScribeError>where
T: ScanResult + Sync,
pub fn compute_centrality<T>(
&self,
scan_results: &[T],
) -> Result<CentralityResults, ScribeError>where
T: ScanResult + Sync,
Compute PageRank centrality scores for a collection of files
Sourcepub fn integrate_with_heuristics(
&self,
centrality_results: &CentralityResults,
heuristic_scores: &HashMap<String, f64>,
) -> Result<HashMap<String, f64>, ScribeError>
pub fn integrate_with_heuristics( &self, centrality_results: &CentralityResults, heuristic_scores: &HashMap<String, f64>, ) -> Result<HashMap<String, f64>, ScribeError>
Integrate centrality scores with existing heuristic scores
This combines PageRank centrality with Scribe heuristic scores using configurable weights. The default configuration uses 15% centrality weight and 85% heuristic weight.
Sourcepub fn summarize_results(&self, results: &CentralityResults) -> String
pub fn summarize_results(&self, results: &CentralityResults) -> String
Get a summary of centrality computation results
Trait Implementations§
Source§impl Default for PageRankAnalysis
impl Default for PageRankAnalysis
Source§fn default() -> PageRankAnalysis
fn default() -> PageRankAnalysis
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PageRankAnalysis
impl RefUnwindSafe for PageRankAnalysis
impl Send for PageRankAnalysis
impl Sync for PageRankAnalysis
impl Unpin for PageRankAnalysis
impl UnwindSafe for PageRankAnalysis
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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