Triangle count algorithms return different results
See original GitHub issueSeems #8 was a non-issue but the triangle count algorithms still return different results.
Using az INT64 pattern matrix fixes the inconsistency:
- "M = Matrix.from_random(BOOL, 100, 100, 10000, no_diagonal=True, make_symmetric=True, seed=42)"
+ "M = Matrix.from_random(INT64, 100, 100, 1000, no_diagonal=True, make_symmetric=True, make_pattern=True, seed=42)"
However, I cannot say that I can fully understand what’s happening here. I’ve also tried introducing semiring=semiring.plus_times_int64 in the mxm operations but it did not change the output in any case.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Triangle Count - Neo4j Graph Data Science
The Triangle Count algorithm counts the number of triangles for each node in the graph. A triangle is a set of three nodes...
Read more >Fast Counting of Triangles in Large Real Networks: Algorithms ...
TriangleLocal theorems and algorithms, for global and local triangle counting, respectively. Section 4 gives the experimental results on several real data ...
Read more >Better Algorithms for Counting Triangles in Data Streams
ABSTRACT. We present space-efficient data stream algorithms for approximating the number of triangles in a graph up to a factor 1 + ϵ....
Read more >A Block-Based Triangle Counting Algorithm on ... - arXiv
Abstract—Triangle counting is a fundamental building block in graph algorithms. In this paper, we propose a block-based triangle.
Read more >Number of Triangles in an Undirected Graph - GeeksforGeeks
Since a triangle has three vertices and it is counted for every vertex, we need to divide the result by 3. Furthermore, since...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

This is fixed in #72 and now all return the same result
102362.Yep @jim22k that’s it, this has bitten me a couple times, should use something like C implicit conversion to consider both sides of the operation.
https://en.cppreference.com/w/c/language/conversion