Repository navigation
Fix the pagerank and triangle centrality examples - #162
Merged
Merged
Conversation
- pagerank: drop the removed `GBArray` annotation and import `second`. - triangle_centrality: pass the Descriptor as `desc=` and import `second`. Use `-` (eadd) instead of `.-`, which broadcasts as emul and dropped vertices that are in no triangle but have triangle neighbours. - triangle_centrality1: multiply by the pattern of T (`(+, second)`) instead of its triangle counts, as in the definition. - Add reference headers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v11 #162 +/- ##
==========================================
+ Coverage 65.87% 66.10% +0.22%
==========================================
Files 54 54
Lines 4449 4449
==========================================
+ Hits 2931 2941 +10
+ Misses 1518 1508 -10 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ports
examples/pagerank.jlandexamples/triangle_centrality.jlto the current API and fixes two correctness bugs in triangle centrality:triangle_centralityused.-, which broadcasts asemul(intersection). That dropped vertices that are in no triangle but have neighbours that are, e.g. a pendant vertex hanging off a triangle got 0 instead of its correct value.triangle_centrality1multipliedyby the triangle counts inTinstead of its pattern, so vertices on edges shared by several triangles came out wrong.pagerankonly needed the removedGBArrayannotation dropped. Its results match a dense power iteration.Both now have reference headers, tests in
test/examples.jl(hand-computed centralities; PageRank on a cycle and against a dense iteration), and rows in the docs Examples table. FullPkg.test()and the doctests pass on nightly.🤖 Generated with Claude Code