Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • main
1 result

Target

Select target project
  • florian.burgener/controle-c-003
1 result
Select Git revision
  • main
1 result
Show changes
Commits on Source (2)
......@@ -202,7 +202,7 @@ Matrix *quadtree_to_matrix(Node *root) {
// ---
/**
* @brief Clone a Quadtree.
* @brief Clone a quadtree.
*
* @param root
* @return Node*
......
......@@ -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]];
......