AIXI.CTWContextTreeFast.FreeSubtree C# (CSharp) Method

FreeSubtree() public method

public FreeSubtree ( int index ) : void
index int
return void
        public void FreeSubtree(int index)
        {
            //note:this do not check if this node truly exists
            this.FreeIndices.Enqueue(index);
            this.TreeSize--;
            if (this.Nodes[index].Child1 != -1) {
                this.FreeSubtree(this.Nodes[index].Child1);
            }
            if (this.Nodes[index].Child0 != -1)
            {
                this.FreeSubtree(this.Nodes[index].Child0);
            }
        }