Tags: python-graphblas/graphblas-algorithms
Tags
Add `triangles` (#3) * Add `triangles` I think the tests could be improved. Some of the NetworkX tests get coverage, but only compare to 0 triangles. Also, we should test more with self-edges. There may be better ways to compute triangles for: - all nodes - a subset of nodes - a single node There are *a lot* of different ways to compute triangles, so this could be explored further in the future. I hope the current PR is competitive. * Handle and test triangle count with self-edges * Add `has_self_edges=True` argument for single triangle count * Tiny improvement * Add transitivity * Begin clustering coefficient; also, make computing properties easier. * Better handling of properties * Implement clustering for undirected, unweighted graphs * Add `average_clustering` and helper functions to make things cleaner
Add initial attempt at pagerank with hacky tests (#1) * Add initial attempt at pagerank with hacky tests * Install networkx too * Fix failing test; maybe faster/better? * Even better * Split pagerank into two functions: grblas-native and networkx-facing. Also, optimize if adjacency matrix is iso-valued. I would bring this implementation to a benchmarking shootout! * Change how we convert NetworkX dicts to vectors. Also, sparsify vectors. May be a decent idea? Not sure. It probably doesn't matter most of the time, but I guess there's a chance it can make the matrix-vector multiply faster for some inputs. We don't drop 0s from the input matrix, because that would be expensive. * Clean up * Don't be cute; don't use masks, because they're bad for benchmarks. Also, add basic benchmark script. * Update to use latest grblas; also, add verify option to bench script. * Show grid of absolute differences between benchmark results