Functional implementation of B-tree structure in Scala.
Functional implementation of the B-tree structure in the Scala language. It is a project implemented as part of the JPS (Symbolic processing languages) course at the EiTI Faculty of Warsaw University of Technology. Project implemented in a two-person team.
- Scala
- IntelliJ IDEA with the Scala plugin installed (optional)
Use command sbt run in terminal, or execute the run task in IntelliJ IDEA.
Running project starts a main loop, which allows to use simple methods. It can show that b-tree really works. Those methods allow to use only integers, but b-tree can contain other comparable types.
- add [Int] - add value to BTree
- rm [Int] - remove value from BTree
- is [Int] - check if a value exists in BTree
- print - print a DFS view of BTree
- help - print help prompt
- exit - exit program
In the src/test/scala directory are Unit Tests (written using the scalatest framework) for the implemented b-tree.
When many values are inserted, BTree contains them.
When there are many values, and one is removed, then Btree no longer contains it.
When value is removed, BTree no longer contains it.
Use command sbt test in terminal, or execute the test task in IntelliJ IDEA.
Scaladoc in html version are stored in docs/html directory
- Marcin Puc
- Mateusz Wasiak