You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2fe30ea
Browse filesBrowse the repository at this point in the historyBrowse files
Fix the pagerank and triangle centrality examples (#162)
* Fix the pagerank and triangle centrality examples
- 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>
* Test pagerank and triangle centrality and list them in the docs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
| Triangles per vertex |`NodeWiseTriangleCount.jl`|`nodewise_tc(A)`||
25
+
| Triangle centrality |`triangle_centrality.jl`|`triangle_centrality(A)`, `triangle_centrality1(A)`|`A` has unit weights. |
25
26
| k-truss |`KTruss.jl`|`ktruss(A, k)`| Returns the truss with edge supports as values. |
26
27
| BFS parents |`BFSParents.jl`|`bfs_parents(A, s, n)`| The parent of the source is `0`. |
27
28
| Multi-source BFS parents |`BFSParentsMultiSource.jl`|`ms_bfsp(A, S, n, s)`| Row `i` of the `s × n` matrix `S` marks source `i`. |
28
29
| Multi-source BFS levels |`BFSLevelsMultiSource.jl`|`ms_bfsl(A, S, n, s)`|`A` and `S` are `Bool`. Sources are level `1`, unreachable vertices `0`. |
29
30
| Bellman-Ford |`BellmanFord.jl`|`bellmanford(A, s, n)`|`A[i,j]` is the weight of edge `i → j`, with explicit zeros on the diagonal. |
30
31
| Floyd-Warshall |`FloydWarshall.jl`|`floydwarshall(A, n)`| Same input as Bellman-Ford. |
31
32
| Prim's minimum spanning tree |`BasicPrim.jl`, `AdvancedPrim.jl`|`b_prim(A, n, zeros(n))`, `a_prim(A, n, zeros(n))`|`A` is dense, with `Inf` where there is no edge and zeros on the diagonal. |
33
+
| PageRank |`pagerank.jl`|`pagerank(A)`|`A[i,j]` is the edge `i → j`. Returns `(ranks, iterations)`. Ranks of dangling vertices are not redistributed. |
32
34
| Community detection by label propagation |`CDLP.jl`|`cdlp(A, n, t)`| Runs `t` iterations. Every vertex must have a neighbour. |
33
35
34
36
The graph below has edges `1-2`, `1-3`, `2-3`, `2-4`, `3-4` and `4-5`, and two triangles, `{1,2,3}` and `{2,3,4}`.
0 commit comments