Exemple #1
0
 private ImmutableTree(int hash, TValue value)
 {
     this.storedHash  = hash;
     this.leftNode    = Empty;
     this.rightNode   = Empty;
     this.storedValue = value;
     this.IsEmpty     = false;
     this.height      = 1;
 }
Exemple #2
0
 private ImmutableTree(int hash, TValue value, ImmutableTree <TValue> left, ImmutableTree <TValue> right)
 {
     this.storedHash  = hash;
     this.leftNode    = left;
     this.rightNode   = right;
     this.storedValue = value;
     this.IsEmpty     = false;
     this.height      = 1 + (left.height > right.height ? left.height : right.height);
 }