예제 #1
0
        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);
            }
        }
예제 #2
0
        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);
            }
        }
예제 #3
0
 private void AddToLower(int offset)
 {
     if (LowerNode == null)
     {
         LowerNode = new IntegerMapNode()
         {
             Offset = offset
         }
     }
     ;
     else
     {
         LowerNode.Offset += offset;
         LowerNode         = LowerNode.Reduce();
     }
 }
예제 #4
0
 private void AddToUpper(int offset)
 {
     if (UpperNode == null)
     {
         UpperNode = new IntegerMapNode()
         {
             Offset = offset
         }
     }
     ;
     else
     {
         UpperNode.Offset += offset;
         UpperNode         = UpperNode.Reduce();
     }
 }