private void UpdateLower(int divider, int offset, IntegerMapOffsetType type) { if (LowerNode == null) { LowerNode = new IntegerMapNode(); } LowerNode.Update(divider, offset, type); if (type == IntegerMapOffsetType.GreaterThanOrEqualToDivider) { AddToUpper(offset); } }
private void UpdateUpper(int divider, int offset, IntegerMapOffsetType type) { if (UpperNode == null) { UpperNode = new IntegerMapNode(); } UpperNode.Update(divider, offset, type); if (type == IntegerMapOffsetType.LessThanDivider) { AddToLower(offset); } }
private void AddToLower(int offset) { if (LowerNode == null) { LowerNode = new IntegerMapNode() { Offset = offset } } ; else { LowerNode.Offset += offset; LowerNode = LowerNode.Reduce(); } }
private void AddToUpper(int offset) { if (UpperNode == null) { UpperNode = new IntegerMapNode() { Offset = offset } } ; else { UpperNode.Offset += offset; UpperNode = UpperNode.Reduce(); } }