Beispiel #1
0
 public override void set(int index, IScalar value)
 {
     if (value.getNumber() == null)
     {
         values[index] = (byte)0;
     }
     else
     {
         values[index] = value.getNumber().byteValue();
     }
 }
Beispiel #2
0
        public override int asof(IScalar value)
        {
            int target;

            try
            {
                target = value.getNumber().intValue();
            }
            catch (Exception ex)
            {
                throw ex;
            }

            int start = 0;
            int end   = values.Count - 1;
            int mid;

            while (start <= end)
            {
                mid = (start + end) / 2;
                if (values[mid] <= target)
                {
                    start = mid + 1;
                }
                else
                {
                    end = mid - 1;
                }
            }
            return(end);
        }
 public override void set(int index, IScalar value)
 {
     values[index] = value.getNumber().byteValue();
 }