AIXI.CTWContextTreeFast.SameNode C# (CSharp) Method

SameNode() public method

public SameNode ( int meI, CTWContextTreeNode he ) : bool
meI int
he CTWContextTreeNode
return bool
        public bool SameNode(int meI, CTWContextTreeNode he)
        {
            var me = this.Nodes[meI];

            return Utils.FloatCompare(me.LogProbability, he.LogProbability) &&
                Utils.FloatCompare(me.LogKt, he.LogKt) &&
                Utils.FloatCompare(me.NumberOf0S, he.NumberOf0S) &&
                Utils.FloatCompare(me.NumberOf1S, he.NumberOf1S) &&
                (me.Child1 != -1) == he.Children.ContainsKey(1) &&
                (me.Child0 != -1) == he.Children.ContainsKey(0);
        }