From 86b9f07d7be708424a77c19cd3fff661a2f998e5 Mon Sep 17 00:00:00 2001 From: Eldar <eldar.kasmamytov@gmail.com> Date: Mon, 12 Oct 2020 14:15:25 +0200 Subject: [PATCH 01/23] Initial commit [SkipList] - insert of first and second element - display function --- tp3/makefile | 19 ++++++ tp3/src/SkipList.cpp | 149 +++++++++++++++++++++++++++++++++++++++++++ tp3/src/SkipList.h | 50 +++++++++++++++ tp3/src/element.cpp | 9 +++ tp3/src/element.h | 10 +++ tp3/src/main.cpp | 14 ++++ 6 files changed, 251 insertions(+) create mode 100644 tp3/makefile create mode 100644 tp3/src/SkipList.cpp create mode 100644 tp3/src/SkipList.h create mode 100644 tp3/src/element.cpp create mode 100644 tp3/src/element.h create mode 100644 tp3/src/main.cpp diff --git a/tp3/makefile b/tp3/makefile new file mode 100644 index 0000000..d839cf9 --- /dev/null +++ b/tp3/makefile @@ -0,0 +1,19 @@ +all: bin/executable.out + +bin/executable.out: obj/main.o obj/SkipList.o obj/element.o + g++ -Wall -g obj/main.o obj/SkipList.o obj/element.o -o bin/executable.out + +obj/main.o: src/main.cpp src/SkipList.h src/element.h + g++ -Wall -g -c src/main.cpp -o obj/main.o + +obj/SkipList.o: src/SkipList.h src/SkipList.cpp src/element.h + g++ -Wall -g -c src/SkipList.cpp -o obj/SkipList.o + +obj/element.o: src/element.h src/element.cpp + g++ -Wall -g -c src/element.cpp -o obj/element.o + +clean: + rm obj/* + +veryclean: clean + rm bin/* \ No newline at end of file diff --git a/tp3/src/SkipList.cpp b/tp3/src/SkipList.cpp new file mode 100644 index 0000000..7167e75 --- /dev/null +++ b/tp3/src/SkipList.cpp @@ -0,0 +1,149 @@ +#include "SkipList.h" + +SkipList::SkipList () { + ad = new Cellule; + ad->niveaux.push_back(nullptr); + count = 0; + nb_niveaux = 1; +} + +SkipList::~SkipList () { + +} + +bool SkipList::estVide() { return count == 0; } + +void SkipList::inserer (const Elem& e) { + if (estVide()) { + Cellule* snt = new Cellule; + snt->info = e; + snt->niveaux.push_back(nullptr); + ad->niveaux[0] = snt; + // ad = new Cellule; + // ad->info = e; + // ad->niveaux.push_back(nullptr); + ++count; + } + else if (count == 1) { + if (e < ad->niveaux[0]->info) { + Cellule* temp = ad->niveaux[0]; + ad->niveaux[0] = new Cellule; + ad->niveaux[0]->info = e; + ad->niveaux[0]->niveaux.push_back(temp); + + srand(time(NULL)); + unsigned int rand_num = rand() % 2; + + while(rand_num) { + ad->niveaux[0]->niveaux.push_back(nullptr); + ad->niveaux.push_back(ad->niveaux[0]); + ++nb_niveaux; + + rand_num = rand() % 2; + } + + // Cellule* temp = ad; + // ad = new Cellule; + // ad->info = e; + // ad->niveaux.push_back(temp); + + // srand(time(NULL)); + // unsigned int rand_num = rand() % 2; + + // while(rand_num) { + // ad->niveaux.push_back(nullptr); + // ++nb_niveaux; + + // rand_num = rand() % 2; + // } + + ++count; + } + else if (e > ad->niveaux[0]->info) { + + Cellule* temp = new Cellule; + temp->info = e; + temp->niveaux.push_back(nullptr); + ad->niveaux[0]->niveaux[0] = temp; + + srand(time(NULL)); + unsigned int rand_num = rand() % 2; + + while(rand_num) { + temp->niveaux.push_back(nullptr); + ad->niveaux.push_back(temp); + ++nb_niveaux; + + rand_num = rand() % 2; + } + + // Cellule* temp = new Cellule; + // temp->info = e; + // temp->niveaux.push_back(nullptr); + // ad->niveaux[0] = temp; + + // srand(time(NULL)); + // unsigned int rand_num = rand() % 2; + + // while(rand_num) { + // temp->niveaux.push_back(nullptr); + // ++nb_niveaux; + + // rand_num = rand() % 2; + // } + + ++count; + } + } + else { + unsigned int i = ad->niveaux.size()-1; + + if(e < ad->niveaux.at(i)->info) { + } + } +} + +void SkipList::afficher() const { + Cellule* current_address; + unsigned int current_lvl = nb_niveaux; + unsigned int current_lvl_index = current_lvl == 1 ? 0 : current_lvl-1; + + while(current_lvl != 0) { + current_address = ad->niveaux[current_lvl_index]; + + std::cout << "LEVEL " << current_lvl << " | "; + + while(current_address != nullptr) { + std::cout << "[" << current_address->info << "] -> "; + + current_address = current_address->niveaux[current_lvl_index]; + } + + if (current_address == nullptr) { + std::cout << "NULL"; + } + + std::cout << std::endl; + + --current_lvl_index; + --current_lvl; + } +} + +// void SkipList::etablirProchainNiveau () { +// Cellule* current_address = ad; +// Cellule* temp = ad; // Derniere cellule sur laquelle on a eu pile + +// unsigned int rand_num; +// while(current_address != nullptr) { +// srand(time(NULL)); +// rand_num = rand() % 2; + +// if (rand_num && temp != ad) { +// temp->niveaux.push_back(current_address); +// temp = current_address; +// } + +// current_address = current_address->niveaux[current_address->niveaux.size()-1]; +// } +// } \ No newline at end of file diff --git a/tp3/src/SkipList.h b/tp3/src/SkipList.h new file mode 100644 index 0000000..4a65125 --- /dev/null +++ b/tp3/src/SkipList.h @@ -0,0 +1,50 @@ +#ifndef _SKIPLIST +#define _SKIPLIST + +#include "element.h" +#include <iostream> +#include <vector> + +class SkipList; + +class Cellule { + friend class SkipList; + + private: + Elem info; + std::vector<Cellule*> niveaux; +}; + +class SkipList { + public: + //Constructeurs------------------------------------------------------------- + SkipList(); + //Postcondition : la SkipList initialisee est vide + + SkipList(const SkipList & l); + //Postcondition : la SkipList initialisee et l correspondent a des SkipLists identiques + // (mais elles sont totalement independantes l'une de l'autre) + + //Destructeur--------------------------------------------------------------- + ~SkipList(); + + //Fonctions membres--------------------------------------------------------- + void inserer(const Elem& e); + //Precondition : la Skip List est triee + //Postcondition : l'element "e" est insere dans la Skip List + + void afficher() const; + + bool estVide(); + + // void etablirProchainNiveau(); + + private: + + //Donnees membres----------------------------------------------------------- + Cellule *ad; + unsigned int count; + unsigned int nb_niveaux; +}; + +#endif \ No newline at end of file diff --git a/tp3/src/element.cpp b/tp3/src/element.cpp new file mode 100644 index 0000000..ef9b7c3 --- /dev/null +++ b/tp3/src/element.cpp @@ -0,0 +1,9 @@ +// LIFAP6 - Automne 2017 - R. Chaine + +#include <cstdio> +#include "element.h" + +void affichageElement(const Elem & e) +{ + std::printf("%d ",e); +} diff --git a/tp3/src/element.h b/tp3/src/element.h new file mode 100644 index 0000000..07448ad --- /dev/null +++ b/tp3/src/element.h @@ -0,0 +1,10 @@ +// LIFAP6 - Automne 2017 - R. Chaine + +#ifndef _ELEMENT +#define _ELEMENT + +typedef int Elem; + +void affichageElement(const Elem & e); + +#endif diff --git a/tp3/src/main.cpp b/tp3/src/main.cpp new file mode 100644 index 0000000..2234cb6 --- /dev/null +++ b/tp3/src/main.cpp @@ -0,0 +1,14 @@ +#include "SkipList.h" +#include <iostream> + +int main() { + SkipList l; + + l.inserer(5); + l.inserer(6); + l.inserer(4); + + l.afficher(); + + return 0; +} \ No newline at end of file -- GitLab From c0c9c25ef17a66eeb1d905c683797b1b3b14ca73 Mon Sep 17 00:00:00 2001 From: Eldar <eldar.kasmamytov@gmail.com> Date: Wed, 14 Oct 2020 14:18:09 +0200 Subject: [PATCH 02/23] Initial Commit [Table] Tables de Hachage --- tp5/Table de Hachage/makefile | 19 +++++++++++++++++++ tp5/Table de Hachage/src/element.cpp | 9 +++++++++ tp5/Table de Hachage/src/element.h | 10 ++++++++++ tp5/Table de Hachage/src/main.cpp | 9 +++++++++ tp5/Table de Hachage/src/table.cpp | 1 + tp5/Table de Hachage/src/table.h | 6 ++++++ 6 files changed, 54 insertions(+) create mode 100644 tp5/Table de Hachage/makefile create mode 100644 tp5/Table de Hachage/src/element.cpp create mode 100644 tp5/Table de Hachage/src/element.h create mode 100644 tp5/Table de Hachage/src/main.cpp create mode 100644 tp5/Table de Hachage/src/table.cpp create mode 100644 tp5/Table de Hachage/src/table.h diff --git a/tp5/Table de Hachage/makefile b/tp5/Table de Hachage/makefile new file mode 100644 index 0000000..125a879 --- /dev/null +++ b/tp5/Table de Hachage/makefile @@ -0,0 +1,19 @@ +all: bin/executable.out + +bin/executable.out: obj/main.o obj/table.o obj/element.o + g++ -Wall -g obj/main.o obj/table.o obj/element.o -o bin/executable.out + +obj/main.o: src/main.cpp src/table.h src/element.h + g++ -Wall -g -c src/main.cpp -o obj/main.o + +obj/table.o: src/table.h src/table.cpp src/element.h + g++ -Wall -g -c src/table.cpp -o obj/table.o + +obj/element.o: src/element.h src/element.cpp + g++ -Wall -g -c src/element.cpp -o obj/element.o + +clean: + rm obj/* + +veryclean: clean + rm bin/* \ No newline at end of file diff --git a/tp5/Table de Hachage/src/element.cpp b/tp5/Table de Hachage/src/element.cpp new file mode 100644 index 0000000..ef9b7c3 --- /dev/null +++ b/tp5/Table de Hachage/src/element.cpp @@ -0,0 +1,9 @@ +// LIFAP6 - Automne 2017 - R. Chaine + +#include <cstdio> +#include "element.h" + +void affichageElement(const Elem & e) +{ + std::printf("%d ",e); +} diff --git a/tp5/Table de Hachage/src/element.h b/tp5/Table de Hachage/src/element.h new file mode 100644 index 0000000..07448ad --- /dev/null +++ b/tp5/Table de Hachage/src/element.h @@ -0,0 +1,10 @@ +// LIFAP6 - Automne 2017 - R. Chaine + +#ifndef _ELEMENT +#define _ELEMENT + +typedef int Elem; + +void affichageElement(const Elem & e); + +#endif diff --git a/tp5/Table de Hachage/src/main.cpp b/tp5/Table de Hachage/src/main.cpp new file mode 100644 index 0000000..5586453 --- /dev/null +++ b/tp5/Table de Hachage/src/main.cpp @@ -0,0 +1,9 @@ +#include "element.h" +#include "table.h" +#include <cstdio> + +int main() +{ + + return 0; +} diff --git a/tp5/Table de Hachage/src/table.cpp b/tp5/Table de Hachage/src/table.cpp new file mode 100644 index 0000000..dae816d --- /dev/null +++ b/tp5/Table de Hachage/src/table.cpp @@ -0,0 +1 @@ +#include "table.h" \ No newline at end of file diff --git a/tp5/Table de Hachage/src/table.h b/tp5/Table de Hachage/src/table.h new file mode 100644 index 0000000..fc38228 --- /dev/null +++ b/tp5/Table de Hachage/src/table.h @@ -0,0 +1,6 @@ +#include "element.h" +#include <iostream> + +class Table { + +}; \ No newline at end of file -- GitLab From 8204258ae7c2c2f3ff6e3ae4d54bffcaeb6be724 Mon Sep 17 00:00:00 2001 From: Eldar <eldar.kasmamytov@gmail.com> Date: Wed, 14 Oct 2020 17:00:10 +0200 Subject: [PATCH 03/23] Table works [work in progress] --- tp5/Table de Hachage/src/element.cpp | 9 ++-- tp5/Table de Hachage/src/element.h | 8 ++-- tp5/Table de Hachage/src/hash_functions.cpp | 10 +++++ tp5/Table de Hachage/src/table.cpp | 40 +++++++++++++++++- tp5/Table de Hachage/src/table.h | 47 +++++++++++++++++++-- 5 files changed, 100 insertions(+), 14 deletions(-) create mode 100644 tp5/Table de Hachage/src/hash_functions.cpp diff --git a/tp5/Table de Hachage/src/element.cpp b/tp5/Table de Hachage/src/element.cpp index ef9b7c3..021a81b 100644 --- a/tp5/Table de Hachage/src/element.cpp +++ b/tp5/Table de Hachage/src/element.cpp @@ -1,9 +1,6 @@ -// LIFAP6 - Automne 2017 - R. Chaine - -#include <cstdio> +#include <iostream> #include "element.h" -void affichageElement(const Elem & e) -{ - std::printf("%d ",e); +void Element::affiche() const { + std::cout << key << std::endl; } diff --git a/tp5/Table de Hachage/src/element.h b/tp5/Table de Hachage/src/element.h index 07448ad..8f6afd1 100644 --- a/tp5/Table de Hachage/src/element.h +++ b/tp5/Table de Hachage/src/element.h @@ -1,10 +1,10 @@ -// LIFAP6 - Automne 2017 - R. Chaine - #ifndef _ELEMENT #define _ELEMENT -typedef int Elem; +struct Element { + int key; -void affichageElement(const Elem & e); + void affiche() const; +}; #endif diff --git a/tp5/Table de Hachage/src/hash_functions.cpp b/tp5/Table de Hachage/src/hash_functions.cpp new file mode 100644 index 0000000..69d1443 --- /dev/null +++ b/tp5/Table de Hachage/src/hash_functions.cpp @@ -0,0 +1,10 @@ +#ifndef _HASH_FUNCTIONS +#define _HASH_FUNCTIONS + +#include "element.h" + +unsigned int hash_modulo (const Key& k, unsigned int size) { + return k % size; +} + +#endif \ No newline at end of file diff --git a/tp5/Table de Hachage/src/table.cpp b/tp5/Table de Hachage/src/table.cpp index dae816d..b578371 100644 --- a/tp5/Table de Hachage/src/table.cpp +++ b/tp5/Table de Hachage/src/table.cpp @@ -1 +1,39 @@ -#include "table.h" \ No newline at end of file +#include "table.h" +#include "hash_functions.cpp" +#include <iostream> + +Table::Table (unsigned int size) { + max_elements = size; + nb_elements = 0; + + elements = new Case[size]; + hash = hash_modulo; +} + +Table::~Table () { + delete [] elements; +} + +// void Table::add (const Element& e) { +// assert(nb_elements < max_elements); + +// unsigned int hash_code = hash(e, max_elements); + +// while(!elements[hash_code].free) { +// hash_code = hash_step(e.key, hash_code); +// } + +// if (elements[hash_code].free) { +// elements[hash_code].element = e; +// elements[hash_code].free = false; +// ++nb_elements; +// } +// } + +// void Table::show () const { +// for(unsigned int i=0; i<max_elements; ++i) { +// if(!elements[i].free) { +// std::cout << elements[i]. +// } +// } +// } \ No newline at end of file diff --git a/tp5/Table de Hachage/src/table.h b/tp5/Table de Hachage/src/table.h index fc38228..1583775 100644 --- a/tp5/Table de Hachage/src/table.h +++ b/tp5/Table de Hachage/src/table.h @@ -1,6 +1,47 @@ +#ifndef _TABLE +#define _TABLE + +typedef int Key; + #include "element.h" -#include <iostream> + +class Table; + +class Case { + friend class Table; + + private: + Element element; + bool free; + + public: + Case() : free(true) {} + Case(const Element& e) : element(e), free(false) {} + + void set(const Element& e) { element=e; free=false; } + Element get() const { return element; } + + bool isFree() const { return free; } +}; class Table { - -}; \ No newline at end of file + private: + Case* elements; + + unsigned int max_elements; + unsigned int nb_elements; + + unsigned int (*hash)(const Key&, unsigned int); + unsigned int (*hash_step)(Key, unsigned int); + + public: + Table(unsigned int size); + ~Table(); + + void add(const Element& e); + void remove(unsigned int hash_code); + void show() const; + +}; + +#endif \ No newline at end of file -- GitLab From a1e0d4e4c6669f9aa41da15e8931846f20825f47 Mon Sep 17 00:00:00 2001 From: Eldar <eldar.kasmamytov@gmail.com> Date: Wed, 14 Oct 2020 17:18:48 +0200 Subject: [PATCH 04/23] Works Good --- tp5/Table de Hachage/src/element.h | 4 +- tp5/Table de Hachage/src/hash_functions.cpp | 4 ++ tp5/Table de Hachage/src/main.cpp | 15 ++++-- tp5/Table de Hachage/src/table.cpp | 55 ++++++++++++--------- tp5/Table de Hachage/src/table.h | 3 +- 5 files changed, 53 insertions(+), 28 deletions(-) diff --git a/tp5/Table de Hachage/src/element.h b/tp5/Table de Hachage/src/element.h index 8f6afd1..60786fc 100644 --- a/tp5/Table de Hachage/src/element.h +++ b/tp5/Table de Hachage/src/element.h @@ -1,8 +1,10 @@ #ifndef _ELEMENT #define _ELEMENT +typedef int Key; + struct Element { - int key; + Key key; void affiche() const; }; diff --git a/tp5/Table de Hachage/src/hash_functions.cpp b/tp5/Table de Hachage/src/hash_functions.cpp index 69d1443..de191b4 100644 --- a/tp5/Table de Hachage/src/hash_functions.cpp +++ b/tp5/Table de Hachage/src/hash_functions.cpp @@ -7,4 +7,8 @@ unsigned int hash_modulo (const Key& k, unsigned int size) { return k % size; } +unsigned int pas_de_hash_lin (const Key& k, unsigned int numero_essai) { + return 1; +} + #endif \ No newline at end of file diff --git a/tp5/Table de Hachage/src/main.cpp b/tp5/Table de Hachage/src/main.cpp index 5586453..33f1170 100644 --- a/tp5/Table de Hachage/src/main.cpp +++ b/tp5/Table de Hachage/src/main.cpp @@ -1,9 +1,18 @@ #include "element.h" #include "table.h" -#include <cstdio> -int main() -{ +int main() { + Table t(10); + + Element e; + e.key = 5; + + Element e2; + e2.key = 2; + + t.add(e); + t.add(e2); + t.show(); return 0; } diff --git a/tp5/Table de Hachage/src/table.cpp b/tp5/Table de Hachage/src/table.cpp index b578371..6185a2e 100644 --- a/tp5/Table de Hachage/src/table.cpp +++ b/tp5/Table de Hachage/src/table.cpp @@ -8,32 +8,41 @@ Table::Table (unsigned int size) { elements = new Case[size]; hash = hash_modulo; + hash_step = pas_de_hash_lin; } Table::~Table () { delete [] elements; } -// void Table::add (const Element& e) { -// assert(nb_elements < max_elements); - -// unsigned int hash_code = hash(e, max_elements); - -// while(!elements[hash_code].free) { -// hash_code = hash_step(e.key, hash_code); -// } - -// if (elements[hash_code].free) { -// elements[hash_code].element = e; -// elements[hash_code].free = false; -// ++nb_elements; -// } -// } - -// void Table::show () const { -// for(unsigned int i=0; i<max_elements; ++i) { -// if(!elements[i].free) { -// std::cout << elements[i]. -// } -// } -// } \ No newline at end of file +void Table::add (const Element& e) { + assert(nb_elements < max_elements); + + unsigned int hash_code = hash(e.key, max_elements); + unsigned int numero_essai = 1; + + while(!elements[hash_code].free) { + hash_code += hash_step(e.key, numero_essai++); + } + + if (elements[hash_code].free) { + elements[hash_code].element = e; + elements[hash_code].free = false; + ++nb_elements; + } +} + +void Table::show () const { + for(unsigned int i=0; i<max_elements; ++i) { + if(!elements[i].free) { + std::cout << "[" << elements[i].element.key << "]"; + if (i==max_elements-1) std::cout << std::endl; + else std::cout << " , "; + } + else { + std::cout << "[ ]"; + if (i==max_elements-1) std::cout << std::endl; + else std::cout << " , "; + } + } +} \ No newline at end of file diff --git a/tp5/Table de Hachage/src/table.h b/tp5/Table de Hachage/src/table.h index 1583775..42142f1 100644 --- a/tp5/Table de Hachage/src/table.h +++ b/tp5/Table de Hachage/src/table.h @@ -4,6 +4,7 @@ typedef int Key; #include "element.h" +#include <assert.h> class Table; @@ -32,7 +33,7 @@ class Table { unsigned int nb_elements; unsigned int (*hash)(const Key&, unsigned int); - unsigned int (*hash_step)(Key, unsigned int); + unsigned int (*hash_step)(const Key&, unsigned int); public: Table(unsigned int size); -- GitLab From 0fa0ae2398255ece5ec824c3bc6f4a80744e221e Mon Sep 17 00:00:00 2001 From: Eldar <eldar.kasmamytov@gmail.com> Date: Wed, 14 Oct 2020 23:02:36 +0200 Subject: [PATCH 05/23] Works Better --- tp5/Table de Hachage/makefile | 11 +++---- tp5/Table de Hachage/src/element.cpp | 6 ---- tp5/Table de Hachage/src/element.h | 12 -------- tp5/Table de Hachage/src/hash_functions.cpp | 4 +-- tp5/Table de Hachage/src/key.h | 6 ++++ tp5/Table de Hachage/src/main.cpp | 18 ++++++------ tp5/Table de Hachage/src/table.cpp | 32 ++++++++++----------- tp5/Table de Hachage/src/table.h | 14 ++++----- 8 files changed, 44 insertions(+), 59 deletions(-) delete mode 100644 tp5/Table de Hachage/src/element.cpp delete mode 100644 tp5/Table de Hachage/src/element.h create mode 100644 tp5/Table de Hachage/src/key.h diff --git a/tp5/Table de Hachage/makefile b/tp5/Table de Hachage/makefile index 125a879..76416f2 100644 --- a/tp5/Table de Hachage/makefile +++ b/tp5/Table de Hachage/makefile @@ -1,17 +1,14 @@ all: bin/executable.out -bin/executable.out: obj/main.o obj/table.o obj/element.o - g++ -Wall -g obj/main.o obj/table.o obj/element.o -o bin/executable.out +bin/executable.out: obj/main.o obj/table.o + g++ -Wall -g obj/main.o obj/table.o -o bin/executable.out -obj/main.o: src/main.cpp src/table.h src/element.h +obj/main.o: src/main.cpp src/table.h src/key.h g++ -Wall -g -c src/main.cpp -o obj/main.o -obj/table.o: src/table.h src/table.cpp src/element.h +obj/table.o: src/table.h src/table.cpp src/key.h g++ -Wall -g -c src/table.cpp -o obj/table.o -obj/element.o: src/element.h src/element.cpp - g++ -Wall -g -c src/element.cpp -o obj/element.o - clean: rm obj/* diff --git a/tp5/Table de Hachage/src/element.cpp b/tp5/Table de Hachage/src/element.cpp deleted file mode 100644 index 021a81b..0000000 --- a/tp5/Table de Hachage/src/element.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include <iostream> -#include "element.h" - -void Element::affiche() const { - std::cout << key << std::endl; -} diff --git a/tp5/Table de Hachage/src/element.h b/tp5/Table de Hachage/src/element.h deleted file mode 100644 index 60786fc..0000000 --- a/tp5/Table de Hachage/src/element.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef _ELEMENT -#define _ELEMENT - -typedef int Key; - -struct Element { - Key key; - - void affiche() const; -}; - -#endif diff --git a/tp5/Table de Hachage/src/hash_functions.cpp b/tp5/Table de Hachage/src/hash_functions.cpp index de191b4..e75ae99 100644 --- a/tp5/Table de Hachage/src/hash_functions.cpp +++ b/tp5/Table de Hachage/src/hash_functions.cpp @@ -1,13 +1,13 @@ #ifndef _HASH_FUNCTIONS #define _HASH_FUNCTIONS -#include "element.h" +#include "key.h" unsigned int hash_modulo (const Key& k, unsigned int size) { return k % size; } -unsigned int pas_de_hash_lin (const Key& k, unsigned int numero_essai) { +unsigned int hash_skip_linear (const Key& k, unsigned int try_nb) { return 1; } diff --git a/tp5/Table de Hachage/src/key.h b/tp5/Table de Hachage/src/key.h new file mode 100644 index 0000000..cbe180a --- /dev/null +++ b/tp5/Table de Hachage/src/key.h @@ -0,0 +1,6 @@ +#ifndef _KEY +#define _KEY + +typedef int Key; + +#endif diff --git a/tp5/Table de Hachage/src/main.cpp b/tp5/Table de Hachage/src/main.cpp index 33f1170..0268fab 100644 --- a/tp5/Table de Hachage/src/main.cpp +++ b/tp5/Table de Hachage/src/main.cpp @@ -1,17 +1,19 @@ -#include "element.h" #include "table.h" int main() { Table t(10); - Element e; - e.key = 5; + t.add(8); + t.add(2); + t.add(2); + t.add(2); + t.add(3); + t.add(7); + t.add(9); + t.add(4); + t.add(1); + t.add(6); - Element e2; - e2.key = 2; - - t.add(e); - t.add(e2); t.show(); return 0; diff --git a/tp5/Table de Hachage/src/table.cpp b/tp5/Table de Hachage/src/table.cpp index 6185a2e..d01a369 100644 --- a/tp5/Table de Hachage/src/table.cpp +++ b/tp5/Table de Hachage/src/table.cpp @@ -8,41 +8,41 @@ Table::Table (unsigned int size) { elements = new Case[size]; hash = hash_modulo; - hash_step = pas_de_hash_lin; + hash_step = hash_skip_linear; } Table::~Table () { delete [] elements; } -void Table::add (const Element& e) { +void Table::add (const Key& key) { assert(nb_elements < max_elements); - unsigned int hash_code = hash(e.key, max_elements); - unsigned int numero_essai = 1; + unsigned int hash_code = hash(key, max_elements); + unsigned int try_nb = 1; while(!elements[hash_code].free) { - hash_code += hash_step(e.key, numero_essai++); + hash_code += hash_step(key, try_nb++); + if(hash_code >= max_elements) { + hash_code = hash_code % max_elements; + } } if (elements[hash_code].free) { - elements[hash_code].element = e; + elements[hash_code].key = key; elements[hash_code].free = false; ++nb_elements; } } void Table::show () const { + std::cout << "Maximum elements: " << max_elements << std::endl; + std::cout << "Elements stored: " << nb_elements << std::endl; for(unsigned int i=0; i<max_elements; ++i) { - if(!elements[i].free) { - std::cout << "[" << elements[i].element.key << "]"; - if (i==max_elements-1) std::cout << std::endl; - else std::cout << " , "; - } - else { - std::cout << "[ ]"; - if (i==max_elements-1) std::cout << std::endl; - else std::cout << " , "; - } + if(!elements[i].free) std::cout << "[" << elements[i].key << "]"; + else std::cout << "[ ]"; + + if (i==max_elements-1) std::cout << std::endl; + else std::cout << " "; } } \ No newline at end of file diff --git a/tp5/Table de Hachage/src/table.h b/tp5/Table de Hachage/src/table.h index 42142f1..10c7633 100644 --- a/tp5/Table de Hachage/src/table.h +++ b/tp5/Table de Hachage/src/table.h @@ -1,9 +1,7 @@ #ifndef _TABLE #define _TABLE -typedef int Key; - -#include "element.h" +#include "key.h" #include <assert.h> class Table; @@ -12,15 +10,15 @@ class Case { friend class Table; private: - Element element; + Key key; bool free; public: Case() : free(true) {} - Case(const Element& e) : element(e), free(false) {} + Case(const Key& k) : key(k), free(false) {} - void set(const Element& e) { element=e; free=false; } - Element get() const { return element; } + void set(const Key& k) { key=k; free=false; } + Key get() const { return key; } bool isFree() const { return free; } }; @@ -39,7 +37,7 @@ class Table { Table(unsigned int size); ~Table(); - void add(const Element& e); + void add(const Key& e); void remove(unsigned int hash_code); void show() const; -- GitLab From bd0819f9eab0db6cadc96297d48dc1984b8a0407 Mon Sep 17 00:00:00 2001 From: Eldar <eldar.kasmamytov@gmail.com> Date: Wed, 21 Oct 2020 14:22:04 +0200 Subject: [PATCH 06/23] Initial Commit [ABR] --- .../bin/executable.out | Bin 0 -> 32928 bytes tp6/ArbreBinaireDeRecherche/makefile | 19 ++++++++++++++++++ tp6/ArbreBinaireDeRecherche/obj/abr.o | Bin 0 -> 37872 bytes tp6/ArbreBinaireDeRecherche/obj/element.o | Bin 0 -> 8816 bytes tp6/ArbreBinaireDeRecherche/obj/main.o | Bin 0 -> 3576 bytes tp6/ArbreBinaireDeRecherche/src/abr.cpp | 10 +++++++++ tp6/ArbreBinaireDeRecherche/src/abr.h | 16 +++++++++++++++ tp6/ArbreBinaireDeRecherche/src/element.cpp | 9 +++++++++ tp6/ArbreBinaireDeRecherche/src/element.h | 10 +++++++++ tp6/ArbreBinaireDeRecherche/src/main.cpp | 7 +++++++ 10 files changed, 71 insertions(+) create mode 100755 tp6/ArbreBinaireDeRecherche/bin/executable.out create mode 100644 tp6/ArbreBinaireDeRecherche/makefile create mode 100644 tp6/ArbreBinaireDeRecherche/obj/abr.o create mode 100644 tp6/ArbreBinaireDeRecherche/obj/element.o create mode 100644 tp6/ArbreBinaireDeRecherche/obj/main.o create mode 100644 tp6/ArbreBinaireDeRecherche/src/abr.cpp create mode 100644 tp6/ArbreBinaireDeRecherche/src/abr.h create mode 100644 tp6/ArbreBinaireDeRecherche/src/element.cpp create mode 100644 tp6/ArbreBinaireDeRecherche/src/element.h create mode 100644 tp6/ArbreBinaireDeRecherche/src/main.cpp diff --git a/tp6/ArbreBinaireDeRecherche/bin/executable.out b/tp6/ArbreBinaireDeRecherche/bin/executable.out new file mode 100755 index 0000000000000000000000000000000000000000..0730e12a86b98ecd1b8fd95aa55692e18b8fea14 GIT binary patch literal 32928 zcmeHwd3;;Nwf|f#*RmYja-0}Dt8g|a#*XbciIX_1<=7@G*;s=j%d#zE%SM*tgccGA zTL^*BmKG>2kkYagT4*VS(iSL`r3>YizLr;73N1WBp^tQdvgdujXYQ3`St)t%^Zxt& zu0OhG=A1KU&YYP!b7ro5wYz!sN{3-6`*Nx!in$}E#w@c4{+(6=V3}%Axwx0B6BXH9 zg46V68i1;=cP-I2^jLT&Aj>s4G$IpDu=s3fYe?v}XxYHcc^Yd&rTl_mIqJG6U$TIH zN!ak9rN?y^w97Hea@SequCvP7P}%$zwA;tF@w3UoXTktzylhBbUh7{?bTEBou4G5R z4vkhew9B1>a#ojF9RC{lEb<1czGK;CkEOp2?S7cu6K$VYKf9-+swWy7+*!4=VP4g| z`s#tc>N;sR<&(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6/ArbreBinaireDeRecherche/makefile @@ -0,0 +1,19 @@ +all: bin/executable.out + +bin/executable.out: obj/main.o obj/abr.o obj/element.o + g++ -Wall -g obj/main.o obj/abr.o obj/element.o -o bin/executable.out + +obj/main.o: src/main.cpp src/abr.h src/element.h + g++ -Wall -g -c src/main.cpp -o obj/main.o + +obj/abr.o: src/abr.h src/abr.cpp src/element.h + g++ -Wall -g -c src/abr.cpp -o obj/abr.o + +obj/element.o: src/element.h src/element.cpp + g++ -Wall -g -c src/element.cpp -o obj/element.o + +clean: + rm obj/* + +veryclean: clean + rm bin/* \ No newline at end of file diff --git a/tp6/ArbreBinaireDeRecherche/obj/abr.o b/tp6/ArbreBinaireDeRecherche/obj/abr.o new file mode 100644 index 0000000000000000000000000000000000000000..9af141c353199ffdda1ccc5a101b3accb9577b46 GIT binary patch literal 37872 zcmb__34B!5_5YhJBqTrrfv{uPmyngPhk!tUuoD&)#bGj;Bm<L~I5SzW1yn4qC~9j( zZAEOgF1WN-YpuJ8S}Rs<YxU>yYiqUE{<O7PQColKd+xb!CMSvV|9$@N!@PU%_ndq0 zx#ymH?($w9yQ^0&N%43bdwHBHCy}zK<CI>Oh%eyi0%x$3?`&Ll(c8-|+WG0SOR7Iz zc9aSGw>)7{8{PAM?nOJlxTy8hJv+bfw3eT{^V2WCbez`7%l6GfmUnSmwr`LLrgLyf zItLdWW#ay4xXg!<?GecL?hn5F^2;qxfQPSLlN~3GW0@?zi3<_I?xc7M;u*bW(LFUS zJs6HVX^3-;LsC;)Dc*~IL@YvJ;^}}hO}rQ4xlTsrVqhmPtaUO|dq3l{W`peX2A<jv zQO_-OJ50YUFge+{rRL!7d5CU|W<dlJEAtz4PXk|{SiIgD?z~7v^aUyN-~BTG{U$|n z(iUtVfZ&pk`y<#lb|8YwW^-`)Mh^C0z`+%VIJoi&4z7BGgKvMv!FTcpA>Y+gIr#1@ z4z4+qg9Cdwxb_APu6ve)>)+<!`=4`ga6~?`-#CkdL+d&C!43{?Il#ef4|8z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fkliEem<gmowXqnCEh5BcGb zwEX80re#9Tol^1NRL5%Goy6N+{U1vGwx3WxrWRfQWrU$j-Og<l1k%+k^OQ*?WVLb} zAVPQff49!$kZ!Qq-L~5Nha|ttAQ4ZkMoik~v()=30!)veOv!(ZWt7mi-@-qpNO$_n z+-Eqp3M2G~Db?n;dhM=mWH~7H9~8l`?8g>J=kHCJ>S993pKav8Nl^_}N&ZXx?(#Q@ M{EwMp+`G>IzwmQ&T>t<8 literal 0 HcmV?d00001 diff --git a/tp6/ArbreBinaireDeRecherche/obj/element.o b/tp6/ArbreBinaireDeRecherche/obj/element.o new file mode 100644 index 0000000000000000000000000000000000000000..eba3191f18a3a138a3143792870b4499934c2f9b GIT binary patch literal 8816 zcmbtZeQ;b=6~Avco4jU|?I!6*N}95z9~NSElahwCv?Xmxo0Lu|rBw#d=YG7GUAlR@ zefu^|K?+!e*0xgoLkmMkDvJCepCZEygD@k4I&}ucQ4keIL75R1M6^tc^_+9h-QC`9 z#~HmdyXTzWJ@=e*&%O7&cXw|Y*|a`j7(z8etQJ*Cp+fX^SNUOLhs8`WLu?=2|MuwK zccY{GZ$2@4VC2LBvH!)<L#t5ZY5aNzzYhQS2a7T>v8_pn29$+KE+kKY{901O2TFcM zw2B7M3?dx-xFPuQ5HO)Ysuhq>AUy&GLIL|>BF+zqjQ^TQ_B|rG#t^F9&_!fNKau=a zA`>2wod=0{j}!4<CQ^Qn$Yfh14xjo2k=?6^>=`4n_c|iC7m0lFOGNIxkI2675;^cH zkwbqVa@PqU0zV>nItJ5%YyfK*CVZx2LZ%_m@M;h6%_j9W8zy4S0Vy>wNJg3i5Tg*` zhEUG+VE{>FB6RS2Fd^AP$hMfR=51)zppg;er{myP8$ZNcMv-s)=XQXZKY0`Iro>Mn zAC>&a$ahNq-^j-#e;WBEZDdCnDD+9eAYn)f0TPC#&_Ked6hb6ykwPO0*GR!M-hc={ zCxvF?Z4k0jXfZJ0q7<Se_)=&$($F&{g;~aO5N?&iY-0lmUywql@n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HG(D4{qleTN^ zi+E}G1l$OL`ktg&#d&r<8Taur7tbX9q==_VB@y=uQlQ?9ohpx8IoBzG4)Mtp+@U8y z4F@yiCE?<WL#r74(q*e5;7`QUg$ewPNyJ_FxgiceR>02<aCPHBcGhw{{5|9UZI}nl zO>HjG<}iLiQ}+ZZNnOPw#eZ^e3k}1kw!OnI;C&3X14TdTJ&pcq0eLawyd6N2Evp!f z@^V&C{9O`l{;%WvVXVG4(75u?#{(g1x_|tUO~+6%PufCU!~2-UvvlzuQ7?a;m@sH2 z9wcZe;u`7s+Xz@a|1YrLUud10C_ZzJ@kjWwqt*}9sOjUc0kmHHF}}#C@fbgv)Z@qZ z5Zxv~;z#WNsMe{8l;?W>x3GV;&(J^Kx^@3p@6o1;6Ig0CU(r`<8$kJ2bRTHf8~*_P zT`9yxY)=t2PSLx0yy{o<r#xQCimGu+eh?VM&ZuD^zs%!@lp<3#e+3@{re6NCb@CSl zT{T|iwVrRZE&qyzzo|K3_!C3muM+xrTxR|30wm-=+Cr>Fp{B993W8;(-uPQN{>Lhs IlF`Ti2lP$a<^TWy literal 0 HcmV?d00001 diff --git a/tp6/ArbreBinaireDeRecherche/obj/main.o b/tp6/ArbreBinaireDeRecherche/obj/main.o new file mode 100644 index 0000000000000000000000000000000000000000..c2f84b48c4f701fa10bf0a31cf27644a590a7714 GIT binary patch literal 3576 zcmbtWUuauZ82|3QO`0xkmNr#eDiUy&%`LZ$jkQj@rRmb9P`c7BG8G9o$;}^@+=QE( zQui>0!lV?T3W|aV`m{aiqoByZfe(Wrh@fx24Eo@Mdk_SL`F-b}lir=)BIp<HIp6pD z{+@Hcb8g<st}dyH0)iAc2M3Zs0sagf@M*@TVH9GJ&+Xj5l-vGoteo5Jn>>k{+)j2s zc{}%R_Sf9b_xoh}H4R>1=jYsRe!rZX8D$<$fSKjC?~J|v#&-|UxQ{#_#0qhF2Drn9 zhgXT$f^#(X1?raLx{j$@8=(Mc)xHExE*~H`<nlq{qYw<8$GLwYvjHJ>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@cu(ti%i}$b_cjk?)(REdXyUc{KPis> zv{zz3MYuF)#Q7IE*?MUL1v)cnFNl1U2h4Gt&IS33UZ&42(KGlEF5j^4lhTLe{AbXH zV*XeES@e}-Qd*J!4-z~i+tPjFxBe@9{U31$T0ixvy#5Sga!iEa9S(j=f`??=JnCeO z%(J|ir#-&J%C_r>`PKhB|5OQos-J3?>#zI7L<qV(|EnZ;NX}39jbHvaPbB(;^3z$D z^LG)Wn4(T(8QtUge-r?pMSd~AjkurxXS|`F{TKfo?k}0aUAZB-fygWDKjr?sTmi!m z+&|qzTt=*4z#k*yw|{d!`$ykF;V<@;>XCC(>?j3A`jQtsf;|0Okp1Z!<hRt@{8C;+ Wy_e+m(|h&vU+0N#dYzG%{r>?+6E@HQ literal 0 HcmV?d00001 diff --git a/tp6/ArbreBinaireDeRecherche/src/abr.cpp b/tp6/ArbreBinaireDeRecherche/src/abr.cpp new file mode 100644 index 0000000..a096890 --- /dev/null +++ b/tp6/ArbreBinaireDeRecherche/src/abr.cpp @@ -0,0 +1,10 @@ +#include "abr.h" +#include <iostream> + +ABR::ABR () { + head = nullptr; +} + +ABR::~ABR () { + +} \ No newline at end of file diff --git a/tp6/ArbreBinaireDeRecherche/src/abr.h b/tp6/ArbreBinaireDeRecherche/src/abr.h new file mode 100644 index 0000000..3cd0b24 --- /dev/null +++ b/tp6/ArbreBinaireDeRecherche/src/abr.h @@ -0,0 +1,16 @@ +#include "element.h" + +struct Node { + Elem element; + Node* left; + Node* right; +}; + +class ABR { + private: + Node* head; + + public: + ABR(); + ~ABR(); +}; \ No newline at end of file diff --git a/tp6/ArbreBinaireDeRecherche/src/element.cpp b/tp6/ArbreBinaireDeRecherche/src/element.cpp new file mode 100644 index 0000000..ef9b7c3 --- /dev/null +++ b/tp6/ArbreBinaireDeRecherche/src/element.cpp @@ -0,0 +1,9 @@ +// LIFAP6 - Automne 2017 - R. Chaine + +#include <cstdio> +#include "element.h" + +void affichageElement(const Elem & e) +{ + std::printf("%d ",e); +} diff --git a/tp6/ArbreBinaireDeRecherche/src/element.h b/tp6/ArbreBinaireDeRecherche/src/element.h new file mode 100644 index 0000000..07448ad --- /dev/null +++ b/tp6/ArbreBinaireDeRecherche/src/element.h @@ -0,0 +1,10 @@ +// LIFAP6 - Automne 2017 - R. Chaine + +#ifndef _ELEMENT +#define _ELEMENT + +typedef int Elem; + +void affichageElement(const Elem & e); + +#endif diff --git a/tp6/ArbreBinaireDeRecherche/src/main.cpp b/tp6/ArbreBinaireDeRecherche/src/main.cpp new file mode 100644 index 0000000..7cee540 --- /dev/null +++ b/tp6/ArbreBinaireDeRecherche/src/main.cpp @@ -0,0 +1,7 @@ +#include "abr.h" + +int main() { + ABR a; + + return 0; +} -- GitLab From f3c8f47a565c2c948a8d82c29ee66824aa3259a3 Mon Sep 17 00:00:00 2001 From: Eldar <eldar.kasmamytov@gmail.com> Date: Sun, 25 Oct 2020 20:45:16 +0100 Subject: [PATCH 07/23] Display function completed - bug with 'deep' --- .../bin/executable.out | Bin 32928 -> 0 bytes tp6/ArbreBinaireDeRecherche/obj/abr.o | Bin 37872 -> 0 bytes tp6/ArbreBinaireDeRecherche/obj/element.o | Bin 8816 -> 0 bytes tp6/ArbreBinaireDeRecherche/obj/main.o | Bin 3576 -> 0 bytes tp6/ArbreBinaireDeRecherche/src/abr.cpp | 138 +++++++++++++++++- tp6/ArbreBinaireDeRecherche/src/abr.h | 11 ++ tp6/ArbreBinaireDeRecherche/src/main.cpp | 25 +++- 7 files changed, 171 insertions(+), 3 deletions(-) delete mode 100755 tp6/ArbreBinaireDeRecherche/bin/executable.out delete mode 100644 tp6/ArbreBinaireDeRecherche/obj/abr.o delete mode 100644 tp6/ArbreBinaireDeRecherche/obj/element.o delete mode 100644 tp6/ArbreBinaireDeRecherche/obj/main.o diff --git a/tp6/ArbreBinaireDeRecherche/bin/executable.out b/tp6/ArbreBinaireDeRecherche/bin/executable.out deleted file mode 100755 index 0730e12a86b98ecd1b8fd95aa55692e18b8fea14..0000000000000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4FQYc6l5AJ9zN_$jS2d{_mhw z-sYn$UUuGwF9XLev+K9_>Gto5+Y`g;)?|5GFYXuF#ANwGKXUljeJX{kTZ81?uGfZt z1|_|GGQPGdu<Nk}*yZf}5hRGS>$l^1pH(oEKchR;+bBz14L<3YU4CXd5^1}<4L?r9 zrL!)u>OYu{%)*-wLAI=PR=(hb*Dtt0q+OZ3WydIgo#l|O%`iY_`5DJ3U$shC`X}4* zSvq8vpJSCDVZT#!fqOHKVC?eg(4M<#%~Vg(vEzEmIv4RHJr5tdIkx}h{I>fZ$>eo# dKqpsa5bb(x#v&v#ScLS#4$ZM7qd-Ph{Wp!0BfkIu diff --git a/tp6/ArbreBinaireDeRecherche/obj/abr.o b/tp6/ArbreBinaireDeRecherche/obj/abr.o deleted file mode 100644 index 9af141c353199ffdda1ccc5a101b3accb9577b46..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 37872 zcmb__34B!5_5YhJBqTrrfv{uPmyngPhk!tUuoD&)#bGj;Bm<L~I5SzW1yn4qC~9j( zZAEOgF1WN-YpuJ8S}Rs<YxU>yYiqUE{<O7PQColKd+xb!CMSvV|9$@N!@PU%_ndq0 zx#ymH?($w9yQ^0&N%43bdwHBHCy}zK<CI>Oh%eyi0%x$3?`&Ll(c8-|+WG0SOR7Iz zc9aSGw>)7{8{PAM?nOJlxTy8hJv+bfw3eT{^V2WCbez`7%l6GfmUnSmwr`LLrgLyf zItLdWW#ay4xXg!<?GecL?hn5F^2;qxfQPSLlN~3GW0@?zi3<_I?xc7M;u*bW(LFUS zJs6HVX^3-;LsC;)Dc*~IL@YvJ;^}}hO}rQ4xlTsrVqhmPtaUO|dq3l{W`peX2A<jv zQO_-OJ50YUFge+{rRL!7d5CU|W<dlJEAtz4PXk|{SiIgD?z~7v^aUyN-~BTG{U$|n z(iUtVfZ&pk`y<#lb|8YwW^-`)Mh^C0z`+%VIJoi&4z7BGgKvMv!FTcpA>Y+gIr#1@ z4z4+qg9Cdwxb_APu6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vGFHAQ%Q9tU|^`A~ycl9ryV)CUb!_vIr9`dg$HTfkliEem<gmowXqnCEh5BcGb zwEX80re#9Tol^1NRL5%Goy6N+{U1vGwx3WxrWRfQWrU$j-Og<l1k%+k^OQ*?WVLb} zAVPQff49!$kZ!Qq-L~5Nha|ttAQ4ZkMoik~v()=30!)veOv!(ZWt7mi-@-qpNO$_n z+-Eqp3M2G~Db?n;dhM=mWH~7H9~8l`?8g>J=kHCJ>S993pKav8Nl^_}N&ZXx?(#Q@ M{EwMp+`G>IzwmQ&T>t<8 diff --git a/tp6/ArbreBinaireDeRecherche/obj/element.o b/tp6/ArbreBinaireDeRecherche/obj/element.o deleted file mode 100644 index eba3191f18a3a138a3143792870b4499934c2f9b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8816 zcmbtZeQ;b=6~Avco4jU|?I!6*N}95z9~NSElahwCv?Xmxo0Lu|rBw#d=YG7GUAlR@ zefu^|K?+!e*0xgoLkmMkDvJCepCZEygD@k4I&}ucQ4keIL75R1M6^tc^_+9h-QC`9 z#~HmdyXTzWJ@=e*&%O7&cXw|Y*|a`j7(z8etQJ*Cp+fX^SNUOLhs8`WLu?=2|MuwK zccY{GZ$2@4VC2LBvH!)<L#t5ZY5aNzzYhQS2a7T>v8_pn29$+KE+kKY{901O2TFcM zw2B7M3?dx-xFPuQ5HO)Ysuhq>AUy&GLIL|>BF+zqjQ^TQ_B|rG#t^F9&_!fNKau=a zA`>2wod=0{j}!4<CQ^Qn$Yfh14xjo2k=?6^>=`4n_c|iC7m0lFOGNIxkI2675;^cH zkwbqVa@PqU0zV>nItJ5%YyfK*CVZx2LZ%_m@M;h6%_j9W8zy4S0Vy>wNJg3i5Tg*` zhEUG+VE{>FB6RS2Fd^AP$hMfR=51)zppg;er{myP8$ZNcMv-s)=XQXZKY0`Iro>Mn zAC>&a$ahNq-^j-#e;WBEZDdCnDD+9eAYn)f0TPC#&_Ked6hb6ykwPO0*GR!M-hc={ zCxvF?Z4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R;(X3pM;tj9;YTTiJe`aZDqdrXF@n?_-L`4)qSJ>mTHG(D4{qleTN^ zi+E}G1l$OL`ktg&#d&r<8Taur7tbX9q==_VB@y=uQlQ?9ohpx8IoBzG4)Mtp+@U8y z4F@yiCE?<WL#r74(q*e5;7`QUg$ewPNyJ_FxgiceR>02<aCPHBcGhw{{5|9UZI}nl zO>HjG<}iLiQ}+ZZNnOPw#eZ^e3k}1kw!OnI;C&3X14TdTJ&pcq0eLawyd6N2Evp!f z@^V&C{9O`l{;%WvVXVG4(75u?#{(g1x_|tUO~+6%PufCU!~2-UvvlzuQ7?a;m@sH2 z9wcZe;u`7s+Xz@a|1YrLUud10C_ZzJ@kjWwqt*}9sOjUc0kmHHF}}#C@fbgv)Z@qZ z5Zxv~;z#WNsMe{8l;?W>x3GV;&(J^Kx^@3p@6o1;6Ig0CU(r`<8$kJ2bRTHf8~*_P zT`9yxY)=t2PSLx0yy{o<r#xQCimGu+eh?VM&ZuD^zs%!@lp<3#e+3@{re6NCb@CSl zT{T|iwVrRZE&qyzzo|K3_!C3muM+xrTxR|30wm-=+Cr>Fp{B993W8;(-uPQN{>Lhs IlF`Ti2lP$a<^TWy diff --git a/tp6/ArbreBinaireDeRecherche/obj/main.o b/tp6/ArbreBinaireDeRecherche/obj/main.o deleted file mode 100644 index c2f84b48c4f701fa10bf0a31cf27644a590a7714..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3576 zcmbtWUuauZ82|3QO`0xkmNr#eDiUy&%`LZ$jkQj@rRmb9P`c7BG8G9o$;}^@+=QE( zQui>0!lV?T3W|aV`m{aiqoByZfe(Wrh@fx24Eo@Mdk_SL`F-b}lir=)BIp<HIp6pD z{+@Hcb8g<st}dyH0)iAc2M3Zs0sagf@M*@TVH9GJ&+Xj5l-vGoteo5Jn>>k{+)j2s zc{}%R_Sf9b_xoh}H4R>1=jYsRe!rZX8D$<$fSKjC?~J|v#&-|UxQ{#_#0qhF2Drn9 zhgXT$f^#(X1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?_3w4Y) zig+n*KB6{k!>XE(x-{yRDO@lQ=%rSZJ`<o@cu(ti%i}$b_cjk?)(REdXyUc{KPis> zv{zz3MYuF)#Q7IE*?MUL1v)cnFNl1U2h4Gt&IS33UZ&42(KGlEF5j^4lhTLe{AbXH zV*XeES@e}-Qd*J!4-z~i+tPjFxBe@9{U31$T0ixvy#5Sga!iEa9S(j=f`??=JnCeO z%(J|ir#-&J%C_r>`PKhB|5OQos-J3?>#zI7L<qV(|EnZ;NX}39jbHvaPbB(;^3z$D z^LG)Wn4(T(8QtUge-r?pMSd~AjkurxXS|`F{TKfo?k}0aUAZB-fygWDKjr?sTmi!m z+&|qzTt=*4z#k*yw|{d!`$ykF;V<@;>XCC(>?j3A`jQtsf;|0Okp1Z!<hRt@{8C;+ Wy_e+m(|h&vU+0N#dYzG%{r>?+6E@HQ diff --git a/tp6/ArbreBinaireDeRecherche/src/abr.cpp b/tp6/ArbreBinaireDeRecherche/src/abr.cpp index a096890..ed36644 100644 --- a/tp6/ArbreBinaireDeRecherche/src/abr.cpp +++ b/tp6/ArbreBinaireDeRecherche/src/abr.cpp @@ -1,10 +1,146 @@ #include "abr.h" #include <iostream> +#include <cmath> +#include <queue> ABR::ABR () { head = nullptr; + count = 0; + deep = 0; } ABR::~ABR () { -} \ No newline at end of file +} + +bool ABR::isEmpty() const { return count == 0; } + +unsigned int ABR::draw_node(const Node* n, unsigned int length) const { + if (n) { + unsigned int mid; + if (length%2 == 0) mid = length/2; + else mid = length/2 +1; + + unsigned int left; + if (mid%2 == 0) left = mid/2; + else left = mid/2 +1; + + unsigned int right = mid+left; + + unsigned int curr_col = 0; + + // On dessine la ligne avec l'element n->element au milieu + for(++curr_col; curr_col<left; ++curr_col) + std::cout << " "; + + if (n->left) { + std::cout << "┌"; + for(++curr_col; curr_col<mid; ++curr_col) std::cout << "─"; + } + else { + std::cout << " "; + for(++curr_col; curr_col<mid; ++curr_col) + std::cout << " "; + } + + std::cout << n->element; + + if (n->right) { + for(++curr_col; curr_col<right; ++curr_col) std::cout << "─"; + std::cout << "â”"; + } + else { + for(++curr_col; curr_col<right; ++curr_col) + std::cout << " "; + std::cout << " "; + } + + for(++curr_col; curr_col<=length; ++curr_col) + std::cout << " "; + + // On retourne la valeur decrementee, car la derniere iteration de la boucle for avait l'incrementee + return --curr_col; + } + else { + unsigned int curr_col = 0; + + for(++curr_col; curr_col<=length; ++curr_col) + std::cout << " "; + + return --curr_col; + } +} + +void ABR::draw() const { + if (!isEmpty()) { + + // On initialise les valeurs de depart pour construire le tableau d'affichage + unsigned int max_elems = pow(2,deep-1); // Nombre maximum d'elements sur le dernier niveau de l'ABR + unsigned int max_offset = max_elems-1; // Nombre d'espaces entre les noeuds sur le dernier niveau de l'ABR + unsigned int width = max_elems + max_offset; // Longeur de la grille d'affichage + + std::cout << "deep : " << deep << std::endl; + std::cout << "max elements on last level : 2^(deep-1) = " << max_elems << std::endl << std::endl; + + // On dessine les noeuds selon la grille d'affichage + unsigned int curr_col = 0; + unsigned int tab_width = width; + + std::queue<const Node*> q; + q.push(head); + + while (!q.empty()) { + curr_col += draw_node(q.front(), tab_width); + + if (q.front()) { + if (q.front()->left) q.push(q.front()->left); + else q.push(nullptr); + + if (q.front()->right) q.push(q.front()->right); + else q.push(nullptr); + } + + q.pop(); + + // std::cout << "curr_col: " << curr_col; + // std::cout << " tab_width: " << tab_width; + // std::cout << " width: " << width << std::endl; + + if (curr_col >= width) { + std::cout << std::endl; + curr_col = 0; + tab_width/=2; + } + else { + if (tab_width%2 != 0) { + ++curr_col; + std::cout << " "; + } + } + + } + + // On affiche un saut de ligne a la fin de l'affichage de l'ABR + std::cout << std::endl; + } + else std::cout << "ABR est vide !" << std::endl; +} + +void ABR::insert_from_node (const Elem& e, Node*& n) { + if (n == nullptr) { + n = new Node; + n->element = e; + n->left = nullptr; + n->right = nullptr; + + ++count; + } + else { + if (!n->left && !n->right) ++deep; + + if (e < n->element) insert_from_node(e, n->left); + else if (e > n->element) insert_from_node(e, n->right); + } +} + +void ABR::insert (const Elem& e) { insert_from_node(e, head); } \ No newline at end of file diff --git a/tp6/ArbreBinaireDeRecherche/src/abr.h b/tp6/ArbreBinaireDeRecherche/src/abr.h index 3cd0b24..6112ae8 100644 --- a/tp6/ArbreBinaireDeRecherche/src/abr.h +++ b/tp6/ArbreBinaireDeRecherche/src/abr.h @@ -9,8 +9,19 @@ struct Node { class ABR { private: Node* head; + unsigned int count; + unsigned int deep; + + void insert_from_node (const Elem& e, Node*& n); + unsigned int draw_node(const Node* n, unsigned int length) const; public: ABR(); ~ABR(); + + bool isEmpty() const; + + void insert(const Elem& e); + + void draw() const; }; \ No newline at end of file diff --git a/tp6/ArbreBinaireDeRecherche/src/main.cpp b/tp6/ArbreBinaireDeRecherche/src/main.cpp index 7cee540..d9b26d9 100644 --- a/tp6/ArbreBinaireDeRecherche/src/main.cpp +++ b/tp6/ArbreBinaireDeRecherche/src/main.cpp @@ -1,7 +1,28 @@ #include "abr.h" +#include <queue> +#include <iostream> int main() { - ABR a; + ABR a; - return 0; + a.insert(6); + a.insert(3); + a.insert(9); + a.insert(8); + a.insert(4); + a.insert(2); + a.insert(10); + a.insert(11); + a.insert(7); + a.insert(1); + + a.draw(); + + // std::queue<int*> q; + // q.push(nullptr); + // if (!q.front()) { + // std::cout << "nullptr!" << std::endl; + // } + + return 0; } -- GitLab From a9c20f9d1fc1a8a193a01e88b832cd2393e835ee Mon Sep 17 00:00:00 2001 From: Eldar <eldar.kasmamytov@gmail.com> Date: Mon, 26 Oct 2020 19:16:47 +0100 Subject: [PATCH 08/23] Draw function improved - works great with numbers that contain 1 digit - fixed 'depth' bug - bug with numbers that contain >1 digits --- tp6/ArbreBinaireDeRecherche/src/abr.cpp | 144 ++++++++++++++++------- tp6/ArbreBinaireDeRecherche/src/abr.h | 25 +++- tp6/ArbreBinaireDeRecherche/src/main.cpp | 22 +++- 3 files changed, 146 insertions(+), 45 deletions(-) diff --git a/tp6/ArbreBinaireDeRecherche/src/abr.cpp b/tp6/ArbreBinaireDeRecherche/src/abr.cpp index ed36644..8edc0a9 100644 --- a/tp6/ArbreBinaireDeRecherche/src/abr.cpp +++ b/tp6/ArbreBinaireDeRecherche/src/abr.cpp @@ -6,60 +6,84 @@ ABR::ABR () { head = nullptr; count = 0; - deep = 0; } ABR::~ABR () { } +Node* ABR::get_head() const { return head; } + bool ABR::isEmpty() const { return count == 0; } +unsigned int ABR::get_depth_from_node(Node* n, unsigned int depth_count) const { + if (n) { + ++depth_count; + + if (n->left && n->right) { + unsigned int left = get_depth_from_node(n->left, depth_count); + unsigned int right = get_depth_from_node(n->right, depth_count); + + if (left > right) return left; + return right; + } + else { + if (n->left) return get_depth_from_node(n->left, depth_count); + if (n->right) return get_depth_from_node(n->right, depth_count); + } + } + return depth_count; +} + +unsigned int ABR::get_depth() const { return get_depth_from_node(head, 0); } + unsigned int ABR::draw_node(const Node* n, unsigned int length) const { if (n) { - unsigned int mid; - if (length%2 == 0) mid = length/2; - else mid = length/2 +1; + unsigned int mid = length/2; + if (length%2 != 0) ++mid; - unsigned int left; - if (mid%2 == 0) left = mid/2; - else left = mid/2 +1; + unsigned int left = mid/2; + if (mid%2 != 0) ++left; unsigned int right = mid+left; - unsigned int curr_col = 0; - // On dessine la ligne avec l'element n->element au milieu - for(++curr_col; curr_col<left; ++curr_col) - std::cout << " "; - - if (n->left) { - std::cout << "┌"; - for(++curr_col; curr_col<mid; ++curr_col) std::cout << "─"; - } - else { - std::cout << " "; - for(++curr_col; curr_col<mid; ++curr_col) + unsigned int curr_col = 0; + // Si la longeur est 1, alors on est sur le dernier niveau + // => donc on n'affiche pas les espaces et fleches + if (length != 1) { + for(++curr_col; curr_col<left; ++curr_col) std::cout << " "; + + if (n->left) { + std::cout << "┌"; + for(++curr_col; curr_col<mid; ++curr_col) std::cout << "─"; + } + else { + for(; curr_col<mid; ++curr_col) + std::cout << " "; + } } std::cout << n->element; - if (n->right) { - for(++curr_col; curr_col<right; ++curr_col) std::cout << "─"; - std::cout << "â”"; - } - else { - for(++curr_col; curr_col<right; ++curr_col) + // Si la longeur est 1, alors on est sur le dernier niveau + // => donc on n'affiche pas les espaces et fleches + if (length != 1) { + if (n->right) { + for(++curr_col; curr_col<right; ++curr_col) std::cout << "─"; + std::cout << "â”"; + } + else { + for(; curr_col<right; ++curr_col) + std::cout << " "; + } + + for(++curr_col; curr_col<=length; ++curr_col) std::cout << " "; - std::cout << " "; } - for(++curr_col; curr_col<=length; ++curr_col) - std::cout << " "; - - // On retourne la valeur decrementee, car la derniere iteration de la boucle for avait l'incrementee - return --curr_col; + return length; } else { unsigned int curr_col = 0; @@ -67,54 +91,75 @@ unsigned int ABR::draw_node(const Node* n, unsigned int length) const { for(++curr_col; curr_col<=length; ++curr_col) std::cout << " "; + // On retourne la valeur decrementee, car la derniere iteration de la boucle for avait l'incrementee return --curr_col; } } -void ABR::draw() const { +void ABR::draw_from_node(const Node* n) const { if (!isEmpty()) { // On initialise les valeurs de depart pour construire le tableau d'affichage - unsigned int max_elems = pow(2,deep-1); // Nombre maximum d'elements sur le dernier niveau de l'ABR + unsigned int depth = get_depth(); + unsigned int max_elems = pow(2,depth-1); // Nombre maximum d'elements sur le dernier niveau de l'ABR unsigned int max_offset = max_elems-1; // Nombre d'espaces entre les noeuds sur le dernier niveau de l'ABR unsigned int width = max_elems + max_offset; // Longeur de la grille d'affichage - std::cout << "deep : " << deep << std::endl; - std::cout << "max elements on last level : 2^(deep-1) = " << max_elems << std::endl << std::endl; + std::cout << "count : " << count << std::endl; + std::cout << "depth : " << depth << std::endl; + std::cout << "max elements on last level : 2^(depth-1) = " << max_elems << std::endl << std::endl; // On dessine les noeuds selon la grille d'affichage unsigned int curr_col = 0; unsigned int tab_width = width; std::queue<const Node*> q; - q.push(head); + q.push(n); while (!q.empty()) { + // On dessine le noeud actuel et on sauvegarde la colonne ou on s'est arrete curr_col += draw_node(q.front(), tab_width); + // On se prepare pour la prochaine iteration. + // Si le pointeur sur le noeud actuel n'est pas NULL, alors if (q.front()) { + // Si le noeud actuel possede un fils gauche, + // alors on enfile un pointeur vers son fils gauche + // sinon on enfile un pointeur null if (q.front()->left) q.push(q.front()->left); else q.push(nullptr); + // Si le noeud actuel possede un fils droit, + // alors on enfile un pointeur vers son fils droit + // sinon on enfile un pointeur null if (q.front()->right) q.push(q.front()->right); else q.push(nullptr); } + // On defile le pointeur vers le noeud actuel, + // car on en a plus besoin (deja dessine) q.pop(); // std::cout << "curr_col: " << curr_col; // std::cout << " tab_width: " << tab_width; // std::cout << " width: " << width << std::endl; + // Si on a atteint la fin de la table d'affichage, alors + // on affiche un saut de ligne et on remet la colonne actuelle a 0, + // et on divise aussi la largeur de la ligne actuelle par 2. if (curr_col >= width) { std::cout << std::endl; curr_col = 0; - tab_width/=2; + tab_width/=2; // Largeur de la prochaine ligne a dessiner sera 2 fois plus petite } + // Si on a pas encore atteint la fin de la table d'affichage else { + // Si la largeur de la ligne actuelle est impaire, + // on dessine un espace, car la colonne est represente par 'int' + // (ex. 15/7=2 => il nous manque un espace a dessiner) if (tab_width%2 != 0) { - ++curr_col; std::cout << " "; + ++curr_col; } } @@ -126,6 +171,8 @@ void ABR::draw() const { else std::cout << "ABR est vide !" << std::endl; } +void ABR::draw() const { draw_from_node(head); } + void ABR::insert_from_node (const Elem& e, Node*& n) { if (n == nullptr) { n = new Node; @@ -136,11 +183,24 @@ void ABR::insert_from_node (const Elem& e, Node*& n) { ++count; } else { - if (!n->left && !n->right) ++deep; + if (e != n->element) { + if (e < n->element) insert_from_node(e, n->left); + else insert_from_node(e, n->right); + } + } +} + +void ABR::insert (const Elem& e) { insert_from_node(e, head); } - if (e < n->element) insert_from_node(e, n->left); - else if (e > n->element) insert_from_node(e, n->right); +Node* ABR::find_from_node(const Elem& e, Node* n) const { + if (n) { + if (e == n->element) return n; + else { + if (e < n->element) return find_from_node(e, n->left); + else return find_from_node(e, n->right); + } } + return nullptr; } -void ABR::insert (const Elem& e) { insert_from_node(e, head); } \ No newline at end of file +Node* ABR::find(const Elem& e) const { return find_from_node(e, head); } \ No newline at end of file diff --git a/tp6/ArbreBinaireDeRecherche/src/abr.h b/tp6/ArbreBinaireDeRecherche/src/abr.h index 6112ae8..8877529 100644 --- a/tp6/ArbreBinaireDeRecherche/src/abr.h +++ b/tp6/ArbreBinaireDeRecherche/src/abr.h @@ -10,18 +10,41 @@ class ABR { private: Node* head; unsigned int count; - unsigned int deep; + // Postcondition: Commence son chemin a partir d'un noeud n + // e est apres insere dans un bon endroit void insert_from_node (const Elem& e, Node*& n); + + // Preconditions: length = la longeur de la ligne a dessiner + // Postcondition: Dessine UNE ligne avec un noeud (element) au milieu + // Resultat: Retourne la colonne sur la-quelle on s'est arrete apres l'affichage d'un noeud unsigned int draw_node(const Node* n, unsigned int length) const; public: ABR(); ~ABR(); + Node* get_head() const; + bool isEmpty() const; + // Postcondition: Si e n'est pas present dans l'ABR, + // alors un noeud avec l'element e dedans est insere dans l'ABR + // Si e est deja present, alors ne fait rien void insert(const Elem& e); + // Postcondition: Si l'ABR n'est pas vide, dessine l'ABR entier + // (parcours en largeur, cad niveau apres niveau) + // Si l'ABR est vide, alors affiche une chaine de caracteres void draw() const; + + void draw_from_node(const Node* n) const; + + Node* find(const Elem& e) const; + + Node* find_from_node(const Elem& e, Node* n) const; + + unsigned int get_depth() const; + + unsigned int get_depth_from_node(Node* n, unsigned int depth_count) const; }; \ No newline at end of file diff --git a/tp6/ArbreBinaireDeRecherche/src/main.cpp b/tp6/ArbreBinaireDeRecherche/src/main.cpp index d9b26d9..3c8d912 100644 --- a/tp6/ArbreBinaireDeRecherche/src/main.cpp +++ b/tp6/ArbreBinaireDeRecherche/src/main.cpp @@ -12,12 +12,30 @@ int main() { a.insert(4); a.insert(2); a.insert(10); - a.insert(11); - a.insert(7); + a.insert(5); a.insert(1); + a.insert(7); + a.insert(11); + + // a.insert(50); + // a.insert(60); + // a.insert(40); + // a.insert(30); + // a.insert(45); + // a.insert(55); + // a.insert(65); a.draw(); + // a.draw_from_node(a.get_head()->right); + + // Node* n = a.find(11); + // if (n) { + // std::cout << "OK" << std::endl; + // std::cout << n->element << std::endl; + // } + // else std::cout << "NOPE" << std::endl; + // std::queue<int*> q; // q.push(nullptr); // if (!q.front()) { -- GitLab From dc7e5e4ce8cb4334fd759000b8f15a13da454c6b Mon Sep 17 00:00:00 2001 From: Eldar <eldar.kasmamytov@gmail.com> Date: Mon, 26 Oct 2020 22:13:28 +0100 Subject: [PATCH 09/23] Added 3 Orders of Listing (with handler function) - Infix, Prefix and Postfix orders - Can be used with custom handler function (by passing a function pointer as argument), default function displays each element --- tp6/ArbreBinaireDeRecherche/src/abr.cpp | 58 +++++++++++++++++++++--- tp6/ArbreBinaireDeRecherche/src/abr.h | 12 +++-- tp6/ArbreBinaireDeRecherche/src/main.cpp | 18 ++++---- 3 files changed, 70 insertions(+), 18 deletions(-) diff --git a/tp6/ArbreBinaireDeRecherche/src/abr.cpp b/tp6/ArbreBinaireDeRecherche/src/abr.cpp index 8edc0a9..f0a2848 100644 --- a/tp6/ArbreBinaireDeRecherche/src/abr.cpp +++ b/tp6/ArbreBinaireDeRecherche/src/abr.cpp @@ -3,6 +3,9 @@ #include <cmath> #include <queue> +// Fonction de traitement des noeuds par defaut (utilisee dans la fonction 'parcours') +void list_elements(Node* n) { std::cout << n->element << " "; } + ABR::ABR () { head = nullptr; count = 0; @@ -35,7 +38,7 @@ unsigned int ABR::get_depth_from_node(Node* n, unsigned int depth_count) const { return depth_count; } -unsigned int ABR::get_depth() const { return get_depth_from_node(head, 0); } +unsigned int ABR::get_depth() const { return get_depth_from_node(head); } unsigned int ABR::draw_node(const Node* n, unsigned int length) const { if (n) { @@ -96,7 +99,7 @@ unsigned int ABR::draw_node(const Node* n, unsigned int length) const { } } -void ABR::draw_from_node(const Node* n) const { +void ABR::draw_from_node(const Node* n, bool extra) const { if (!isEmpty()) { // On initialise les valeurs de depart pour construire le tableau d'affichage @@ -105,9 +108,11 @@ void ABR::draw_from_node(const Node* n) const { unsigned int max_offset = max_elems-1; // Nombre d'espaces entre les noeuds sur le dernier niveau de l'ABR unsigned int width = max_elems + max_offset; // Longeur de la grille d'affichage - std::cout << "count : " << count << std::endl; - std::cout << "depth : " << depth << std::endl; - std::cout << "max elements on last level : 2^(depth-1) = " << max_elems << std::endl << std::endl; + if (extra) { + std::cout << "Number of Elements : " << count << std::endl; + std::cout << "Depth (Number of Levels) : " << depth << std::endl; + std::cout << "Max Elements on Last Level : " << max_elems << std::endl << std::endl; + } // On dessine les noeuds selon la grille d'affichage unsigned int curr_col = 0; @@ -171,7 +176,48 @@ void ABR::draw_from_node(const Node* n) const { else std::cout << "ABR est vide !" << std::endl; } -void ABR::draw() const { draw_from_node(head); } +void ABR::draw(bool extra) const { draw_from_node(head, extra); } + +void ABR::parcours(void (*handler)(Node*)=list_elements, int mode) { + switch(mode) { + case 1: // Ordre PREFIX + parcours_prefix_from(head, handler); + std::cout << std::endl << std::endl; + break; + case 2: // Ordre POSTFIX + parcours_postfix_from(head, handler); + std::cout << std::endl << std::endl; + break; + default: // Ordre INFIX + parcours_infix_from(head, handler); + std::cout << std::endl << std::endl; + break; + } +} + +void ABR::parcours_infix_from(Node* n, void (*handler)(Node*)=list_elements) { + if (n) { + parcours_infix_from(n->left, handler); + handler(n); + parcours_infix_from(n->right, handler); + } +} + +void ABR::parcours_prefix_from(Node* n, void (*handler)(Node*)=list_elements) { + if (n) { + handler(n); + parcours_prefix_from(n->left, handler); + parcours_prefix_from(n->right, handler); + } +} + +void ABR::parcours_postfix_from(Node* n, void (*handler)(Node*)=list_elements) { + if (n) { + parcours_postfix_from(n->left, handler); + parcours_postfix_from(n->right, handler); + handler(n); + } +} void ABR::insert_from_node (const Elem& e, Node*& n) { if (n == nullptr) { diff --git a/tp6/ArbreBinaireDeRecherche/src/abr.h b/tp6/ArbreBinaireDeRecherche/src/abr.h index 8877529..57d1283 100644 --- a/tp6/ArbreBinaireDeRecherche/src/abr.h +++ b/tp6/ArbreBinaireDeRecherche/src/abr.h @@ -36,9 +36,15 @@ class ABR { // Postcondition: Si l'ABR n'est pas vide, dessine l'ABR entier // (parcours en largeur, cad niveau apres niveau) // Si l'ABR est vide, alors affiche une chaine de caracteres - void draw() const; + void draw(bool extra=true) const; - void draw_from_node(const Node* n) const; + void draw_from_node(const Node* n, bool extra=true) const; + + void parcours(void (*handler)(Node*), int mode=0); + + void parcours_infix_from(Node* n, void (*handler)(Node*)); + void parcours_prefix_from(Node* n, void (*handler)(Node*)); + void parcours_postfix_from(Node* n, void (*handler)(Node*)); Node* find(const Elem& e) const; @@ -46,5 +52,5 @@ class ABR { unsigned int get_depth() const; - unsigned int get_depth_from_node(Node* n, unsigned int depth_count) const; + unsigned int get_depth_from_node(Node* n, unsigned int depth_count=0) const; }; \ No newline at end of file diff --git a/tp6/ArbreBinaireDeRecherche/src/main.cpp b/tp6/ArbreBinaireDeRecherche/src/main.cpp index 3c8d912..cc37e6d 100644 --- a/tp6/ArbreBinaireDeRecherche/src/main.cpp +++ b/tp6/ArbreBinaireDeRecherche/src/main.cpp @@ -2,6 +2,11 @@ #include <queue> #include <iostream> +void mult_by_two(Node* n) { + n->element*=2; + std::cout << n->element << " "; +} + int main() { ABR a; @@ -14,19 +19,14 @@ int main() { a.insert(10); a.insert(5); a.insert(1); - a.insert(7); a.insert(11); - // a.insert(50); - // a.insert(60); - // a.insert(40); - // a.insert(30); - // a.insert(45); - // a.insert(55); - // a.insert(65); - a.draw(); + a.parcours(mult_by_two, 1); + + a.draw(false); + // a.draw_from_node(a.get_head()->right); // Node* n = a.find(11); -- GitLab From aa00bb9d3c1d6fd8a338032c6334945a7d8de658 Mon Sep 17 00:00:00 2001 From: Eldar <eldar.kasmamytov@gmail.com> Date: Tue, 27 Oct 2020 12:18:34 +0100 Subject: [PATCH 10/23] Parcours Function Updated - changed handler parameters default value - added #ifndef --- tp6/ArbreBinaireDeRecherche/src/abr.cpp | 8 ++++---- tp6/ArbreBinaireDeRecherche/src/abr.h | 19 ++++++++++++++----- tp6/ArbreBinaireDeRecherche/src/main.cpp | 2 +- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/tp6/ArbreBinaireDeRecherche/src/abr.cpp b/tp6/ArbreBinaireDeRecherche/src/abr.cpp index f0a2848..5c4adb7 100644 --- a/tp6/ArbreBinaireDeRecherche/src/abr.cpp +++ b/tp6/ArbreBinaireDeRecherche/src/abr.cpp @@ -178,7 +178,7 @@ void ABR::draw_from_node(const Node* n, bool extra) const { void ABR::draw(bool extra) const { draw_from_node(head, extra); } -void ABR::parcours(void (*handler)(Node*)=list_elements, int mode) { +void ABR::parcours(void (*handler)(Node*), int mode) { switch(mode) { case 1: // Ordre PREFIX parcours_prefix_from(head, handler); @@ -195,7 +195,7 @@ void ABR::parcours(void (*handler)(Node*)=list_elements, int mode) { } } -void ABR::parcours_infix_from(Node* n, void (*handler)(Node*)=list_elements) { +void ABR::parcours_infix_from(Node* n, void (*handler)(Node*)) { if (n) { parcours_infix_from(n->left, handler); handler(n); @@ -203,7 +203,7 @@ void ABR::parcours_infix_from(Node* n, void (*handler)(Node*)=list_elements) { } } -void ABR::parcours_prefix_from(Node* n, void (*handler)(Node*)=list_elements) { +void ABR::parcours_prefix_from(Node* n, void (*handler)(Node*)) { if (n) { handler(n); parcours_prefix_from(n->left, handler); @@ -211,7 +211,7 @@ void ABR::parcours_prefix_from(Node* n, void (*handler)(Node*)=list_elements) { } } -void ABR::parcours_postfix_from(Node* n, void (*handler)(Node*)=list_elements) { +void ABR::parcours_postfix_from(Node* n, void (*handler)(Node*)) { if (n) { parcours_postfix_from(n->left, handler); parcours_postfix_from(n->right, handler); diff --git a/tp6/ArbreBinaireDeRecherche/src/abr.h b/tp6/ArbreBinaireDeRecherche/src/abr.h index 57d1283..06792dd 100644 --- a/tp6/ArbreBinaireDeRecherche/src/abr.h +++ b/tp6/ArbreBinaireDeRecherche/src/abr.h @@ -1,5 +1,12 @@ +#ifndef _ABR +#define _ABR + #include "element.h" +struct Node; +// Fonction de traitement des noeuds par defaut (utilisee dans la fonction membre 'parcours') +void list_elements(Node* n); + struct Node { Elem element; Node* left; @@ -40,11 +47,11 @@ class ABR { void draw_from_node(const Node* n, bool extra=true) const; - void parcours(void (*handler)(Node*), int mode=0); + void parcours(void (*handler)(Node*)=list_elements, int mode=0); - void parcours_infix_from(Node* n, void (*handler)(Node*)); - void parcours_prefix_from(Node* n, void (*handler)(Node*)); - void parcours_postfix_from(Node* n, void (*handler)(Node*)); + void parcours_infix_from(Node* n, void (*handler)(Node*)=list_elements); + void parcours_prefix_from(Node* n, void (*handler)(Node*)=list_elements); + void parcours_postfix_from(Node* n, void (*handler)(Node*)=list_elements); Node* find(const Elem& e) const; @@ -53,4 +60,6 @@ class ABR { unsigned int get_depth() const; unsigned int get_depth_from_node(Node* n, unsigned int depth_count=0) const; -}; \ No newline at end of file +}; + +#endif \ No newline at end of file diff --git a/tp6/ArbreBinaireDeRecherche/src/main.cpp b/tp6/ArbreBinaireDeRecherche/src/main.cpp index cc37e6d..1936d91 100644 --- a/tp6/ArbreBinaireDeRecherche/src/main.cpp +++ b/tp6/ArbreBinaireDeRecherche/src/main.cpp @@ -23,7 +23,7 @@ int main() { a.draw(); - a.parcours(mult_by_two, 1); + a.parcours(mult_by_two); a.draw(false); -- GitLab From d7a4af01158cfc2943e9069a5b36c693f7bdd1fe Mon Sep 17 00:00:00 2001 From: Eldar <eldar.kasmamytov@gmail.com> Date: Wed, 28 Oct 2020 23:34:23 +0100 Subject: [PATCH 11/23] Implemented all functions - still some bugs with draw - documentation missing - everything else works good - TODO may be 'equalize' function --- tp6/ArbreBinaireDeRecherche/src/abr.cpp | 118 ++++++++++++++++++++++- tp6/ArbreBinaireDeRecherche/src/abr.h | 26 +++-- tp6/ArbreBinaireDeRecherche/src/main.cpp | 81 +++++++++++++--- 3 files changed, 201 insertions(+), 24 deletions(-) diff --git a/tp6/ArbreBinaireDeRecherche/src/abr.cpp b/tp6/ArbreBinaireDeRecherche/src/abr.cpp index 5c4adb7..546bddc 100644 --- a/tp6/ArbreBinaireDeRecherche/src/abr.cpp +++ b/tp6/ArbreBinaireDeRecherche/src/abr.cpp @@ -4,17 +4,53 @@ #include <queue> // Fonction de traitement des noeuds par defaut (utilisee dans la fonction 'parcours') -void list_elements(Node* n) { std::cout << n->element << " "; } +void ABR::list_elements(Node* n) { std::cout << n->element << " "; } + +void destruct(Node* n) { + delete n; + n = nullptr; +} ABR::ABR () { head = nullptr; count = 0; } -ABR::~ABR () { +void ABR::copy_from_node(const Node* n) { + std::queue<const Node*> q; + q.push(n); + + while (!q.empty()) { + this->insert(q.front()->element); + + if (q.front()) { + if (q.front()->left) q.push(q.front()->left); + if (q.front()->right) q.push(q.front()->right); + } + + q.pop(); + } +} + +ABR::ABR(const ABR& a) { + head = nullptr; + count = 0; + copy_from_node(a.head); +} +ABR& ABR::operator=(const ABR& a) { + if (this->isEmpty()) copy_from_node(a.head); + else { + this->parcours_postfix_from(head, destruct); + this->head = nullptr; + this->count = 0; + copy_from_node(a.head); + } + return *this; } +ABR::~ABR () { parcours_postfix_from(head, destruct); } + Node* ABR::get_head() const { return head; } bool ABR::isEmpty() const { return count == 0; } @@ -178,7 +214,7 @@ void ABR::draw_from_node(const Node* n, bool extra) const { void ABR::draw(bool extra) const { draw_from_node(head, extra); } -void ABR::parcours(void (*handler)(Node*), int mode) { +void ABR::parcours(int mode, void (*handler)(Node*)) { switch(mode) { case 1: // Ordre PREFIX parcours_prefix_from(head, handler); @@ -238,6 +274,82 @@ void ABR::insert_from_node (const Elem& e, Node*& n) { void ABR::insert (const Elem& e) { insert_from_node(e, head); } +Node* ABR::get_parent_from_node(const Elem& e, Node* n, Node* parent) const { + if (n) { + if (n->element == e) return parent; + else { + if (e < n->element) return get_parent_from_node(e, n->left, n); + else return get_parent_from_node(e, n->right, n); + } + } + return nullptr; +} + +Node* ABR::get_parent(const Elem& e) const { return get_parent_from_node(e, head); } + +void ABR::remove(const Elem& e) { + Node* parent = get_parent(e); + Node* n = find(e); + + if (n) { + if (n->left && n->right) { + Node* temp = n->left; + + while(temp->right != nullptr) { + temp = temp->right; + } + + Node* parent_temp = get_parent(temp->element); + if (parent_temp == n) parent_temp->left = temp->left; + else parent_temp->right = nullptr; + + temp->left = n->left; + temp->right = n->right; + + if (parent) { + if (parent->left == n) parent->left=temp; + else parent->right=temp; + } + else head = temp; + + delete n; + n = nullptr; + } + else if (n->left) { + if (parent) { + if (parent->left == n) parent->left=n->left; + else parent->right=n->left; + } + else head = n->left; + + delete n; + n = nullptr; + } + else if (n->right) { + if (parent) { + if (parent->left == n) parent->left=n->right; + else parent->right=n->right; + } + else head = n->right; + + delete n; + n = nullptr; + } + else { + if (parent) { + if (parent->left == n) parent->left=nullptr; + else parent->right=nullptr; + } + else head = n; + + delete n; + n = nullptr; + } + + --count; + } +} + Node* ABR::find_from_node(const Elem& e, Node* n) const { if (n) { if (e == n->element) return n; diff --git a/tp6/ArbreBinaireDeRecherche/src/abr.h b/tp6/ArbreBinaireDeRecherche/src/abr.h index 06792dd..f91c0f5 100644 --- a/tp6/ArbreBinaireDeRecherche/src/abr.h +++ b/tp6/ArbreBinaireDeRecherche/src/abr.h @@ -3,10 +3,6 @@ #include "element.h" -struct Node; -// Fonction de traitement des noeuds par defaut (utilisee dans la fonction membre 'parcours') -void list_elements(Node* n); - struct Node { Elem element; Node* left; @@ -27,8 +23,16 @@ class ABR { // Resultat: Retourne la colonne sur la-quelle on s'est arrete apres l'affichage d'un noeud unsigned int draw_node(const Node* n, unsigned int length) const; + // Fonction de traitement des noeuds par defaut (utilisee dans la fonction membre 'parcours') + static void list_elements(Node* n); + + void copy_from_node(const Node* n); + public: ABR(); + + ABR(const ABR& a); + ~ABR(); Node* get_head() const; @@ -40,14 +44,16 @@ class ABR { // Si e est deja present, alors ne fait rien void insert(const Elem& e); + void remove(const Elem& e); + // Postcondition: Si l'ABR n'est pas vide, dessine l'ABR entier // (parcours en largeur, cad niveau apres niveau) // Si l'ABR est vide, alors affiche une chaine de caracteres - void draw(bool extra=true) const; + void draw(bool extra=false) const; - void draw_from_node(const Node* n, bool extra=true) const; + void draw_from_node(const Node* n, bool extra=false) const; - void parcours(void (*handler)(Node*)=list_elements, int mode=0); + void parcours(int mode, void (*handler)(Node*)=list_elements); void parcours_infix_from(Node* n, void (*handler)(Node*)=list_elements); void parcours_prefix_from(Node* n, void (*handler)(Node*)=list_elements); @@ -57,9 +63,15 @@ class ABR { Node* find_from_node(const Elem& e, Node* n) const; + Node* get_parent(const Elem& e) const; + + Node* get_parent_from_node(const Elem& e, Node* n, Node* parent=nullptr) const; + unsigned int get_depth() const; unsigned int get_depth_from_node(Node* n, unsigned int depth_count=0) const; + + ABR& operator=(const ABR& a); }; #endif \ No newline at end of file diff --git a/tp6/ArbreBinaireDeRecherche/src/main.cpp b/tp6/ArbreBinaireDeRecherche/src/main.cpp index 1936d91..e4e147c 100644 --- a/tp6/ArbreBinaireDeRecherche/src/main.cpp +++ b/tp6/ArbreBinaireDeRecherche/src/main.cpp @@ -21,26 +21,79 @@ int main() { a.insert(1); a.insert(11); + std::cout << " *** Affichage avec extra informations ***" << std::endl; + a.draw(true); + + std::cout << " *** Differents parcours de l'ABR (fonction d'affichage par defaut) ***" << std::endl; + std::cout << "Parcours INFIX : " << std::endl; + a.parcours(0); + + std::cout << "Parcours PREFIX : " << std::endl; + a.parcours(1); + + std::cout << "Parcours POSTFIX : " << std::endl; + a.parcours(2); + + std::cout << "Parcours PREFIX (MULTIPLICATION par 2) : " << std::endl; + a.parcours(1, mult_by_two); + + std::cout << " *** Affichage sans extra informations (comportement par defaut) ***" << std::endl; a.draw(); - a.parcours(mult_by_two); + std::cout << " *** Affichage a partir du fils gauche ***" << std::endl; + a.draw_from_node(a.get_head()->left); + + std::cout << " *** Recherche de l'element 6 ***" << std::endl; + Node* n = a.find(6); + if (n) { + std::cout << "Element found : "; + std::cout << n->element << std::endl << std::endl; + } + else std::cout << "Element not found" << std::endl << std::endl; + + std::cout << " *** Creation d'ABR par copie ***" << std::endl; + ABR b(a); + b.draw(true); + + std::cout << " *** Affectation d'ABR ***" << std::endl; + std::cout << "Creation de c et d ..." << std::endl; + std::cout << "Affectation d = c = b ..." << std::endl; + ABR c,d; + d = c = b; + + std::cout << "Insertion de 24 dans b ..." << std::endl; + b.insert(24); + std::cout << "Insertion de 14 dans c ..." << std::endl; + c.insert(14); + + std::cout << "b:" << std::endl; + b.draw(true); + std::cout << "c:" << std::endl; + c.draw(true); + std::cout << "d:" << std::endl; + d.draw(true); + + std::cout << " *** Suppression d'un element ***" << std::endl; + std::cout << "12 dans d:" << std::endl; + d.remove(12); + d.draw(true); + + std::cout << "8 dans d:" << std::endl; + d.remove(8); + d.draw(true); - a.draw(false); + std::cout << "18 dans d:" << std::endl; + d.remove(18); + d.draw(true); - // a.draw_from_node(a.get_head()->right); + std::cout << "10 dans d:" << std::endl; + d.remove(10); + d.draw(true); - // Node* n = a.find(11); - // if (n) { - // std::cout << "OK" << std::endl; - // std::cout << n->element << std::endl; - // } - // else std::cout << "NOPE" << std::endl; + std::cout << "22 dans d:" << std::endl; + d.remove(22); + d.draw(true); - // std::queue<int*> q; - // q.push(nullptr); - // if (!q.front()) { - // std::cout << "nullptr!" << std::endl; - // } return 0; } -- GitLab From e464751cb7212eba277a8d0b370b8209beabed09 Mon Sep 17 00:00:00 2001 From: Eldar <eldar.kasmamytov@gmail.com> Date: Wed, 28 Oct 2020 23:45:47 +0100 Subject: [PATCH 12/23] Minor File Organization Changes - changed root folder name --- tp5/Table de Hachage/src/main.cpp | 20 ------------------- .../makefile | 0 .../src/hash_functions.cpp | 0 .../src/key.h | 0 tp5/TableDeHachage/src/main.cpp | 20 +++++++++++++++++++ .../src/table.cpp | 0 .../src/table.h | 0 7 files changed, 20 insertions(+), 20 deletions(-) delete mode 100644 tp5/Table de Hachage/src/main.cpp rename tp5/{Table de Hachage => TableDeHachage}/makefile (100%) rename tp5/{Table de Hachage => TableDeHachage}/src/hash_functions.cpp (100%) rename tp5/{Table de Hachage => TableDeHachage}/src/key.h (100%) create mode 100644 tp5/TableDeHachage/src/main.cpp rename tp5/{Table de Hachage => TableDeHachage}/src/table.cpp (100%) rename tp5/{Table de Hachage => TableDeHachage}/src/table.h (100%) diff --git a/tp5/Table de Hachage/src/main.cpp b/tp5/Table de Hachage/src/main.cpp deleted file mode 100644 index 0268fab..0000000 --- a/tp5/Table de Hachage/src/main.cpp +++ /dev/null @@ -1,20 +0,0 @@ -#include "table.h" - -int main() { - Table t(10); - - t.add(8); - t.add(2); - t.add(2); - t.add(2); - t.add(3); - t.add(7); - t.add(9); - t.add(4); - t.add(1); - t.add(6); - - t.show(); - - return 0; -} diff --git a/tp5/Table de Hachage/makefile b/tp5/TableDeHachage/makefile similarity index 100% rename from tp5/Table de Hachage/makefile rename to tp5/TableDeHachage/makefile diff --git a/tp5/Table de Hachage/src/hash_functions.cpp b/tp5/TableDeHachage/src/hash_functions.cpp similarity index 100% rename from tp5/Table de Hachage/src/hash_functions.cpp rename to tp5/TableDeHachage/src/hash_functions.cpp diff --git a/tp5/Table de Hachage/src/key.h b/tp5/TableDeHachage/src/key.h similarity index 100% rename from tp5/Table de Hachage/src/key.h rename to tp5/TableDeHachage/src/key.h diff --git a/tp5/TableDeHachage/src/main.cpp b/tp5/TableDeHachage/src/main.cpp new file mode 100644 index 0000000..cfdd90d --- /dev/null +++ b/tp5/TableDeHachage/src/main.cpp @@ -0,0 +1,20 @@ +#include "table.h" + +int main() { + Table t(10); + + t.add(8); + t.add(2); + t.add(2); + t.add(2); + t.add(3); + t.add(7); + t.add(9); + t.add(4); + t.add(1); + t.add(6); + + t.show(); + + return 0; +} diff --git a/tp5/Table de Hachage/src/table.cpp b/tp5/TableDeHachage/src/table.cpp similarity index 100% rename from tp5/Table de Hachage/src/table.cpp rename to tp5/TableDeHachage/src/table.cpp diff --git a/tp5/Table de Hachage/src/table.h b/tp5/TableDeHachage/src/table.h similarity index 100% rename from tp5/Table de Hachage/src/table.h rename to tp5/TableDeHachage/src/table.h -- GitLab From fa5ba580495e8c7e7899bb54119f166c6cedf2fa Mon Sep 17 00:00:00 2001 From: Eldar <eldar.kasmamytov@gmail.com> Date: Fri, 30 Oct 2020 12:09:32 +0100 Subject: [PATCH 13/23] Added Documentation - Readme file - Comments in header (.h) file --- tp6/ArbreBinaireDeRecherche/README.txt | 71 ++++++++++++++++++ tp6/ArbreBinaireDeRecherche/src/abr.h | 96 +++++++++++++++++++----- tp6/ArbreBinaireDeRecherche/src/main.cpp | 31 ++++++++ 3 files changed, 181 insertions(+), 17 deletions(-) create mode 100644 tp6/ArbreBinaireDeRecherche/README.txt diff --git a/tp6/ArbreBinaireDeRecherche/README.txt b/tp6/ArbreBinaireDeRecherche/README.txt new file mode 100644 index 0000000..410d02e --- /dev/null +++ b/tp6/ArbreBinaireDeRecherche/README.txt @@ -0,0 +1,71 @@ +================== Arbre Binaire de Recherche ================== +Module realise par Eldar Kasmamytov + + +===== Fonctionnalites presentes dans le module ===== + +- Constructeur par copie (copie profonde) + Possibilite de faire une copie a partir d'un noeud 'n'. + +- Surcharge de l'operateur d'affectation (copie profonde) + +- Recherche d'un element + +- Insertion d'un element + +- Suppression d'un element + - Si le noeud est une feuille, + alors le noeud est supprime simplement. + - Si le noeud possede un fils, + alors le noeud est supprime, et son fils + est rebranche au pere du noeud supprime. + - Si le noeud possede deux fils, + alors le noeud est supprime et remplace par + son plus proche predecesseur. + +- Parcours de l'arbre dans differents ordres: + - Ordre INFIX + - Ordre PREFIX (1) + - Ordre POSTFIX (2) + Fonction qui prend en parametre un pointeur de fonction 'handler', + qui est appele pour chaque element lors de parcours. Par defaut, + la fonction de traitement est 'list_elements' qui affiche les elements + dans l'ordre indique. + Par exemple, a est de type ABR. + Insertion des elements dans a dans l'ordre suivant: + 6,3,9,8,4,2,10,5,1,11. + + Appel a 'a.parcours(0)' (ordre INFIX): + 1 2 3 4 5 6 8 9 10 11 + + Appel a 'a.parcours(1)' (ordre PREFIX): + 6 3 2 1 4 5 9 8 10 11 + + Appel a 'a.parcours(2)' (ordre POSTFIX): + 1 2 5 4 3 8 11 10 9 6 + + Appel a 'a.parcours(1, mult_by_two)' (ordre PREFIX, fonction MULTIPLICATION par 2): + 12 6 4 2 8 10 18 16 20 22 + a est change. + +- Affichage de l'ABR entier ou d'un sous-ABR sous forme d'un arbre + (en utilisant parcours en largeur). + Possibilite d'afficher les informations supplementaires, + si le parametre 'extra' specifie. + Par exemple, a est de type ABR. + Insertion des elements dans a dans l'ordre suivant: + 6,3,9,8,4,2,10,5,1,11. + + Appel a 'a.draw(true)' affiche l'arbre suivant: + Number of Elements : 10 + Depth (Number of Levels) : 4 + Max Elements on Last Level : 8 + + ┌───6───┠+ ┌─3─┠┌─9─┠+ ┌2 4â” 8 10â” + 1 5 11 + +- Accesseur du premier noeud +- Accesseur du pere d'un element +- Accesseur de la profondeur de l'ABR (nombre de niveaux) \ No newline at end of file diff --git a/tp6/ArbreBinaireDeRecherche/src/abr.h b/tp6/ArbreBinaireDeRecherche/src/abr.h index f91c0f5..e39d664 100644 --- a/tp6/ArbreBinaireDeRecherche/src/abr.h +++ b/tp6/ArbreBinaireDeRecherche/src/abr.h @@ -11,10 +11,10 @@ struct Node { class ABR { private: - Node* head; - unsigned int count; + Node* head; // Pointeur vers le premier noeud + unsigned int count; // Nombre d'elements - // Postcondition: Commence son chemin a partir d'un noeud n + // Postcondition: Commence son chemin a partir d'un noeud n, // e est apres insere dans un bon endroit void insert_from_node (const Elem& e, Node*& n); @@ -23,54 +23,116 @@ class ABR { // Resultat: Retourne la colonne sur la-quelle on s'est arrete apres l'affichage d'un noeud unsigned int draw_node(const Node* n, unsigned int length) const; - // Fonction de traitement des noeuds par defaut (utilisee dans la fonction membre 'parcours') + // Fonction de traitement des noeuds par defaut (utilisee dans la fonction membre 'parcours'). + // Le mot cle 'static' est utilise, car la fonction 'parcours' exige une fonction 'handler', dont + // l'entete est 'void *nom* (Node*)', donc qui ne retourne aucune valeur et prend + // en parametre un seul argument de type 'Node*'. Si 'static' n'est pas utilise + // alors la fonction devient une fonction membre et donc prend en parametre + // un argument cache 'this', et en consequance elle ne correspond pas a 'handler'. static void list_elements(Node* n); - void copy_from_node(const Node* n); + // Resultat: pareil que 'get_parent', sauf qu'il commence + // son chemin a partir du noeud n passe en parametre + Node* get_parent_from_node(const Elem& e, Node* n, Node* parent=nullptr) const; + + // Resultat: retourne le nombre de niveaux dans l'ABR, mais + // commence son chemin a partir du noeud n passe en parametre + unsigned int get_depth_from_node(Node* n, unsigned int depth_count=0) const; public: + // =========== Constructeurs =========== + // Constructeur par defaut ABR(); + // Constructeur par copie + // Postcondition: realise un copie profonde d'un arbre entier ABR(const ABR& a); + // Destructeur ~ABR(); - Node* get_head() const; - + // =========== Fonctions Membres =========== + // Resultat: Retourne VRAI si l'ABR n'est pas vide, + // FAUX sinon bool isEmpty() const; - // Postcondition: Si e n'est pas present dans l'ABR, - // alors un noeud avec l'element e dedans est insere dans l'ABR - // Si e est deja present, alors ne fait rien + // Postcondition: * Si e n'est pas present dans l'ABR, + // alors un noeud avec l'element e dedans est insere dans l'ABR + // * Si e est deja present, alors ne fait rien void insert(const Elem& e); + // Postcondition: Noeud contenant l'element e est supprime de l'ABR + // * Si le noeud est une feuille, + // alors le noeud est supprime simplement + // * Si le noeud possede un fils, + // alors le noeud est supprime, et son fils + // est rebranche au pere du noeud supprime + // * Si le noeud possede deux fils, + // alors le noeud est supprime et remplace par + // son plus proche predecesseur void remove(const Elem& e); - // Postcondition: Si l'ABR n'est pas vide, dessine l'ABR entier - // (parcours en largeur, cad niveau apres niveau) - // Si l'ABR est vide, alors affiche une chaine de caracteres + // Preconditions: extra: afficher ou pas les informations supplementaires + // Postcondition: * Si l'ABR n'est pas vide, dessine l'ABR entier + // (parcours en largeur, cad niveau apres niveau) + // * Si l'ABR est vide, alors affiche une chaine de caracteres void draw(bool extra=false) const; + // Preconditions: extra: afficher ou pas les informations supplementaires + // Postcondition: Pareil que 'draw', sauf qu'il commence a dessiner + // l'ABR a partir du noeud n passe en parametre void draw_from_node(const Node* n, bool extra=false) const; + // Preconditions: * mode: 1=parcours PREFIX, 2=parcours POSTFIX, tout autre valeur=parcours INFIX + // * handler: fonction dont l'entete est 'void *nom* (Node*)', + // qui est appele pour chaque element dans l'ordre indique + // Postcondition: La fonction 'handler' est appliquee a chaque element + // de l'ABR dans l'ordre 'mode' void parcours(int mode, void (*handler)(Node*)=list_elements); + // Preconditions: handler: fonction dont l'entete est 'void *nom* (Node*)', + // qui est appele pour chaque element dans l'ordre indique + // Postcondition: La fonction 'handler' est appliquee a chaque element + // a partir du noeud 'n' dans l'ordre INFIX void parcours_infix_from(Node* n, void (*handler)(Node*)=list_elements); + + // Preconditions: handler: fonction dont l'entete est 'void *nom* (Node*)', + // qui est appele pour chaque element dans l'ordre indique + // Postcondition: La fonction 'handler' est appliquee a chaque element + // a partir du noeud 'n' dans l'ordre PREFIX void parcours_prefix_from(Node* n, void (*handler)(Node*)=list_elements); + + // Preconditions: handler: fonction dont l'entete est 'void *nom* (Node*)', + // qui est appele pour chaque element dans l'ordre indique + // Postcondition: La fonction 'handler' est appliquee a chaque element + // a partir du noeud 'n' dans l'ordre POSTFIX void parcours_postfix_from(Node* n, void (*handler)(Node*)=list_elements); + // Resultat: * Si l'element e est present dans l'ABR, + // alors, retourne le noeud contenant l'element e + // * Sinon retourne un pointeur null Node* find(const Elem& e) const; + // Resultat: Pareil que 'find', sauf qu'il commence + // son chemin a partir du noeud n passe en parametre Node* find_from_node(const Elem& e, Node* n) const; - Node* get_parent(const Elem& e) const; + // Postcondition: Realise une copie profonde a partir du noeud n + void copy_from_node(const Node* n); - Node* get_parent_from_node(const Elem& e, Node* n, Node* parent=nullptr) const; + // =========== Accesseurs =========== + // Resultat: Premier Noeud de l'ABR + Node* get_head() const; - unsigned int get_depth() const; + // Resultat: retourne le pere de l'element e passe en parametre + Node* get_parent(const Elem& e) const; - unsigned int get_depth_from_node(Node* n, unsigned int depth_count=0) const; + // Resultat: retourne le nombre de niveaux dans l'ABR + unsigned int get_depth() const; + // =========== Surcharhes des operateurs =========== + // Postcondition: Realise une affectation (copie profonde) + // Resultat: Retourne l'adresse de l'ABR ABR& operator=(const ABR& a); }; diff --git a/tp6/ArbreBinaireDeRecherche/src/main.cpp b/tp6/ArbreBinaireDeRecherche/src/main.cpp index e4e147c..32e0962 100644 --- a/tp6/ArbreBinaireDeRecherche/src/main.cpp +++ b/tp6/ArbreBinaireDeRecherche/src/main.cpp @@ -1,13 +1,44 @@ #include "abr.h" #include <queue> #include <iostream> +#include <chrono> void mult_by_two(Node* n) { n->element*=2; std::cout << n->element << " "; } +const unsigned int NB_ABR = 100; + int main() { + + // ABR tab[NB_ABR]; + // Elem e; + + // std::chrono::time_point<std::chrono::system_clock> start, end; + // start = std::chrono::system_clock::now(); + + // srand(time(NULL)); + + // for(unsigned int j=0; j<100; ++j) { + // for (unsigned int i=0; i<NB_ABR; ++i) { + // e = rand() % 1000; + // tab[i].insert(e); + // } + // } + + // end = std::chrono::system_clock::now(); + // int elapsed_microseconds + // = std::chrono::duration_cast<std::chrono::microseconds>(end-start).count(); + + // std::cout << "Elapsed Time : " << elapsed_microseconds << std::endl; + + // int elapsed_time_for_one = elapsed_microseconds / NB_ABR; + + // std::cout << "Elapsed For One : " << elapsed_time_for_one << std::endl; + + // tab[1].parcours(0); + ABR a; a.insert(6); -- GitLab From 07cb2db9a40672abb293fdd7ad1c2757ca49621a Mon Sep 17 00:00:00 2001 From: Eldar <eldar.kasmamytov@gmail.com> Date: Mon, 2 Nov 2020 10:23:05 +0100 Subject: [PATCH 14/23] Added Info (template) --- tp5/TableDeHachage/makefile | 11 ++- tp5/TableDeHachage/src/hash_functions.cpp | 14 ---- tp5/TableDeHachage/src/info.cpp | 1 + tp5/TableDeHachage/src/info.h | 64 +++++++++++++++ tp5/TableDeHachage/src/key.h | 2 +- tp5/TableDeHachage/src/main.cpp | 30 ++++--- tp5/TableDeHachage/src/table.cpp | 98 ++++++++++++----------- tp5/TableDeHachage/src/table.h | 87 ++++++++++++++++++-- 8 files changed, 221 insertions(+), 86 deletions(-) delete mode 100644 tp5/TableDeHachage/src/hash_functions.cpp create mode 100644 tp5/TableDeHachage/src/info.cpp create mode 100644 tp5/TableDeHachage/src/info.h diff --git a/tp5/TableDeHachage/makefile b/tp5/TableDeHachage/makefile index 76416f2..edb678d 100644 --- a/tp5/TableDeHachage/makefile +++ b/tp5/TableDeHachage/makefile @@ -1,14 +1,17 @@ all: bin/executable.out -bin/executable.out: obj/main.o obj/table.o - g++ -Wall -g obj/main.o obj/table.o -o bin/executable.out +bin/executable.out: obj/main.o obj/table.o obj/info.o + g++ -Wall -g obj/main.o obj/table.o obj/info.o -o bin/executable.out -obj/main.o: src/main.cpp src/table.h src/key.h +obj/main.o: src/main.cpp src/table.h src/key.h src/info.h g++ -Wall -g -c src/main.cpp -o obj/main.o -obj/table.o: src/table.h src/table.cpp src/key.h +obj/table.o: src/table.h src/table.cpp src/key.h src/info.h g++ -Wall -g -c src/table.cpp -o obj/table.o +obj/info.o: src/info.h src/info.cpp + g++ -Wall -g -c src/info.cpp -o obj/info.o + clean: rm obj/* diff --git a/tp5/TableDeHachage/src/hash_functions.cpp b/tp5/TableDeHachage/src/hash_functions.cpp deleted file mode 100644 index e75ae99..0000000 --- a/tp5/TableDeHachage/src/hash_functions.cpp +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef _HASH_FUNCTIONS -#define _HASH_FUNCTIONS - -#include "key.h" - -unsigned int hash_modulo (const Key& k, unsigned int size) { - return k % size; -} - -unsigned int hash_skip_linear (const Key& k, unsigned int try_nb) { - return 1; -} - -#endif \ No newline at end of file diff --git a/tp5/TableDeHachage/src/info.cpp b/tp5/TableDeHachage/src/info.cpp new file mode 100644 index 0000000..4132463 --- /dev/null +++ b/tp5/TableDeHachage/src/info.cpp @@ -0,0 +1 @@ +#include "info.h" \ No newline at end of file diff --git a/tp5/TableDeHachage/src/info.h b/tp5/TableDeHachage/src/info.h new file mode 100644 index 0000000..2795922 --- /dev/null +++ b/tp5/TableDeHachage/src/info.h @@ -0,0 +1,64 @@ +#ifndef _INFO +#define _INFO + +#include <iostream> + +template<class T> +class Info { + private: + T* value; + + public: + Info(); + Info(const T& value); + ~Info(); + + T get() const; + void set(const T& value); + + friend std::ostream& operator<<(std::ostream& output, const Info<T>& i) { + output << *i.value; + return output; + } + + friend std::istream& operator>>(std::istream& input, Info<T>& i) { + T temp; + input >> temp; + i.value = new T(temp); + return input; + } + + Info<T>& operator=(const Info<T>& info); +}; + +template<class T> +Info<T>::Info() { value = nullptr; } + +template<class T> +Info<T>::Info(const T& value) { this->value = new T(value); } + +template<class T> +Info<T>::~Info() { + if(value) { + delete value; + value = nullptr; + } +} + +template<class T> +T Info<T>::get() const { return *value; } + +template<class T> +void Info<T>::set(const T& val) { + if (!this->value) this->value = new T(val); + else *this->value = val; +} + +template<class T> +Info<T>& Info<T>::operator=(const Info<T>& info) { + if (!this->value) this->value = new T(*info.value); + else *this->value = *info.value; + return *this; +} + +#endif diff --git a/tp5/TableDeHachage/src/key.h b/tp5/TableDeHachage/src/key.h index cbe180a..f9dd454 100644 --- a/tp5/TableDeHachage/src/key.h +++ b/tp5/TableDeHachage/src/key.h @@ -1,6 +1,6 @@ #ifndef _KEY #define _KEY -typedef int Key; +typedef unsigned int Key; #endif diff --git a/tp5/TableDeHachage/src/main.cpp b/tp5/TableDeHachage/src/main.cpp index cfdd90d..6f55977 100644 --- a/tp5/TableDeHachage/src/main.cpp +++ b/tp5/TableDeHachage/src/main.cpp @@ -1,18 +1,26 @@ #include "table.h" +#include <iostream> +#include <string> + +typedef Table<std::string> TableString; +typedef Info<std::string> InfoString; int main() { - Table t(10); + TableString t(20); + + InfoString i; + i = std::string("toto"); + + InfoString i2("mew"); + + InfoString i3("tata"); + i3 = std::string("nine"); - t.add(8); - t.add(2); - t.add(2); - t.add(2); - t.add(3); - t.add(7); - t.add(9); - t.add(4); - t.add(1); - t.add(6); + t.add(8, i); + t.add(3, i); + t.add(2, i); + t.add(2, i2); + t.add(9, i3); t.show(); diff --git a/tp5/TableDeHachage/src/table.cpp b/tp5/TableDeHachage/src/table.cpp index d01a369..e042f47 100644 --- a/tp5/TableDeHachage/src/table.cpp +++ b/tp5/TableDeHachage/src/table.cpp @@ -1,48 +1,50 @@ -#include "table.h" -#include "hash_functions.cpp" -#include <iostream> - -Table::Table (unsigned int size) { - max_elements = size; - nb_elements = 0; - - elements = new Case[size]; - hash = hash_modulo; - hash_step = hash_skip_linear; -} - -Table::~Table () { - delete [] elements; -} - -void Table::add (const Key& key) { - assert(nb_elements < max_elements); - - unsigned int hash_code = hash(key, max_elements); - unsigned int try_nb = 1; - - while(!elements[hash_code].free) { - hash_code += hash_step(key, try_nb++); - if(hash_code >= max_elements) { - hash_code = hash_code % max_elements; - } - } - - if (elements[hash_code].free) { - elements[hash_code].key = key; - elements[hash_code].free = false; - ++nb_elements; - } -} - -void Table::show () const { - std::cout << "Maximum elements: " << max_elements << std::endl; - std::cout << "Elements stored: " << nb_elements << std::endl; - for(unsigned int i=0; i<max_elements; ++i) { - if(!elements[i].free) std::cout << "[" << elements[i].key << "]"; - else std::cout << "[ ]"; - - if (i==max_elements-1) std::cout << std::endl; - else std::cout << " "; - } -} \ No newline at end of file +// #include "table.h" +// #include <iostream> + +// unsigned int Table::hash_modulo (const Key& k, unsigned int size) { return k % size; } + +// unsigned int Table::rehash_linear (const Key& k, unsigned int try_nb) { return 1; } + +// Table::Table (unsigned int size, unsigned int (*hash)(const Key&, unsigned int)) +// : max_elements(size), nb_elements(0), hash(hash) { +// elements = new Case[size]; +// rehash = rehash_linear; +// } + +// Table::~Table () { delete [] elements; } + +// void Table::add (const Key& key) { +// assert(nb_elements < max_elements); + +// unsigned int hash_code = hash(key, max_elements); +// unsigned int try_nb = 1; + +// while(!elements[hash_code].free) { +// hash_code += rehash(key, try_nb++); +// if(hash_code >= max_elements) { +// hash_code = hash_code % max_elements; +// } +// } + +// if (elements[hash_code].free) { +// elements[hash_code].key = key; +// elements[hash_code].free = false; +// ++nb_elements; +// } +// } + +// void Table::show () const { +// std::cout << "Maximum elements: " << max_elements << std::endl; +// std::cout << "Elements stored: " << nb_elements << std::endl; +// for(unsigned int i=0; i<max_elements; ++i) { +// if(!elements[i].free) std::cout << "[" << elements[i].key << "]"; +// else std::cout << "[ ]"; + +// if (i==max_elements-1) std::cout << std::endl; +// else std::cout << " "; +// } +// } + +// void Table::set_hash(unsigned int (*hash)(const Key&, unsigned int)) { this->hash = hash; } + +// void Table::set_rehash(unsigned int (*rehash)(const Key&, unsigned int)) { this->rehash = rehash; } \ No newline at end of file diff --git a/tp5/TableDeHachage/src/table.h b/tp5/TableDeHachage/src/table.h index 10c7633..04f8000 100644 --- a/tp5/TableDeHachage/src/table.h +++ b/tp5/TableDeHachage/src/table.h @@ -1,46 +1,117 @@ #ifndef _TABLE #define _TABLE -#include "key.h" #include <assert.h> +#include "key.h" +#include "info.h" +template<class T> class Table; +template<class T> class Case { - friend class Table; + friend class Table<T>; private: Key key; + Info<T> info; bool free; public: Case() : free(true) {} Case(const Key& k) : key(k), free(false) {} - void set(const Key& k) { key=k; free=false; } - Key get() const { return key; } + void set_key(const Key& k) { key=k; free=false; } + Key get_key() const { return key; } bool isFree() const { return free; } }; +template<class T> class Table { private: - Case* elements; + Case<T>* elements; unsigned int max_elements; unsigned int nb_elements; unsigned int (*hash)(const Key&, unsigned int); - unsigned int (*hash_step)(const Key&, unsigned int); + unsigned int (*rehash)(const Key&, unsigned int); + + static unsigned int hash_modulo (const Key& k, unsigned int size); + static unsigned int rehash_linear (const Key& k, unsigned int try_nb); public: - Table(unsigned int size); + Table(unsigned int size, unsigned int (*hash)(const Key&, unsigned int)=hash_modulo); ~Table(); - void add(const Key& e); + void set_hash(unsigned int (*hash)(const Key&, unsigned int)); + void set_rehash(unsigned int (*rehash)(const Key&, unsigned int)); + + void add(const Key& e, const Info<T>& info); void remove(unsigned int hash_code); void show() const; }; +template<class T> +unsigned int Table<T>::hash_modulo (const Key& k, unsigned int size) { return k % size; } + +template<class T> +unsigned int Table<T>::rehash_linear (const Key& k, unsigned int try_nb) { return 1; } + +template<class T> +Table<T>::Table (unsigned int size, unsigned int (*hash)(const Key&, unsigned int)) + : max_elements(size), nb_elements(0), hash(hash) { + elements = new Case<T>[size]; + rehash = rehash_linear; +} + +template<class T> +Table<T>::~Table () { delete [] elements; } + +template<class T> +void Table<T>::add (const Key& key, const Info<T>& info) { + assert(nb_elements < max_elements); + + unsigned int hash_code = hash(key, max_elements); + unsigned int try_nb = 1; + + while(!elements[hash_code].free) { + hash_code += rehash(key, try_nb++); + if(hash_code >= max_elements) { + hash_code = hash_code % max_elements; + } + } + + if (elements[hash_code].free) { + elements[hash_code].key = key; + elements[hash_code].info.set(info.get()); + elements[hash_code].free = false; + ++nb_elements; + } +} + +template<class T> +void Table<T>::show () const { + std::cout << "Maximum elements: " << max_elements << std::endl; + std::cout << "Elements stored: " << nb_elements << std::endl; + for(unsigned int i=0; i<max_elements; ++i) { + if(!elements[i].free) { + std::cout << "[" << elements[i].key << "->"; + std::cout << elements[i].info << "]"; + } + else std::cout << "[ ]"; + + if (i==max_elements-1) std::cout << std::endl; + else std::cout << " "; + } +} + +template<class T> +void Table<T>::set_hash(unsigned int (*hash)(const Key&, unsigned int)) { this->hash = hash; } + +template<class T> +void Table<T>::set_rehash(unsigned int (*rehash)(const Key&, unsigned int)) { this->rehash = rehash; } + #endif \ No newline at end of file -- GitLab From 8eda93861bd11f1ad1e9a94f465e0b0acf275688 Mon Sep 17 00:00:00 2001 From: Eldar <eldar.kasmamytov@gmail.com> Date: Mon, 2 Nov 2020 11:37:40 +0100 Subject: [PATCH 15/23] Key (template) - add function overload --- tp5/TableDeHachage/src/key.h | 60 ++++++++++++++++++++++- tp5/TableDeHachage/src/main.cpp | 30 +++++++----- tp5/TableDeHachage/src/table.h | 87 +++++++++++++++++++-------------- 3 files changed, 126 insertions(+), 51 deletions(-) diff --git a/tp5/TableDeHachage/src/key.h b/tp5/TableDeHachage/src/key.h index f9dd454..57accf4 100644 --- a/tp5/TableDeHachage/src/key.h +++ b/tp5/TableDeHachage/src/key.h @@ -1,6 +1,64 @@ #ifndef _KEY #define _KEY -typedef unsigned int Key; +#include <iostream> + +template<class T> +class Key { + private: + T* value; + + public: + Key(); + Key(const T& value); + ~Key(); + + T get() const; + void set(const T& value); + + friend std::ostream& operator<<(std::ostream& output, const Key<T>& k) { + output << *k.value; + return output; + } + + friend std::istream& operator>>(std::istream& input, Key<T>& k) { + T temp; + input >> temp; + k.value = new T(temp); + return input; + } + + Key<T>& operator=(const Key<T>& key); +}; + +template<class T> +Key<T>::Key() { value = nullptr; } + +template<class T> +Key<T>::Key(const T& value) { this->value = new T(value); } + +template<class T> +Key<T>::~Key() { + if(value) { + delete value; + value = nullptr; + } +} + +template<class T> +T Key<T>::get() const { return *value; } + +template<class T> +void Key<T>::set(const T& val) { + if (!this->value) this->value = new T(val); + else *this->value = val; +} + +template<class T> +Key<T>& Key<T>::operator=(const Key<T>& key) { + if (!this->value) this->value = new T(*key.value); + else *this->value = *key.value; + return *this; +} #endif diff --git a/tp5/TableDeHachage/src/main.cpp b/tp5/TableDeHachage/src/main.cpp index 6f55977..8dd1548 100644 --- a/tp5/TableDeHachage/src/main.cpp +++ b/tp5/TableDeHachage/src/main.cpp @@ -2,25 +2,31 @@ #include <iostream> #include <string> -typedef Table<std::string> TableString; +typedef Table<unsigned int,std::string> Table_; typedef Info<std::string> InfoString; +typedef Key<unsigned int> KeyInt; int main() { - TableString t(20); + Table_ t(20); - InfoString i; - i = std::string("toto"); + // KeyInt k; + // k = 8; + // InfoString i; + // i = std::string("toto"); - InfoString i2("mew"); + // KeyInt k2(2); + // InfoString i2("mew"); - InfoString i3("tata"); - i3 = std::string("nine"); + // KeyInt k3(234); + // k3 = 9; + // InfoString i3("tata"); + // i3 = std::string("nine"); - t.add(8, i); - t.add(3, i); - t.add(2, i); - t.add(2, i2); - t.add(9, i3); + t.add(8, std::string("toto")); + t.add(8, std::string("toto")); + t.add(2, std::string("toto")); + t.add(2, std::string("mew")); + t.add(9, std::string("nine")); t.show(); diff --git a/tp5/TableDeHachage/src/table.h b/tp5/TableDeHachage/src/table.h index 04f8000..807861b 100644 --- a/tp5/TableDeHachage/src/table.h +++ b/tp5/TableDeHachage/src/table.h @@ -5,73 +5,75 @@ #include "key.h" #include "info.h" -template<class T> +template<class K, class T> class Table; -template<class T> +template<class K, class T> class Case { - friend class Table<T>; + friend class Table<K,T>; private: - Key key; - Info<T> info; bool free; public: - Case() : free(true) {} - Case(const Key& k) : key(k), free(false) {} + Key<K> key; + Info<T> info; - void set_key(const Key& k) { key=k; free=false; } - Key get_key() const { return key; } + Case() : free(true) {} + Case(const Key<K>& k) : key(k), free(false) {} bool isFree() const { return free; } }; -template<class T> +template<class K, class T> class Table { private: - Case<T>* elements; + Case<K,T>* elements; unsigned int max_elements; unsigned int nb_elements; - unsigned int (*hash)(const Key&, unsigned int); - unsigned int (*rehash)(const Key&, unsigned int); + unsigned int (*hash)(const K&, unsigned int); + unsigned int (*rehash)(const K&, unsigned int); - static unsigned int hash_modulo (const Key& k, unsigned int size); - static unsigned int rehash_linear (const Key& k, unsigned int try_nb); + static unsigned int hash_modulo (const K& k, unsigned int size); + static unsigned int rehash_linear (const K& k, unsigned int try_nb); public: - Table(unsigned int size, unsigned int (*hash)(const Key&, unsigned int)=hash_modulo); + Table(unsigned int size, unsigned int (*hash)(const K&, unsigned int)=hash_modulo); ~Table(); - void set_hash(unsigned int (*hash)(const Key&, unsigned int)); - void set_rehash(unsigned int (*rehash)(const Key&, unsigned int)); + void set_hash(unsigned int (*hash)(const K&, unsigned int)); + void set_rehash(unsigned int (*rehash)(const K&, unsigned int)); + + void add(const K& key, const T& info); + void add(const K& key, const Info<T>& info); + void add(const Key<K>& key, const Info<T>& info); + void add(const Key<K>& key, const T& info); - void add(const Key& e, const Info<T>& info); void remove(unsigned int hash_code); void show() const; }; -template<class T> -unsigned int Table<T>::hash_modulo (const Key& k, unsigned int size) { return k % size; } +template<class K, class T> +unsigned int Table<K,T>::hash_modulo (const K& k, unsigned int size) { return k % size; } -template<class T> -unsigned int Table<T>::rehash_linear (const Key& k, unsigned int try_nb) { return 1; } +template<class K, class T> +unsigned int Table<K,T>::rehash_linear (const K& k, unsigned int try_nb) { return 1; } -template<class T> -Table<T>::Table (unsigned int size, unsigned int (*hash)(const Key&, unsigned int)) +template<class K, class T> +Table<K,T>::Table (unsigned int size, unsigned int (*hash)(const K&, unsigned int)) : max_elements(size), nb_elements(0), hash(hash) { - elements = new Case<T>[size]; + elements = new Case<K,T>[size]; rehash = rehash_linear; } -template<class T> -Table<T>::~Table () { delete [] elements; } +template<class K, class T> +Table<K,T>::~Table () { delete [] elements; } -template<class T> -void Table<T>::add (const Key& key, const Info<T>& info) { +template<class K, class T> +void Table<K,T>::add (const K& key, const T& info) { assert(nb_elements < max_elements); unsigned int hash_code = hash(key, max_elements); @@ -85,15 +87,24 @@ void Table<T>::add (const Key& key, const Info<T>& info) { } if (elements[hash_code].free) { - elements[hash_code].key = key; - elements[hash_code].info.set(info.get()); + elements[hash_code].key.set(key); + elements[hash_code].info.set(info); elements[hash_code].free = false; ++nb_elements; } } -template<class T> -void Table<T>::show () const { +template<class K, class T> +void Table<K,T>::add (const K& key, const Info<T>& info) { this->add(key,info.get()); } + +template<class K, class T> +void Table<K,T>::add (const Key<K>& key, const Info<T>& info) { this->add(key.get(),info.get()); } + +template<class K, class T> +void Table<K,T>::add (const Key<K>& key, const T& info) { this->add(key.get(),info); } + +template<class K, class T> +void Table<K,T>::show () const { std::cout << "Maximum elements: " << max_elements << std::endl; std::cout << "Elements stored: " << nb_elements << std::endl; for(unsigned int i=0; i<max_elements; ++i) { @@ -108,10 +119,10 @@ void Table<T>::show () const { } } -template<class T> -void Table<T>::set_hash(unsigned int (*hash)(const Key&, unsigned int)) { this->hash = hash; } +template<class K, class T> +void Table<K,T>::set_hash(unsigned int (*hash)(const K&, unsigned int)) { this->hash = hash; } -template<class T> -void Table<T>::set_rehash(unsigned int (*rehash)(const Key&, unsigned int)) { this->rehash = rehash; } +template<class K, class T> +void Table<K,T>::set_rehash(unsigned int (*rehash)(const K&, unsigned int)) { this->rehash = rehash; } #endif \ No newline at end of file -- GitLab From 67089750eae2c7ba277cf36171ae28299508ee4d Mon Sep 17 00:00:00 2001 From: Eldar <eldar.kasmamytov@gmail.com> Date: Mon, 2 Nov 2020 11:49:29 +0100 Subject: [PATCH 16/23] Moved hash and rehash to Key module - changed the template parameter T for I (Info) in Table module --- tp5/TableDeHachage/src/key.h | 9 +++++ tp5/TableDeHachage/src/table.h | 71 +++++++++++++++------------------- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/tp5/TableDeHachage/src/key.h b/tp5/TableDeHachage/src/key.h index 57accf4..7c2d8d5 100644 --- a/tp5/TableDeHachage/src/key.h +++ b/tp5/TableDeHachage/src/key.h @@ -16,6 +16,9 @@ class Key { T get() const; void set(const T& value); + static unsigned int hash_modulo (const T& k, unsigned int size); + static unsigned int rehash_linear (const T& k, unsigned int try_nb); + friend std::ostream& operator<<(std::ostream& output, const Key<T>& k) { output << *k.value; return output; @@ -45,6 +48,12 @@ Key<T>::~Key() { } } +template<class T> +unsigned int Key<T>::hash_modulo (const T& k, unsigned int size) { return k % size; } + +template<class T> +unsigned int Key<T>::rehash_linear (const T& k, unsigned int try_nb) { return 1; } + template<class T> T Key<T>::get() const { return *value; } diff --git a/tp5/TableDeHachage/src/table.h b/tp5/TableDeHachage/src/table.h index 807861b..e9556f6 100644 --- a/tp5/TableDeHachage/src/table.h +++ b/tp5/TableDeHachage/src/table.h @@ -5,19 +5,19 @@ #include "key.h" #include "info.h" -template<class K, class T> +template<class K, class I> class Table; -template<class K, class T> +template<class K, class I> class Case { - friend class Table<K,T>; + friend class Table<K,I>; private: bool free; public: Key<K> key; - Info<T> info; + Info<I> info; Case() : free(true) {} Case(const Key<K>& k) : key(k), free(false) {} @@ -25,10 +25,10 @@ class Case { bool isFree() const { return free; } }; -template<class K, class T> +template<class K, class I> class Table { private: - Case<K,T>* elements; + Case<K,I>* elements; unsigned int max_elements; unsigned int nb_elements; @@ -36,44 +36,35 @@ class Table { unsigned int (*hash)(const K&, unsigned int); unsigned int (*rehash)(const K&, unsigned int); - static unsigned int hash_modulo (const K& k, unsigned int size); - static unsigned int rehash_linear (const K& k, unsigned int try_nb); - public: - Table(unsigned int size, unsigned int (*hash)(const K&, unsigned int)=hash_modulo); + Table(unsigned int size, unsigned int (*hash)(const K&, unsigned int)=Key<K>::hash_modulo); ~Table(); void set_hash(unsigned int (*hash)(const K&, unsigned int)); void set_rehash(unsigned int (*rehash)(const K&, unsigned int)); - void add(const K& key, const T& info); - void add(const K& key, const Info<T>& info); - void add(const Key<K>& key, const Info<T>& info); - void add(const Key<K>& key, const T& info); + void add(const K& key, const I& info); + void add(const K& key, const Info<I>& info); + void add(const Key<K>& key, const Info<I>& info); + void add(const Key<K>& key, const I& info); void remove(unsigned int hash_code); void show() const; }; -template<class K, class T> -unsigned int Table<K,T>::hash_modulo (const K& k, unsigned int size) { return k % size; } - -template<class K, class T> -unsigned int Table<K,T>::rehash_linear (const K& k, unsigned int try_nb) { return 1; } - -template<class K, class T> -Table<K,T>::Table (unsigned int size, unsigned int (*hash)(const K&, unsigned int)) +template<class K, class I> +Table<K,I>::Table (unsigned int size, unsigned int (*hash)(const K&, unsigned int)) : max_elements(size), nb_elements(0), hash(hash) { - elements = new Case<K,T>[size]; - rehash = rehash_linear; + elements = new Case<K,I>[size]; + rehash = Key<K>::rehash_linear; } -template<class K, class T> -Table<K,T>::~Table () { delete [] elements; } +template<class K, class I> +Table<K,I>::~Table () { delete [] elements; } -template<class K, class T> -void Table<K,T>::add (const K& key, const T& info) { +template<class K, class I> +void Table<K,I>::add (const K& key, const I& info) { assert(nb_elements < max_elements); unsigned int hash_code = hash(key, max_elements); @@ -94,17 +85,17 @@ void Table<K,T>::add (const K& key, const T& info) { } } -template<class K, class T> -void Table<K,T>::add (const K& key, const Info<T>& info) { this->add(key,info.get()); } +template<class K, class I> +void Table<K,I>::add (const K& key, const Info<I>& info) { this->add(key,info.get()); } -template<class K, class T> -void Table<K,T>::add (const Key<K>& key, const Info<T>& info) { this->add(key.get(),info.get()); } +template<class K, class I> +void Table<K,I>::add (const Key<K>& key, const Info<I>& info) { this->add(key.get(),info.get()); } -template<class K, class T> -void Table<K,T>::add (const Key<K>& key, const T& info) { this->add(key.get(),info); } +template<class K, class I> +void Table<K,I>::add (const Key<K>& key, const I& info) { this->add(key.get(),info); } -template<class K, class T> -void Table<K,T>::show () const { +template<class K, class I> +void Table<K,I>::show () const { std::cout << "Maximum elements: " << max_elements << std::endl; std::cout << "Elements stored: " << nb_elements << std::endl; for(unsigned int i=0; i<max_elements; ++i) { @@ -119,10 +110,10 @@ void Table<K,T>::show () const { } } -template<class K, class T> -void Table<K,T>::set_hash(unsigned int (*hash)(const K&, unsigned int)) { this->hash = hash; } +template<class K, class I> +void Table<K,I>::set_hash(unsigned int (*hash)(const K&, unsigned int)) { this->hash = hash; } -template<class K, class T> -void Table<K,T>::set_rehash(unsigned int (*rehash)(const K&, unsigned int)) { this->rehash = rehash; } +template<class K, class I> +void Table<K,I>::set_rehash(unsigned int (*rehash)(const K&, unsigned int)) { this->rehash = rehash; } #endif \ No newline at end of file -- GitLab From b3afdaabc8e9d5c948e9821923404fd3692c622d Mon Sep 17 00:00:00 2001 From: Eldar <eldar.kasmamytov@gmail.com> Date: Mon, 2 Nov 2020 12:00:06 +0100 Subject: [PATCH 17/23] Changed Table Constructor - added rehash parameter with a default argument 'rehash_linear' --- tp5/TableDeHachage/src/table.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tp5/TableDeHachage/src/table.h b/tp5/TableDeHachage/src/table.h index e9556f6..d5279fe 100644 --- a/tp5/TableDeHachage/src/table.h +++ b/tp5/TableDeHachage/src/table.h @@ -37,7 +37,9 @@ class Table { unsigned int (*rehash)(const K&, unsigned int); public: - Table(unsigned int size, unsigned int (*hash)(const K&, unsigned int)=Key<K>::hash_modulo); + Table(unsigned int size, + unsigned int (*hash)(const K&, unsigned int)=Key<K>::hash_modulo, + unsigned int (*rehash)(const K&, unsigned int)=Key<K>::rehash_linear); ~Table(); void set_hash(unsigned int (*hash)(const K&, unsigned int)); @@ -54,10 +56,11 @@ class Table { }; template<class K, class I> -Table<K,I>::Table (unsigned int size, unsigned int (*hash)(const K&, unsigned int)) - : max_elements(size), nb_elements(0), hash(hash) { +Table<K,I>::Table (unsigned int size, + unsigned int (*hash)(const K&, unsigned int), + unsigned int (*rehash)(const K&, unsigned int)) + : max_elements(size), nb_elements(0), hash(hash), rehash(rehash) { elements = new Case<K,I>[size]; - rehash = Key<K>::rehash_linear; } template<class K, class I> -- GitLab From 2d6f0a237a9057bd954ee4597436dcb1766b0aa2 Mon Sep 17 00:00:00 2001 From: Eldar <eldar.kasmamytov@gmail.com> Date: Tue, 3 Nov 2020 13:43:34 +0100 Subject: [PATCH 18/23] Info and Key are no longer pointers, + 'find' function - Info and Key contain elements and not pointers - Only unique key can be inserted (assert used) - 'find' function takes KEY and returns INFO --- tp5/TableDeHachage/src/info.h | 38 +++++++++++++--------------- tp5/TableDeHachage/src/key.h | 45 ++++++++++++++++++--------------- tp5/TableDeHachage/src/main.cpp | 5 ++-- tp5/TableDeHachage/src/table.h | 36 ++++++++++++++++++++++---- 4 files changed, 75 insertions(+), 49 deletions(-) diff --git a/tp5/TableDeHachage/src/info.h b/tp5/TableDeHachage/src/info.h index 2795922..d5440b6 100644 --- a/tp5/TableDeHachage/src/info.h +++ b/tp5/TableDeHachage/src/info.h @@ -6,58 +6,54 @@ template<class T> class Info { private: - T* value; + T value; + bool empty; public: Info(); Info(const T& value); - ~Info(); T get() const; void set(const T& value); + bool isEmpty() const; + + Info<T>& operator=(const Info<T>& info); + friend std::ostream& operator<<(std::ostream& output, const Info<T>& i) { - output << *i.value; + output << i.value; return output; } friend std::istream& operator>>(std::istream& input, Info<T>& i) { T temp; input >> temp; - i.value = new T(temp); + i.value = temp; return input; } - - Info<T>& operator=(const Info<T>& info); }; template<class T> -Info<T>::Info() { value = nullptr; } +Info<T>::Info() : empty(true) {} template<class T> -Info<T>::Info(const T& value) { this->value = new T(value); } +Info<T>::Info(const T& val) : value(val), empty(false) {} template<class T> -Info<T>::~Info() { - if(value) { - delete value; - value = nullptr; - } -} - -template<class T> -T Info<T>::get() const { return *value; } +T Info<T>::get() const { return value; } template<class T> void Info<T>::set(const T& val) { - if (!this->value) this->value = new T(val); - else *this->value = val; + this->value = val; + empty = false; } +template<class T> +bool Info<T>::isEmpty() const { return empty; } + template<class T> Info<T>& Info<T>::operator=(const Info<T>& info) { - if (!this->value) this->value = new T(*info.value); - else *this->value = *info.value; + this->value = info.value; return *this; } diff --git a/tp5/TableDeHachage/src/key.h b/tp5/TableDeHachage/src/key.h index 7c2d8d5..9538b6b 100644 --- a/tp5/TableDeHachage/src/key.h +++ b/tp5/TableDeHachage/src/key.h @@ -6,47 +6,48 @@ template<class T> class Key { private: - T* value; + T value; + bool empty; + unsigned int try_count; public: Key(); Key(const T& value); - ~Key(); T get() const; void set(const T& value); + bool isEmpty() const; + + Key<T>& operator=(const Key<T>& key); + + unsigned int get_try_count() const; + void set_try_count(unsigned int nb); + static unsigned int hash_modulo (const T& k, unsigned int size); static unsigned int rehash_linear (const T& k, unsigned int try_nb); friend std::ostream& operator<<(std::ostream& output, const Key<T>& k) { - output << *k.value; + output << k.value; return output; } friend std::istream& operator>>(std::istream& input, Key<T>& k) { T temp; input >> temp; - k.value = new T(temp); + k.value = temp; return input; } - - Key<T>& operator=(const Key<T>& key); }; template<class T> -Key<T>::Key() { value = nullptr; } +Key<T>::Key() : empty(true), try_count(0) {} template<class T> -Key<T>::Key(const T& value) { this->value = new T(value); } +Key<T>::Key(const T& val) : value(val), empty(false), try_count(0) {} template<class T> -Key<T>::~Key() { - if(value) { - delete value; - value = nullptr; - } -} +bool Key<T>::isEmpty() const { return empty; } template<class T> unsigned int Key<T>::hash_modulo (const T& k, unsigned int size) { return k % size; } @@ -55,18 +56,20 @@ template<class T> unsigned int Key<T>::rehash_linear (const T& k, unsigned int try_nb) { return 1; } template<class T> -T Key<T>::get() const { return *value; } +T Key<T>::get() const { return value; } template<class T> -void Key<T>::set(const T& val) { - if (!this->value) this->value = new T(val); - else *this->value = val; -} +void Key<T>::set(const T& val) { this->value = val; } + +template<class T> +unsigned int Key<T>::get_try_count() const { return try_count; } + +template<class T> +void Key<T>::set_try_count(unsigned int nb) { try_count = nb; } template<class T> Key<T>& Key<T>::operator=(const Key<T>& key) { - if (!this->value) this->value = new T(*key.value); - else *this->value = *key.value; + this->value = key.value; return *this; } diff --git a/tp5/TableDeHachage/src/main.cpp b/tp5/TableDeHachage/src/main.cpp index 8dd1548..281b0db 100644 --- a/tp5/TableDeHachage/src/main.cpp +++ b/tp5/TableDeHachage/src/main.cpp @@ -23,12 +23,13 @@ int main() { // i3 = std::string("nine"); t.add(8, std::string("toto")); - t.add(8, std::string("toto")); - t.add(2, std::string("toto")); t.add(2, std::string("mew")); t.add(9, std::string("nine")); t.show(); + InfoString s = t.find(9); + std::cout << "Info of 9: " << s << std::endl; + return 0; } diff --git a/tp5/TableDeHachage/src/table.h b/tp5/TableDeHachage/src/table.h index d5279fe..97035dd 100644 --- a/tp5/TableDeHachage/src/table.h +++ b/tp5/TableDeHachage/src/table.h @@ -13,15 +13,17 @@ class Case { friend class Table<K,I>; private: - bool free; - - public: Key<K> key; Info<I> info; + bool free; + public: Case() : free(true) {} Case(const Key<K>& k) : key(k), free(false) {} + Key<K> get_key() const { return key; } + Info<I> get_info() const { return info; } + bool isFree() const { return free; } }; @@ -50,7 +52,9 @@ class Table { void add(const Key<K>& key, const Info<I>& info); void add(const Key<K>& key, const I& info); - void remove(unsigned int hash_code); + Info<I> find(const K& key) const; + Info<I> find(const Key<K>& key) const; + void show() const; }; @@ -64,13 +68,17 @@ Table<K,I>::Table (unsigned int size, } template<class K, class I> -Table<K,I>::~Table () { delete [] elements; } +Table<K,I>::~Table () { delete [] elements; elements = nullptr; } template<class K, class I> void Table<K,I>::add (const K& key, const I& info) { assert(nb_elements < max_elements); unsigned int hash_code = hash(key, max_elements); + + if(!elements[hash_code].free) + assert(elements[hash_code].key.get() != key); + unsigned int try_nb = 1; while(!elements[hash_code].free) { @@ -82,6 +90,7 @@ void Table<K,I>::add (const K& key, const I& info) { if (elements[hash_code].free) { elements[hash_code].key.set(key); + elements[hash_code].key.set_try_count(try_nb); elements[hash_code].info.set(info); elements[hash_code].free = false; ++nb_elements; @@ -105,6 +114,8 @@ void Table<K,I>::show () const { if(!elements[i].free) { std::cout << "[" << elements[i].key << "->"; std::cout << elements[i].info << "]"; + // std::cout << elements[i].info << "->"; + // std::cout << elements[i].key.get_try_count() << "]"; } else std::cout << "[ ]"; @@ -119,4 +130,19 @@ void Table<K,I>::set_hash(unsigned int (*hash)(const K&, unsigned int)) { this-> template<class K, class I> void Table<K,I>::set_rehash(unsigned int (*rehash)(const K&, unsigned int)) { this->rehash = rehash; } +template<class K, class I> +Info<I> Table<K,I>::find(const K& key) const { + unsigned int index = hash(key, max_elements); + + assert(!elements[index].free); + + while (elements[index].key.get() != key) + index += rehash(key, max_elements); + + return elements[index].info; +} + +template<class K, class I> +Info<I> Table<K,I>::find(const Key<K>& key) const { return find(key.get()); } + #endif \ No newline at end of file -- GitLab From f3f1e8ac47c1709b8fba98e6b40eb9f0e1959815 Mon Sep 17 00:00:00 2001 From: Eldar <eldar.kasmamytov@gmail.com> Date: Tue, 3 Nov 2020 16:11:54 +0100 Subject: [PATCH 19/23] Improved Draw Function --- tp5/TableDeHachage/src/info.h | 44 +++++++++++++++++-- tp5/TableDeHachage/src/key.h | 48 ++++++++++++++++++--- tp5/TableDeHachage/src/main.cpp | 9 +++- tp5/TableDeHachage/src/table.h | 76 ++++++++++++++++++++++++--------- 4 files changed, 145 insertions(+), 32 deletions(-) diff --git a/tp5/TableDeHachage/src/info.h b/tp5/TableDeHachage/src/info.h index d5440b6..cbe92f9 100644 --- a/tp5/TableDeHachage/src/info.h +++ b/tp5/TableDeHachage/src/info.h @@ -2,6 +2,7 @@ #define _INFO #include <iostream> +#include <assert.h> template<class T> class Info { @@ -19,6 +20,13 @@ class Info { bool isEmpty() const; Info<T>& operator=(const Info<T>& info); + Info<T>& operator=(const T& info); + + bool operator==(const Info<T>& info) const; + bool operator==(const T& info) const; + + bool operator!=(const Info<T>& info) const; + bool operator!=(const T& info) const; friend std::ostream& operator<<(std::ostream& output, const Info<T>& i) { output << i.value; @@ -26,9 +34,7 @@ class Info { } friend std::istream& operator>>(std::istream& input, Info<T>& i) { - T temp; - input >> temp; - i.value = temp; + input >> i.value; return input; } }; @@ -53,8 +59,38 @@ bool Info<T>::isEmpty() const { return empty; } template<class T> Info<T>& Info<T>::operator=(const Info<T>& info) { - this->value = info.value; + set(info.value); return *this; } +template<class T> +Info<T>& Info<T>::operator=(const T& info) { + set(info); + return *this; +} + +template<class T> +bool Info<T>::operator==(const Info<T>& info) const { + assert(!empty && !info.empty); + return this->value == info.value; +} + +template<class T> +bool Info<T>::operator==(const T& info) const { + assert(!empty); + return this->value == info; +} + +template<class T> +bool Info<T>::operator!=(const Info<T>& info) const { + assert(!empty && !info.empty); + return this->value != info.value; +} + +template<class T> +bool Info<T>::operator!=(const T& info) const { + assert(!empty); + return this->value != info; +} + #endif diff --git a/tp5/TableDeHachage/src/key.h b/tp5/TableDeHachage/src/key.h index 9538b6b..f4464a0 100644 --- a/tp5/TableDeHachage/src/key.h +++ b/tp5/TableDeHachage/src/key.h @@ -20,6 +20,13 @@ class Key { bool isEmpty() const; Key<T>& operator=(const Key<T>& key); + Key<T>& operator=(const T& key); + + bool operator==(const Key<T>& key) const; + bool operator==(const T& key) const; + + bool operator!=(const Key<T>& key) const; + bool operator!=(const T& key) const; unsigned int get_try_count() const; void set_try_count(unsigned int nb); @@ -33,9 +40,7 @@ class Key { } friend std::istream& operator>>(std::istream& input, Key<T>& k) { - T temp; - input >> temp; - k.value = temp; + input >> k.value; return input; } }; @@ -59,7 +64,10 @@ template<class T> T Key<T>::get() const { return value; } template<class T> -void Key<T>::set(const T& val) { this->value = val; } +void Key<T>::set(const T& val) { + this->value = val; + empty = false; +} template<class T> unsigned int Key<T>::get_try_count() const { return try_count; } @@ -69,8 +77,38 @@ void Key<T>::set_try_count(unsigned int nb) { try_count = nb; } template<class T> Key<T>& Key<T>::operator=(const Key<T>& key) { - this->value = key.value; + set(key.value); + return *this; +} + +template<class T> +Key<T>& Key<T>::operator=(const T& key) { + set(key); return *this; } +template<class T> +bool Key<T>::operator==(const Key<T>& key) const { + assert(!empty && !key.empty); + return this->value == key.value; +} + +template<class T> +bool Key<T>::operator==(const T& key) const { + assert(!empty); + return this->value == key; +} + +template<class T> +bool Key<T>::operator!=(const Key<T>& key) const { + assert(!empty && !key.empty); + return this->value != key.value; +} + +template<class T> +bool Key<T>::operator!=(const T& key) const { + assert(!empty); + return this->value != key; +} + #endif diff --git a/tp5/TableDeHachage/src/main.cpp b/tp5/TableDeHachage/src/main.cpp index 281b0db..012ff90 100644 --- a/tp5/TableDeHachage/src/main.cpp +++ b/tp5/TableDeHachage/src/main.cpp @@ -26,10 +26,15 @@ int main() { t.add(2, std::string("mew")); t.add(9, std::string("nine")); + t.show(true); + + std::cout << "Info of 9: " << t[9] << std::endl; + + t.remove(2); t.show(); - InfoString s = t.find(9); - std::cout << "Info of 9: " << s << std::endl; + t.add(2, std::string("tata")); + t.show(); return 0; } diff --git a/tp5/TableDeHachage/src/table.h b/tp5/TableDeHachage/src/table.h index 97035dd..d381173 100644 --- a/tp5/TableDeHachage/src/table.h +++ b/tp5/TableDeHachage/src/table.h @@ -8,6 +8,7 @@ template<class K, class I> class Table; +//====================== Case =========================== template<class K, class I> class Case { friend class Table<K,I>; @@ -25,8 +26,17 @@ class Case { Info<I> get_info() const { return info; } bool isFree() const { return free; } + + void draw() const { + if(!free) { + unsigned int try_count = key.get_try_count(); + std::cout << key << " âµ " << info; + std::cout << " (" << try_count << (try_count==1 ? " try" : " tries") << ")" << std::endl; + } + } }; +// ======================== Table ========================== template<class K, class I> class Table { private: @@ -52,10 +62,17 @@ class Table { void add(const Key<K>& key, const Info<I>& info); void add(const Key<K>& key, const I& info); - Info<I> find(const K& key) const; - Info<I> find(const Key<K>& key) const; + Info<I> get_info(const K& key) const; + Info<I> get_info(const Key<K>& key) const; + + unsigned int find(const K& key) const; + unsigned int find(const Key<K>& key) const; - void show() const; + void remove(const K& key); + + Info<I> operator[](const K& key) const; + + void show(bool extra=false) const; }; @@ -77,7 +94,7 @@ void Table<K,I>::add (const K& key, const I& info) { unsigned int hash_code = hash(key, max_elements); if(!elements[hash_code].free) - assert(elements[hash_code].key.get() != key); + assert(elements[hash_code].key != key); unsigned int try_nb = 1; @@ -107,21 +124,18 @@ template<class K, class I> void Table<K,I>::add (const Key<K>& key, const I& info) { this->add(key.get(),info); } template<class K, class I> -void Table<K,I>::show () const { - std::cout << "Maximum elements: " << max_elements << std::endl; - std::cout << "Elements stored: " << nb_elements << std::endl; +void Table<K,I>::show (bool extra) const { + if (extra) { + std::cout << "Maximum elements: " << max_elements << std::endl; + std::cout << "Elements stored: " << nb_elements << std::endl; + } + std::cout << "========== Table State ========== \n"; + std::cout << "#INDEX KEY âµ INFO\n"; for(unsigned int i=0; i<max_elements; ++i) { - if(!elements[i].free) { - std::cout << "[" << elements[i].key << "->"; - std::cout << elements[i].info << "]"; - // std::cout << elements[i].info << "->"; - // std::cout << elements[i].key.get_try_count() << "]"; - } - else std::cout << "[ ]"; - - if (i==max_elements-1) std::cout << std::endl; - else std::cout << " "; + if(!elements[i].free) std::cout << "#" << i << " "; + elements[i].draw(); } + std::cout << "================================= \n"; } template<class K, class I> @@ -131,18 +145,38 @@ template<class K, class I> void Table<K,I>::set_rehash(unsigned int (*rehash)(const K&, unsigned int)) { this->rehash = rehash; } template<class K, class I> -Info<I> Table<K,I>::find(const K& key) const { +Info<I> Table<K,I>::get_info(const K& key) const { + unsigned int index = find(key); + return elements[index].info; +} + +template<class K, class I> +Info<I> Table<K,I>::get_info(const Key<K>& key) const { return get_info(key.get()); } + +template<class K, class I> +unsigned int Table<K,I>::find(const K& key) const { unsigned int index = hash(key, max_elements); assert(!elements[index].free); - while (elements[index].key.get() != key) + while (elements[index].key != key) index += rehash(key, max_elements); - return elements[index].info; + return index; +} + +template<class K, class I> +unsigned int Table<K,I>::find(const Key<K>& key) const { return find(key.get()); } + +template<class K, class I> +void Table<K,I>::remove(const K& key) { + unsigned int index = find(key); + + elements[index].free = true; + --nb_elements; } template<class K, class I> -Info<I> Table<K,I>::find(const Key<K>& key) const { return find(key.get()); } +Info<I> Table<K,I>::operator[](const K& key) const { return get_info(key); } #endif \ No newline at end of file -- GitLab From b753201d34e0442ad0655200c91f08afb3dc31b9 Mon Sep 17 00:00:00 2001 From: Eldar <eldar.kasmamytov@gmail.com> Date: Tue, 3 Nov 2020 16:27:17 +0100 Subject: [PATCH 20/23] Improved Draw Function --- tp5/TableDeHachage/src/main.cpp | 3 +++ tp5/TableDeHachage/src/table.h | 15 +++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/tp5/TableDeHachage/src/main.cpp b/tp5/TableDeHachage/src/main.cpp index 012ff90..099721b 100644 --- a/tp5/TableDeHachage/src/main.cpp +++ b/tp5/TableDeHachage/src/main.cpp @@ -36,5 +36,8 @@ int main() { t.add(2, std::string("tata")); t.show(); + t.set_info(9, "domik"); + t.show(); + return 0; } diff --git a/tp5/TableDeHachage/src/table.h b/tp5/TableDeHachage/src/table.h index d381173..5e73ab9 100644 --- a/tp5/TableDeHachage/src/table.h +++ b/tp5/TableDeHachage/src/table.h @@ -65,6 +65,9 @@ class Table { Info<I> get_info(const K& key) const; Info<I> get_info(const Key<K>& key) const; + void set_info(const K& key, const I& info); + void set_info(const Key<K>& key, const Info<I>& info); + unsigned int find(const K& key) const; unsigned int find(const Key<K>& key) const; @@ -179,4 +182,16 @@ void Table<K,I>::remove(const K& key) { template<class K, class I> Info<I> Table<K,I>::operator[](const K& key) const { return get_info(key); } +template<class K, class I> +void Table<K,I>::set_info(const K& key, const I& info) { + unsigned int index = find(key); + elements[index].info = info; +} + +template<class K, class I> +void Table<K,I>::set_info(const Key<K>& key, const Info<I>& info) { + unsigned int index = find(key); + elements[index].info = info; +} + #endif \ No newline at end of file -- GitLab From 3088f6e20f1d811f2cde59efa2b313b414c014db Mon Sep 17 00:00:00 2001 From: Eldar <eldar.kasmamytov@gmail.com> Date: Tue, 3 Nov 2020 16:37:34 +0100 Subject: [PATCH 21/23] Devided Case into definition and implementation - removed useless .cpp files --- tp5/TableDeHachage/makefile | 8 +---- tp5/TableDeHachage/src/info.cpp | 1 - tp5/TableDeHachage/src/main.cpp | 2 +- tp5/TableDeHachage/src/table.cpp | 50 -------------------------------- tp5/TableDeHachage/src/table.h | 50 +++++++++++++++++++++++--------- 5 files changed, 38 insertions(+), 73 deletions(-) delete mode 100644 tp5/TableDeHachage/src/info.cpp delete mode 100644 tp5/TableDeHachage/src/table.cpp diff --git a/tp5/TableDeHachage/makefile b/tp5/TableDeHachage/makefile index edb678d..e751cf3 100644 --- a/tp5/TableDeHachage/makefile +++ b/tp5/TableDeHachage/makefile @@ -1,17 +1,11 @@ all: bin/executable.out -bin/executable.out: obj/main.o obj/table.o obj/info.o +bin/executable.out: obj/main.o g++ -Wall -g obj/main.o obj/table.o obj/info.o -o bin/executable.out obj/main.o: src/main.cpp src/table.h src/key.h src/info.h g++ -Wall -g -c src/main.cpp -o obj/main.o -obj/table.o: src/table.h src/table.cpp src/key.h src/info.h - g++ -Wall -g -c src/table.cpp -o obj/table.o - -obj/info.o: src/info.h src/info.cpp - g++ -Wall -g -c src/info.cpp -o obj/info.o - clean: rm obj/* diff --git a/tp5/TableDeHachage/src/info.cpp b/tp5/TableDeHachage/src/info.cpp deleted file mode 100644 index 4132463..0000000 --- a/tp5/TableDeHachage/src/info.cpp +++ /dev/null @@ -1 +0,0 @@ -#include "info.h" \ No newline at end of file diff --git a/tp5/TableDeHachage/src/main.cpp b/tp5/TableDeHachage/src/main.cpp index 099721b..d940f23 100644 --- a/tp5/TableDeHachage/src/main.cpp +++ b/tp5/TableDeHachage/src/main.cpp @@ -36,7 +36,7 @@ int main() { t.add(2, std::string("tata")); t.show(); - t.set_info(9, "domik"); + t.set_info(9, "dom"); t.show(); return 0; diff --git a/tp5/TableDeHachage/src/table.cpp b/tp5/TableDeHachage/src/table.cpp deleted file mode 100644 index e042f47..0000000 --- a/tp5/TableDeHachage/src/table.cpp +++ /dev/null @@ -1,50 +0,0 @@ -// #include "table.h" -// #include <iostream> - -// unsigned int Table::hash_modulo (const Key& k, unsigned int size) { return k % size; } - -// unsigned int Table::rehash_linear (const Key& k, unsigned int try_nb) { return 1; } - -// Table::Table (unsigned int size, unsigned int (*hash)(const Key&, unsigned int)) -// : max_elements(size), nb_elements(0), hash(hash) { -// elements = new Case[size]; -// rehash = rehash_linear; -// } - -// Table::~Table () { delete [] elements; } - -// void Table::add (const Key& key) { -// assert(nb_elements < max_elements); - -// unsigned int hash_code = hash(key, max_elements); -// unsigned int try_nb = 1; - -// while(!elements[hash_code].free) { -// hash_code += rehash(key, try_nb++); -// if(hash_code >= max_elements) { -// hash_code = hash_code % max_elements; -// } -// } - -// if (elements[hash_code].free) { -// elements[hash_code].key = key; -// elements[hash_code].free = false; -// ++nb_elements; -// } -// } - -// void Table::show () const { -// std::cout << "Maximum elements: " << max_elements << std::endl; -// std::cout << "Elements stored: " << nb_elements << std::endl; -// for(unsigned int i=0; i<max_elements; ++i) { -// if(!elements[i].free) std::cout << "[" << elements[i].key << "]"; -// else std::cout << "[ ]"; - -// if (i==max_elements-1) std::cout << std::endl; -// else std::cout << " "; -// } -// } - -// void Table::set_hash(unsigned int (*hash)(const Key&, unsigned int)) { this->hash = hash; } - -// void Table::set_rehash(unsigned int (*rehash)(const Key&, unsigned int)) { this->rehash = rehash; } \ No newline at end of file diff --git a/tp5/TableDeHachage/src/table.h b/tp5/TableDeHachage/src/table.h index 5e73ab9..64091e9 100644 --- a/tp5/TableDeHachage/src/table.h +++ b/tp5/TableDeHachage/src/table.h @@ -8,7 +8,7 @@ template<class K, class I> class Table; -//====================== Case =========================== +//====================== Case Definition =========================== template<class K, class I> class Case { friend class Table<K,I>; @@ -19,24 +19,45 @@ class Case { bool free; public: - Case() : free(true) {} - Case(const Key<K>& k) : key(k), free(false) {} + Case(); + Case(const Key<K>& k); - Key<K> get_key() const { return key; } - Info<I> get_info() const { return info; } + Key<K> get_key() const; + Info<I> get_info() const; - bool isFree() const { return free; } + bool isFree() const; - void draw() const { - if(!free) { - unsigned int try_count = key.get_try_count(); - std::cout << key << " âµ " << info; - std::cout << " (" << try_count << (try_count==1 ? " try" : " tries") << ")" << std::endl; - } - } + void draw() const; }; -// ======================== Table ========================== +//====================== Case Implementation =========================== +template<class K, class I> +Case<K,I>::Case() : free(true) {} + +template<class K, class I> +Case<K,I>::Case(const Key<K>& k) : key(k), free(false) {} + +template<class K, class I> +Key<K> Case<K,I>::get_key() const { return key; } + +template<class K, class I> +Info<I> Case<K,I>::get_info() const { return info; } + +template<class K, class I> +bool Case<K,I>::isFree() const { return free; } + +template<class K, class I> +void Case<K,I>::draw() const { + if(!free) { + unsigned int try_count = key.get_try_count(); + std::cout << key << " âµ " << info; + std::cout << " (" << try_count << (try_count==1 ? " try" : " tries") << ")" << std::endl; + } +} + + + +// ======================== Table Definition ========================== template<class K, class I> class Table { private: @@ -79,6 +100,7 @@ class Table { }; +// ======================== Table Implementation ========================== template<class K, class I> Table<K,I>::Table (unsigned int size, unsigned int (*hash)(const K&, unsigned int), -- GitLab From 70aea25892504ecaa81a07490b9404763ee57775 Mon Sep 17 00:00:00 2001 From: Eldar <eldar.kasmamytov@gmail.com> Date: Tue, 3 Nov 2020 16:40:27 +0100 Subject: [PATCH 22/23] Fixed Makefile - compilation wasn't working because deleted info.o table.o files --- tp5/TableDeHachage/makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tp5/TableDeHachage/makefile b/tp5/TableDeHachage/makefile index e751cf3..0c520f8 100644 --- a/tp5/TableDeHachage/makefile +++ b/tp5/TableDeHachage/makefile @@ -1,7 +1,7 @@ all: bin/executable.out bin/executable.out: obj/main.o - g++ -Wall -g obj/main.o obj/table.o obj/info.o -o bin/executable.out + g++ -Wall -g obj/main.o -o bin/executable.out obj/main.o: src/main.cpp src/table.h src/key.h src/info.h g++ -Wall -g -c src/main.cpp -o obj/main.o -- GitLab From a16308f2cced3c2cc6b97b18624ef8533f612873 Mon Sep 17 00:00:00 2001 From: Eldar <eldar.kasmamytov@gmail.com> Date: Tue, 3 Nov 2020 17:36:19 +0100 Subject: [PATCH 23/23] Added Documentation - Comments in header files --- tp5/TableDeHachage/src/info.h | 27 ++++++++++++++++++-- tp5/TableDeHachage/src/key.h | 35 ++++++++++++++++++++++++-- tp5/TableDeHachage/src/table.h | 45 +++++++++++++++++++++++++++++++--- 3 files changed, 100 insertions(+), 7 deletions(-) diff --git a/tp5/TableDeHachage/src/info.h b/tp5/TableDeHachage/src/info.h index cbe92f9..a759ec0 100644 --- a/tp5/TableDeHachage/src/info.h +++ b/tp5/TableDeHachage/src/info.h @@ -1,44 +1,67 @@ +// Eldar Kasmamytov + #ifndef _INFO #define _INFO #include <iostream> #include <assert.h> +// Attention! +// La definition et l'implementation des classes sont dans le meme fichier, +// car ce sont des classes TEMPLATE, en consequence on peut pas diviser +// le definition et l'implementation en deux fichiers. + +//====================== Info Definition =========================== template<class T> class Info { private: T value; - bool empty; + bool empty; // Indique si 'value' est vide ou pas public: + // Constructeurs Info(); Info(const T& value); + // Resultat: L'information stockee dans la variable 'value' de la classe. T get() const; + + // Postcondition: L'information est initialisee ou mise a jour par la valeur 'value'. void set(const T& value); + // Resultat: True si l'Info ne contient pas de valeur, + // False sinon. bool isEmpty() const; - Info<T>& operator=(const Info<T>& info); + // Resultat: Retourne l'Info affectee. + // Postcondition: L'information est initialisee ou mise a jour par la valeur 'info'. Info<T>& operator=(const T& info); + Info<T>& operator=(const Info<T>& info); + // Resultat: True si l'information des deux Infos est identique, + // False sinon. bool operator==(const Info<T>& info) const; bool operator==(const T& info) const; + // Resultat: True si les informations des deux Infos ne sont pas identiques, + // False sinon. bool operator!=(const Info<T>& info) const; bool operator!=(const T& info) const; + // Surcharhe de l'operateur '<<' friend std::ostream& operator<<(std::ostream& output, const Info<T>& i) { output << i.value; return output; } + // Surcharhe de l'operateur '>>' friend std::istream& operator>>(std::istream& input, Info<T>& i) { input >> i.value; return input; } }; +//====================== Info Implementation =========================== template<class T> Info<T>::Info() : empty(true) {} diff --git a/tp5/TableDeHachage/src/key.h b/tp5/TableDeHachage/src/key.h index f4464a0..f878ea4 100644 --- a/tp5/TableDeHachage/src/key.h +++ b/tp5/TableDeHachage/src/key.h @@ -1,50 +1,81 @@ +// Eldar Kasmamytov + #ifndef _KEY #define _KEY #include <iostream> +// Attention! +// La definition et l'implementation des classes sont dans le meme fichier, +// car ce sont des classes TEMPLATE, en consequence on peut pas diviser +// le definition et l'implementation en deux fichiers. + +//====================== Key Definition =========================== template<class T> class Key { private: T value; - bool empty; - unsigned int try_count; + bool empty; // Indique si 'value' est vide ou pas + unsigned int try_count; // Le nombre d'essais lors de l'insertion (0 a la declaration) public: + // Constructeurs Key(); Key(const T& value); + // Resultat: La cle stockee dans la variable 'value' de la classe. T get() const; + + // Postcondition: La cle est initialisee ou mise a jour par la valeur 'value'. void set(const T& value); + // Resultat: True si la cle Key ne contient pas de valeur, + // False sinon. bool isEmpty() const; + // Resultat: Retourne la cle Key affectee. + // Postcondition: La cle est initialisee ou mise a jour par la valeur 'key'. Key<T>& operator=(const Key<T>& key); Key<T>& operator=(const T& key); + // Resultat: True si les clefs des deux Key sont identiques, + // False sinon. bool operator==(const Key<T>& key) const; bool operator==(const T& key) const; + // Resultat: True si les clefs des deux Key ne sont pas identiques, + // False sinon. bool operator!=(const Key<T>& key) const; bool operator!=(const T& key) const; + // Resultat: Le nombre d'essais d'insertion unsigned int get_try_count() const; + + // Postcondition: Le nombre d'essais d'insertion et mis a jour par 'nb' void set_try_count(unsigned int nb); + // Fonction de hachage pour 'k' de type nombre + // Resultat: Retourne le reste de la division de 'size' par 'k' static unsigned int hash_modulo (const T& k, unsigned int size); + + // Fonction de rehachage pour 'k' de type nombre + // Resultat: Retourne 1, que l'on apres va ajouter a l'index static unsigned int rehash_linear (const T& k, unsigned int try_nb); + // Surcharhe de l'operateur '<<' friend std::ostream& operator<<(std::ostream& output, const Key<T>& k) { output << k.value; return output; } + // Surcharhe de l'operateur '>>' friend std::istream& operator>>(std::istream& input, Key<T>& k) { input >> k.value; return input; } }; +//====================== Key Implementation =========================== template<class T> Key<T>::Key() : empty(true), try_count(0) {} diff --git a/tp5/TableDeHachage/src/table.h b/tp5/TableDeHachage/src/table.h index 64091e9..cd72b4e 100644 --- a/tp5/TableDeHachage/src/table.h +++ b/tp5/TableDeHachage/src/table.h @@ -1,3 +1,5 @@ +// Eldar Kasmamytov + #ifndef _TABLE #define _TABLE @@ -5,6 +7,11 @@ #include "key.h" #include "info.h" +// Attention! +// La definition et l'implementation des classes sont dans le meme fichier, +// car ce sont des classes TEMPLATE, en consequence on peut pas diviser +// le definition et l'implementation en deux fichiers. + template<class K, class I> class Table; @@ -16,17 +23,23 @@ class Case { private: Key<K> key; Info<I> info; - bool free; + bool free; // Indique si la case est libre ou pas public: Case(); Case(const Key<K>& k); + // Resultat: cle contenue dans la case. Key<K> get_key() const; + + // Resultat: info contenu dans la case. Info<I> get_info() const; + // Resultat: True si la case est libre, + // False sinon. bool isFree() const; + // Postcondition: L'etat interne de la case est affiche dans le terminal. void draw() const; }; @@ -63,39 +76,65 @@ class Table { private: Case<K,I>* elements; - unsigned int max_elements; - unsigned int nb_elements; + unsigned int max_elements; // Le nombre maximum d'elements qu'on peut inserer (taille de la Table) + unsigned int nb_elements; // Le nombre effectif d'elements presents dans la Table unsigned int (*hash)(const K&, unsigned int); unsigned int (*rehash)(const K&, unsigned int); public: + // Preconditions: * size=taille de la Table a creer + // * hash=pointeur vers la fonction de hachage + // (Key<K>::hash_modulo par defaut) + // * rehash=pointeur vers la fonction de rehachage + // (Key<K>::rehash_linear par defaut) Table(unsigned int size, unsigned int (*hash)(const K&, unsigned int)=Key<K>::hash_modulo, unsigned int (*rehash)(const K&, unsigned int)=Key<K>::rehash_linear); ~Table(); + // Preconditions: hash=pointeur vers la fonction de hachage + // Postcondition: hash est affecte a la donnee membre hash void set_hash(unsigned int (*hash)(const K&, unsigned int)); + + // Preconditions: rehash=pointeur vers la fonction de rehachage + // Postcondition: rehash est affecte a la donnee membre rehash void set_rehash(unsigned int (*rehash)(const K&, unsigned int)); + // Preconditions: * La taille effective de la Table doit etre inferieure + // a la taille maximale, + // sinon le reste du code n'est pas execute (assert) + // * Key doit etre unique, + // sinon le reste du code n'est pas execute (assert) + // Postcondition: 'key' et 'info' sont inseres dans la case, dont + // l'indexe est calcule par la fonction 'hash' void add(const K& key, const I& info); void add(const K& key, const Info<I>& info); void add(const Key<K>& key, const Info<I>& info); void add(const Key<K>& key, const I& info); + // Resultat: L'information associee a la cle 'key' Info<I> get_info(const K& key) const; Info<I> get_info(const Key<K>& key) const; + // Postcondition: L'information associee a la cle 'key' + // est mise a jour avec 'info' void set_info(const K& key, const I& info); void set_info(const Key<K>& key, const Info<I>& info); + // Resultat: L'indexe de la case, dont la cle est identique a 'key' unsigned int find(const K& key) const; unsigned int find(const Key<K>& key) const; + // Postcondition: La case dont la cle est 'key' + // est liberee void remove(const K& key); + // Resultat: L'information associee a la cle 'key' Info<I> operator[](const K& key) const; + // Preconditions: extra=afficher ou pas l'information supplementaire + // Postcondition: L'etat interne de la Table est affiche dans la console void show(bool extra=false) const; }; -- GitLab