Skip to content

Commit

Permalink
typo
Browse files Browse the repository at this point in the history
  • Loading branch information
gbiagini97 authored Sep 8, 2019
1 parent 6fdd21b commit 0529e8f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Programmazione/progetti/mydb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ Once the csv file has been parsed and the linked list of the table has been init

For each element of the list the `void build_leaves(bnode *leaves[], record *sorted_list, int leaves_number);` will **create a node structure** which represents the atomic element of the tree. As the function name suggests, these fresh node structures are the leaves of the tree that will be created.

As you might have guessed the tree gets built from the bottom to the top. Having a sorted list by the chosen column, and then "converting" it to an array of `struct S_BNode` it's possible to **find medians** between each 2 nodes.
As you might have guessed the tree gets built from the bottom to the top. Having a sorted list by the chosen column, and then "converting" it to an array of `struct S_BNode` it's possible to **find medians** between every node.

This process is done recursively by the `bnode* build_tree(bnode *leaves[], int index_number, int nodes_number);` function, which at every iteration cuts in half the parameter `int nodes_number`. In the last iteration the funtion will return a pointer to a `struct S_BNode` that is the root of the tree.

Expand All @@ -152,4 +152,4 @@ If the user invokes the `.create-index` metacommand again, the previous tree wil
## Installation
This program has been developed under GNU/Linux and with GNU/Linux in mind, so it won't work on Windows.
The package comes with the [compile.sh](compile.sh) script that will compile the program and move the executable into the root folder of the package.
The [gbdb-test](gbdb-test) folder contains some csv format files to start playting around with the program.
The [gbdb-test](gbdb-test) folder contains some csv format files to start playting around with the program.

0 comments on commit 0529e8f

Please sign in to comment.