Skip to content

Conversation

dizzyi
Copy link
Contributor

@dizzyi dizzyi commented Aug 26, 2025

Development Workflow

  • make format
  • make test
  • make lint

Bug Related

#21

changed return type of pagerank and pagerank_impl to NodeMap<f64>, and some minor changes.

Example

fn pagerank_example() {
    use graphina::core::types::Digraph;

    use graphina::centrality::algorithms::pagerank;

    let mut graph = Digraph::new();
    let nodes = (0..5).map(|i| graph.add_node(i)).collect::<Vec<_>>();
    let edges = [(0, 1, 1.0), (0, 2, 1.0), (1, 3, 1.0)];
    for (s, d, w) in edges {
        graph.add_edge(nodes[s], nodes[d], w);
    }

    let centrality = pagerank(&graph, 0.85, 1000);
    let expected = [0.14161, 0.20180, 0.20180, 0.31315, 0.14161];
    for (i, f) in expected.into_iter().enumerate() {
        assert!((centrality[&nodes[i]] - f).abs() < 1e-5)
    }
}

@habedi habedi self-assigned this Aug 26, 2025
Copy link

codecov bot commented Aug 26, 2025

Codecov Report

❌ Patch coverage is 86.66667% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.32%. Comparing base (bd6a0cc) to head (9c04336).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/centrality/algorithms.rs 86.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #23      +/-   ##
==========================================
+ Coverage   81.08%   81.32%   +0.24%     
==========================================
  Files          12       12              
  Lines        1882     1880       -2     
==========================================
+ Hits         1526     1529       +3     
+ Misses        356      351       -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@habedi habedi merged commit 0fabfdb into habedi:main Aug 26, 2025
6 checks passed
@habedi habedi added enhancement New feature or request bug Something isn't working labels Aug 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants