graphblas-algorithms icon indicating copy to clipboard operation
graphblas-algorithms copied to clipboard

Redo/refactor calculations and caching of properties such as degrees

Open eriknw opened this issue 1 year ago • 0 comments

We compute and cache many properties such as has_self_edges, degrees- (w/o diagonals), degrees+ (with diagonals), etc., which is actually very handy. However, the code is a little complicated (cough cough, my bad) and may be error prone (see: https://github.com/python-graphblas/graphblas-algorithms/issues/82#issuecomment-1840040146). It would be great if we could refactor this to be more clear, maintainable, and safe. I imagine such a solution would be more declarative and less procedural.

eriknw avatar Dec 14 '23 11:12 eriknw