mirror of
https://github.com/zrwusa/data-structure-typed.git
synced 2024-11-23 12:54:04 +00:00
release: 1.49.4
This commit is contained in:
parent
c3db558607
commit
bc000105d8
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "data-structure-typed",
|
||||
"version": "1.49.3",
|
||||
"version": "1.49.4",
|
||||
"description": "Data Structures of Javascript & TypeScript. Heap, Binary Tree, Red Black Tree, Linked List, Deque, Trie, HashMap, Directed Graph, Undirected Graph, Binary Search Tree(BST), 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. Benchmark compared with C++ STL. API aligned with ES6 and Java.util. Usability is comparable to Python",
|
||||
"main": "dist/cjs/index.js",
|
||||
"module": "dist/mjs/index.js",
|
||||
|
|
|
@ -66,6 +66,17 @@ class MyGraph<
|
|||
return edge ? undefined : undefined;
|
||||
}
|
||||
|
||||
deleteVertex(vertexOrKey: VertexKey | VO): boolean {
|
||||
let vertexKey: VertexKey;
|
||||
if (this.isVertexKey(vertexOrKey)) {
|
||||
vertexKey = vertexOrKey;
|
||||
} else {
|
||||
vertexKey = vertexOrKey.key;
|
||||
}
|
||||
this._vertexMap.delete(vertexKey);
|
||||
return true;
|
||||
}
|
||||
|
||||
protected _addEdge(edge: EO): boolean {
|
||||
return edge ? true : true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue