GithubHelp home page GithubHelp logo

btree's Introduction

B-tree

Functional implementation of B-tree structure in Scala.

General Info

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.

Requirements

  • Scala
  • IntelliJ IDEA with the Scala plugin installed (optional)

Build Project

Run

Use command sbt run in terminal, or execute the run task in IntelliJ IDEA.

Main Loop

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.

Available methods:
  • 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

Tests

In the src/test/scala directory are Unit Tests (written using the scalatest framework) for the implemented b-tree.

Samples of tests

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.

Running Tests:

Use command sbt test in terminal, or execute the test task in IntelliJ IDEA.

Scaladoc

Scaladoc in html version are stored in docs/html directory

How B-tree works

Example of b-tree

btree_example

Insert Method

Insert

Delete Method

Delete

Authors

  • Marcin Puc
  • Mateusz Wasiak

btree's People

Contributors

tranzystorekk avatar wasiollo avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.