Commit graph

59 commits

Author SHA1 Message Date
Revone
58ea2cb3c3 docs: Complete all code comments. 2024-01-01 10:45:32 +08:00
Revone
34d4abd9e6 fix: #38 Removed includeNull parameter from traversal methods.
feat: Removed unnecessary methods isNotNodeInstance and subTreeTraverse.
refactor: Organized the overloads of traversal methods.
2023-12-29 11:15:19 +08:00
Revone
689aa0f57e feat: Provide convenient option of the raw data processing function 'toEntry' in HashMap.options. 2023-12-25 20:24:41 +08:00
Revone
c949b5b741 refactor: Rearrange constructor parameters for all data structures, with the first parameter being the output and the second parameter being a configuration object. Make all configuration object properties optional.
fix: Provide optional parameters for inheritable data structures to facilitate inheritance. #64
2023-12-24 17:44:55 +08:00
Revone
dc6ef95f78 style: code base reformat 2023-12-21 10:26:45 +08:00
Revone
3e97e806ba refactor: Unify the return types of all methods and align them with Java, extract the print and hasValue methods to base class. This will make the code more consistent and easier to understand. 2023-12-12 21:14:17 +08:00
Revone
f0927e8b0a docs: Wrote a feature description for each data structure. refactor: Standardize the import of all types and objects 2023-12-11 20:27:05 +08:00
Revone
60a3154178 refactor: Differentiate between type imports and regular object imports. 2023-12-11 14:14:46 +08:00
Revone
7f5eb6cb70 refactor: Extract all methods such as 'some', 'every', 'entries', 'keys', 'values', 'forEach', 'reduce' into the base classes 'IterableElementBase' and 'IterablePairBase'. 2023-12-02 22:15:18 +08:00
Revone
8f9eb82bfd feat: To support conversion between data structures, Heap, PriorityQueue, Queue, Deque, SinglyLinkedList, DoublyLinkedList, and Stack have all added an 'elements' parameter for initializing the elements of the data structure. 2023-11-23 18:40:30 +08:00
Revone
5cf88d098e feat: All data structures except Graph have implemented *[Symbol.iterator], forEach, filter, map, reduce methods. 2023-11-23 13:19:13 +08:00
Revone
fa92ddfdaa perf: Implemented a high-performance Heap. docs: Software Engineering Standard Form. 2023-11-17 10:47:13 +08:00
Revone
a3f4508281 feat: The performance report generator supports parameter filtering commands, which can be used to run specific tests individually. It generates individual performance comparison reports. Enrich the COMMANDS.md document. 2023-11-16 21:11:50 +08:00
Revone
2b7bf3ce95 feat: The performance report generator supports parameter filtering commands, which can be used to run specific tests individually. It generates individual performance comparison reports. Enrich the COMMANDS.md document. 2023-11-16 21:08:57 +08:00
Revone
f9b6f313c6 feat: The performance report generator supports parameter filtering commands, which can be used to run specific tests individually. It generates individual performance comparison reports. Enrich the COMMANDS.md document. 2023-11-16 21:07:00 +08:00
Revone
dd2701dab7 style: reformated codebase 2023-11-16 10:14:14 +08:00
Revone
8f1f6d6f52 style: Try to synchronize Prettier with the coding style of the IDE. 2023-11-13 22:27:29 +08:00
Revone
1064ad4a58 style: reformat code with IDE 2023-11-13 13:07:28 +08:00
Revone
fd416c5d6e docs: Almost all methods of data structures have added comments on time and space complexity. 2023-11-10 16:24:24 +08:00
Revone
c82190764e [rbtree, binary-tree] Further testing of the Red-Black Tree is required. The 'get' method in BinaryTree should be renamed to 'getNode,' and an additional 'get' method should be added. 2023-11-01 13:48:01 +08:00
Revone
8712bbd3c9 [core] All data structures have had their member variables access control optimized. 2023-10-31 11:15:39 +08:00
Revone
1ec5a19172 [core] Besides Binary Trees and Graphs, access control optimizations have been applied to member variables. 2023-10-31 10:34:41 +08:00
Revone
bf5b865e2c [binary-tree] bug fix#27 2023-10-30 11:14:41 +08:00
Revone
f87e682f26 [test] test coverage enriched to 90.37% 2023-10-29 21:52:27 +08:00
Revone
bd1720973a [test] Increase the test coverage to 89.51. 2023-10-28 23:54:27 +08:00
Revone
6c45f53f72 [heap, priority-queue, binary-indexed-tree] Heap and PriorityQueue constructors use a single object as a parameter for uniformity with the design of other data structures.
Binary Indexed Tree includes the getPrefixSum method.
2023-10-28 17:37:51 +08:00
Revone
063b702236 [project] Achieve a rational subpackage structure that enables individual subpackages to be independently exportable. 2023-10-25 11:19:03 +08:00
Revone
c8f0e23704 [project] Ensure the type files in the "types" directory match those in the "src" directory. 2023-10-25 09:57:04 +08:00
Revone
0417ee5009 [binary-tree] Translate all traversal methods into callback function forms to enhance API convenience and readability. 2023-10-23 03:02:12 +08:00
Revone
a6329163f7 1. No need for dfsIterative; integrate it directly into the dfs method. 2. Allow for public configuration of setLoopType. 3. Replace subTreeAdd with subTreeForeach for improved clarity and flexibility; provide a callback for enhanced versatility. 4. Standardize the naming of certain methods and parameters. 2023-10-21 20:03:54 +08:00
Revone
961e4e5f8c [heap] fibonacci heap implemented. [test] big O estimate. [project] no-unused-vars config to warn 2023-10-21 01:59:10 +08:00
Revone
4fa0816223 [core] Shared Comparator and DFSOrderPattern among multiple data structures. ESLint config improved 2023-10-20 11:43:26 +08:00
Revone
9764f2a5c6 [binary-tree, graph] In order to optimize the design of Binary Trees, unnecessary abstract classe removed, while enforcing method constraints between base classes and subclasses through interfaces. For Graph, it is necessary to use an abstract class as the base class, and interface constraints should be applied. Any data structures that are not within the scope of the plan deleted. 2023-10-17 21:06:41 +08:00
Revone
727cc87ca5 [BinaryTree, Heap] In abstract classes, only retain abstract methods. Replace the generic 'T' with 'E' in Heap and PriorityQueue 2023-10-16 20:34:22 +08:00
zrwusa
fc7177130c
Merge branch 'main' into heap 2023-10-16 00:17:37 +08:00
Revone
219e41f32e [heap] test 2023-10-16 00:14:57 +08:00
Kirk Qi
dd7b641273 [heap, priority queue] Heap improved. References #123: redesigned 2023-10-15 22:09:26 +08:00
Revone
14dae1c1cd test 2023-10-15 22:04:33 +08:00
Revone
0c5df67215 [readme] badages updated 2023-10-10 17:22:18 +08:00
Revone
bd25485555 [project] generic naming standardized 2023-09-26 13:50:40 +08:00
Revone
ea8f993a4a [prettier] bracket spacing false 2023-09-22 10:43:16 +08:00
Revone
b263262a46 [project] github workflow added. eslint added. formating code by using prettier. 2023-09-21 12:52:17 +08:00
Revone
773c970667 Establish a unified code editor encoding standard by .editorconfig file. 2023-09-12 11:15:20 +08:00
Revone
450f051138 Optimize the overall codebase and directory structure. 2023-09-12 11:10:09 +08:00
Revone
6f86f71cdd Add sort method in heap.Ready to publish v1.20.0 2023-09-01 12:43:33 +08:00
Revone
2d1010b352 Rework the add, addMany, and fill methods of AbstractBinaryTree. Refactor the AddMany method of TreeMultiset. Fix the bug in TreeMultiset where all Node counts become 1 after calling the perfectBalance method. Remove the unnecessary configuration of autoIncrementId. 2023-08-31 20:02:31 +08:00
Revone
bd71edc536 images removed, heap docs revised 2023-08-31 00:50:23 +08:00
Revone
60e5824524 The APIs of Heap and Priority Queue got optimized 2023-08-31 00:18:13 +08:00
Revone
ea5f782577 rename the priority to priorityExtractor 2023-08-30 10:49:49 +08:00
Revone
c1b5969c51 Support TypeScript v5.1.6. Standardize all getters and setters. Adjust access permissions for accessors, set access permissions for protected or private member variables, and indicate them using the private identifier "_". 2023-08-21 16:17:01 +08:00