Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiorder laplacian not truly sparse #301

Closed
maximelucas opened this issue Mar 22, 2023 · 0 comments · Fixed by #303
Closed

multiorder laplacian not truly sparse #301

maximelucas opened this issue Mar 22, 2023 · 0 comments · Fixed by #303

Comments

@maximelucas
Copy link
Collaborator

If sparse=True is passed to multiorder_laplacian(), the function computes Laplacians at each order with sparse=False, sums them, and then converts the results to sparse with:

https://github.com/ComplexGroupInteractions/xgi/blob/ebe04761fabe31a474664b476c5464c41ba651cf/xgi/linalg/matrix.py#L369-L370

This defeats the purpose, since all internal calculations are done using non-sparse matrices.

maximelucas added a commit that referenced this issue Mar 22, 2023
* perf: cleaner and faster incidence_matrix

* fix: return sparse (if asked) for empty H (sparse and non-sparse now have dim (0,0)). fixed corresponding tests.

* tests: more to check sparse equals non sparse

* tests: more for sparse

* perf: made multiorder_laplacian truly sparse and faster #301

* style: ran isort and black
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant