public CTWContextTreeFast(int depth)
{
this.Nodes = new CtNode[256];
this.FreeIndices = new Queue<int>();
Context = new List<int>();
//this.context.Capacity = this.depth * 2 + 1;
Debug.Assert(depth >= 0);
this.Depth = depth;
this.History = new List<int> ();
this.TreeSize = 1;
this.Multipliers = new double[2*this.CacheMultipliersBellow, this.CacheMultipliersBellow];
for (int sum = 0; sum < 2 * this.CacheMultipliersBellow; sum++)
{
for (int symbolCount = 0; symbolCount < this.CacheMultipliersBellow; symbolCount++)
{
double numerator = 0.5+symbolCount;
double denominator = sum+1;
this.Multipliers[sum, symbolCount] = Math.Log(numerator / denominator);
}
}
this.Clear();
}