Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Adding simple gitignore file template * Adding gradle project files * Adding search tree library file structure at project * Update nodes classes and interfaces with adding properties and update its methods * Update search-tree interface and simple init by abstract binary search tree properties as root and tree size * Update abstract node class to calling update data method for balanced tree's nodes * Adding simple ReadMe file with description about library by path ./lib/ReadMe.md * Adding LICENSE file with MIT-License description * Update LICENSE file with MIT-License description by fix names of the rights holders * feat(AVLTree): implement balance functions * feat(AVLTree): implement insert * feat(AVLTree): implement remove and removeWithDefault * refactor(AVLTreeNode): simplify updatingHeight and remove updateNodeData * feat: add general methods and rename file RedBlackTree * feat(Refactoring): The implementation of the removeWithDefault(K) method is placed in an abstract class. Clearing some todos from labels. Corrected the AVLTree.kt file by adding the missing maxDescendantForAVL(AVLTreeNode<K, V>) AVLTree method to the class. Added TODO marks in the BSTree file defining the implementation of the insert & remove methods * feat(Addding iterators): Add subdirrectory with files of intreface SearchTreeIterator and enum of orders to iterate on search trees and class of BinarySearchTreeIterator to iterate on BST and other implementations of it * feat(Adding iterators) * feat(Adding insert operation at RBTree) Add implementation of insert method of SearchTree at class RBTree and add new method at SearchTree interface with name insertIfAbsent * refactor: rewrite combine remove and insert for AVLTree and BSTree (not build) BREAKING CHANGE: implement methods for an AbstractBSTree, refactor AbstractBSTree, BSTree, SearchTree, SearchTreeNode, AbstractBSTreeNode, BSTreeNode. Add the pattern of ignoring to .gitignore * refactor(AVLTree & AVLTreeNode): combine code with AbstractBSTree. Add enter to .gitignore * refactor: update RBTree & RBTreeNode by combining the insert method with AbstractBSTree. Add implementation of the remove method at RBTree. Remove unnecessary interface of SearchTreeIterator. Update BinarySearchTreeIterator by implementing Iterator interface. Update ReadMe by adding info about finished trees * feat: Update lib/ReadMe.md by adding description of library and some examples of using it * feat: add simple root ReadMe for project with simple info upbout it * fix: invalid header which do not display information about the project on the github of root readme by removing it * feat: Adding doc-string for some source files. Docs integrated on IterationOrders.kt, BinarySearchTreeIterator.kt, RBTree.kt, RBTreeNode.kt and Utils.kt * docs(AVLTree & AVLTreeNode): add doc-strings * style: rename one method to 'contains' and rename the library to 'TreeTripper' * feat: add 'get' and 'set' methods to interact with trees as with a map * docs: add doc-strings for the classes and interfaces: SearchTree, SearchTreeNode, AbstractBSTree, AbstractBSTreeNode, BSTree, BSTreeNode * refactor: add more information to the ReadMe file withsome links to docs and more info about implementation about red-black tree * refactor: update info at root ReadMe file by updating roadmap and authors informations * test: add simple tests case for RBTree such as initializing tree, checking methods of node colors, update access params of method and properties from private to protected, add method to comparing by equals for nodes * fix: remove invalid assertion method for RBTreeTestAssistant which used for check results of left rotation for nodes * refactor: replace equals nodes methods to assertions utils file(AssertionUtils.kt) * test: add tests for utility methods to work with nodes * test: add tests for red-black tree node to check valid initialize and toString methods * refactor: update method source to template view: 'test%(test-name)Cases' * refactor: update test methods name to template view: 'test%(test-cause)' at RBTreeTest.kt file * test: add tests for private left and right node rotations methods * test: add test for private method to flip color of node and its childs colors * test: add tests for private methods of creation new tree node, updating root and add empty test for balance tree method * test(AVLTreeNode): add constructor for node, add tests for updateHeight * test(AVLTree): update access params of method from private to protected, add tests for balanceFactor, rotateLeft, rotateRight * test: update test for balance tree method by adding cases to test it * refactor: remove redundant information at file RBTreeTest.kt during object initialization, and remove unnecessary tree creation in the initialization test, remove commented-out code in file RBTreeNodeTest.kt * test(AVLTree): add tests for balance, add test for balanceFactor, changed how checkBalanceFactor works, refactor tests * test: add tests for insert methods such as insert 1 element, insert double unequals values by 1 key, insert sorted elements insert reversed of sorted elements and unsorted elements * refactor: update initialize test by adding assertion 'is tree with root equals null is RBTree' * refactor: remove output printing log information of insert tests * refactor: update private insert of test to test public tree method 'set' together with 'insert' * test(AVLTree): add tests for createNode, balanceTree * test(AVLTreeNode): add test for class field * test(BSTree): BSTreeTest and BSTreeTestAssistant classes are created. BSTree class is opened for BSTreeTestAssistant inheritance. Add tests for the check tree initialization, node creation and insert methods * test: add autotests that build the project and run tests with 'jacoco'. Add 'jacoco' in build.gradle.kts. Add '@DisplayName' for correct output of the test name to the console * docs: update ReadMe, delete ReadMe from lib/ * docs: update links in ReadMe * refactor: rename several methods according to their invariant. Renumber examples in ReadMe * test: add tests of basic methods for AbstractBSTree * docs: fix the typo in 'removeOrDefault' method * test(BSTree): add tests for 'updateRoot' and 'balanceTree' methods --------- Co-authored-by: IliaSuponeff <[email protected]> Co-authored-by: Maxim Rodionov <[email protected]> Co-authored-by: Friend-zva <[email protected]>
- Loading branch information