public override int CompareSerialized(IDataInputView firstSource, IDataInputView secondSource)
        {
            var l1   = firstSource.ReadDouble();
            var l2   = secondSource.ReadDouble();
            var comp = (l1 < l2 ? -1 : (l1 > l2 ? 1 : 0));

            return(AscendingComparison ? comp : -comp);
        }
        public override double[] Deserialize(IDataInputView source)
        {
            var len    = source.ReadInt();
            var result = new double[len];

            for (var i = 0; i < len; i++)
            {
                result[i] = source.ReadDouble();
            }

            return(result);
        }
예제 #3
0
 public override double Deserialize(IDataInputView source) => source.ReadDouble();
예제 #4
0
 public override void Copy(IDataInputView source, IDataOutputView target) => target.WriteDouble(source.ReadDouble());