From 5bc937cf119ba5ca66fb6460ead86f55bbaf8a27 Mon Sep 17 00:00:00 2001
From: Florian Burgener <florian.burgener@etu.hesge.ch>
Date: Tue, 3 May 2022 15:54:29 +0200
Subject: [PATCH] Validation exercice 5

---
 ex5/ex5.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/ex5/ex5.c b/ex5/ex5.c
index b06d07c..3bc9967 100644
--- a/ex5/ex5.c
+++ b/ex5/ex5.c
@@ -201,6 +201,12 @@ Matrix *quadtree_to_matrix(Node *root) {
 
 // ---
 
+/**
+ * @brief Looks for the greatest value in all the quadtree.
+ * 
+ * @param root 
+ * @return int 
+ */
 int quadtree_max(Node *root) {
     if (quadtree_is_leaf(root)) {
         return root->data;
@@ -214,6 +220,13 @@ int quadtree_max(Node *root) {
     return max_value;
 }
 
+/**
+ * @brief Follows the indicated path, deletes the subtree and initializes the node data to the max of the subtree.
+ * 
+ * @param root 
+ * @param indices 
+ * @param indices_length 
+ */
 void transform(Node *root, int *indices, int indices_length) {
     for (int i = 0; i < indices_length; i += 1) {
         root = root->children[indices[i]];
-- 
GitLab