zrwusa / data-structure-typed

Javascript Data Structure & TypeScript Data Structure. Heap, Binary Tree, Red Black Tree, Linked List, Deque, Trie, HashMap, Directed Graph, Undirected Graph, Binary Search Tree, AVL Tree, Priority Queue, Graph, Queue, Tree Multiset, Singly Linked List, Doubly Linked List, Max Heap, Max Priority Queue, Min Heap, Min Priority Queue, Stack.
https://data-structure-typed-docs.vercel.app
MIT License
114 stars 8 forks source link

Removing a vertex from a DirectedGraph doesn't remove it's edges #51

Closed rkrump closed 9 months ago

rkrump commented 9 months ago

Describe the bug Removing a vertex from a DirectedGraph doesn't remove it's edges. Furthermore, these edges can then not be manually removed, since it doesn't find the referenced src/dest vertex.

To Reproduce Steps to reproduce the behavior:

  1. Create a graph containing the vertices "hello" and "world"
  2. Add edge from "hello" to "world"
  3. Remove "hello"
  4. Edge "hello" to "world" still exists and cannot be removed

Expected behavior Removing a vertex deletes all associated edges.

Desktop

Additional notes Thanks for your work on this library <3

zrwusa commented 9 months ago

This bug was fixed in version 1.48.4.