@Override public int compareSerialized(DataInputView firstSource, DataInputView secondSource) throws IOException { double l1 = firstSource.readDouble(); double l2 = secondSource.readDouble(); int comp = (l1 < l2 ? -1 : (l1 > l2 ? 1 : 0)); return ascendingComparison ? comp : -comp; }
@Override public Double deserialize(DataInputView source) throws IOException { return source.readDouble(); }
@Override public void read(DataInputView in) throws IOException { this.value = in.readDouble(); }
@Override public double[] deserialize(DataInputView source) throws IOException { final int len = source.readInt(); double[] result = new double[len]; for (int i = 0; i < len; i++) { result[i] = source.readDouble(); } return result; }
@Override public void read(DataInputView in) throws IOException { this.value = in.readDouble(); }
@Override public void copy(DataInputView source, DataOutputView target) throws IOException { target.writeDouble(source.readDouble()); }
@Override public void copy(DataInputView source, DataOutputView target) throws IOException { target.writeDouble(source.readDouble()); }
@Override public int compareSerialized(DataInputView firstSource, DataInputView secondSource) throws IOException { int firstCount = firstSource.readInt(); int secondCount = secondSource.readInt(); int minCount = Math.min(firstCount, secondCount); while (minCount-- > 0) { double firstValue = firstSource.readDouble(); double secondValue = secondSource.readDouble(); int cmp = Double.compare(firstValue, secondValue); if (cmp != 0) { return ascendingComparison ? cmp : -cmp; } } int cmp = Integer.compare(firstCount, secondCount); return ascendingComparison ? cmp : -cmp; }
@Override public void read(DataInputView in) throws IOException { position = in.readInt(); mark = 0; ensureCapacity(position); for (int i = 0; i < position; i++) { data[i] = in.readDouble(); } }
@Override public void read(DataInputView in) throws IOException { int length = in.readInt(); this.coordinates = new double[length]; for (int i = 0; i < length; i++) { this.coordinates[i] = in.readDouble(); } }
@Override public void read(DataInputView in) throws IOException { diff = in.readDouble(); rank = in.readDouble(); danglingRank = in.readDouble(); numDanglingVertices = in.readLong(); numVertices = in.readLong(); edges = in.readLong(); }
break; case TYPE_DOUBLE: value = in.readDouble(); break; case TYPE_BOOLEAN:
@Override public int compareSerialized(DataInputView firstSource, DataInputView secondSource) throws IOException { double l1 = firstSource.readDouble(); double l2 = secondSource.readDouble(); int comp = (l1 < l2 ? -1 : (l1 > l2 ? 1 : 0)); return ascendingComparison ? comp : -comp; }
@Override public int compareSerialized(DataInputView firstSource, DataInputView secondSource) throws IOException { double l1 = firstSource.readDouble(); double l2 = secondSource.readDouble(); int comp = (l1 < l2 ? -1 : (l1 > l2 ? 1 : 0)); return ascendingComparison ? comp : -comp; }
@Override public double[] deserialize(DataInputView source) throws IOException { final int len = source.readInt(); double[] result = new double[len]; for (int i = 0; i < len; i++) { result[i] = source.readDouble(); } return result; }
@Override public void read(DataInputView in) throws IOException { position = in.readInt(); mark = 0; ensureCapacity(position); for (int i = 0; i < position; i++) { data[i] = in.readDouble(); } }
private static MetricDump.MeterDump deserializeMeter(DataInputView dis) throws IOException { QueryScopeInfo info = deserializeMetricInfo(dis); String name = dis.readUTF(); double rate = dis.readDouble(); return new MetricDump.MeterDump(info, name, rate); }
private static MetricDump.MeterDump deserializeMeter(DataInputView dis) throws IOException { QueryScopeInfo info = deserializeMetricInfo(dis); String name = dis.readUTF(); double rate = dis.readDouble(); return new MetricDump.MeterDump(info, name, rate); }
private static MetricDump.MeterDump deserializeMeter(DataInputView dis) throws IOException { QueryScopeInfo info = deserializeMetricInfo(dis); String name = dis.readUTF(); double rate = dis.readDouble(); return new MetricDump.MeterDump(info, name, rate); }
private static MetricDump.MeterDump deserializeMeter(DataInputView dis) throws IOException { QueryScopeInfo info = deserializeMetricInfo(dis); String name = dis.readUTF(); double rate = dis.readDouble(); return new MetricDump.MeterDump(info, name, rate); }