C-Sharp-Algorithms icon indicating copy to clipboard operation
C-Sharp-Algorithms copied to clipboard

Basic optimizations for UndirectedSparseGraph

Open melon3r opened this issue 4 years ago • 2 comments

Description

Optimized item removal from UndirectedSparseGraph by only trying to remove the given item from its neighbors' adjacency lists, instead of all vertices'.

Optimized the Contains function of the DLinkedList structure by avoiding exceptions entirely, as they are costly and not really meaningful in this case (not finding an item in a list is normal, it's not an exception).

Checklist

  • [ ] An issue was first created before opening this pull request
  • [ ] The new code follows the contribution guidelines
  • [X] I have performed a self-review of my own code
  • [X] I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation
  • [X] My changes generate no new warnings
  • [ ] I have added tests to ensure that prove my fix is effective or that my feature works
  • [X] New and existing unit tests pass locally with my changes

melon3r avatar Apr 08 '20 16:04 melon3r

Hi @melon3r, pull requests should follow from existing issues, can you please create one first describing what kind of problem you're solving?

aalhour avatar May 27 '20 08:05 aalhour

Hi @aalhour, I just created #146

melon3r avatar Jul 16 '20 15:07 melon3r