﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
4699	BaseAvlSet/Tree use O(n*log n) memory	Henning Kiel	somebody	"A rebalance causes nodes to be recreated though only the pointers need to be adapted, same holds for height value.
I propose to use arrays (or Mutable) to hold and update these values to have O(n) memory usage.

BaseAvlTree inherits from BaseAvlSet. Special care needs to be taken for its {{{map}}} and {{{mapFold}}} function.

{{{
record NODE
  Key key ""The key of the node."";
  array<Integer> height ""Height of tree, used for balancing"";
  array<Tree> subtrees ""Left+right subtrees."";
end NODE;

function left
  input Tree tree;
  output Tree = tree.subtrees[1];
end left;

function right
  input Tree tree;
  output Tree = tree.subtrees[2];
end right;
}}}"	enhancement	new	high		*unknown*	v1.13.0-dev-nightly			Martin Sjölund
