@Override public int compare(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 compare(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(Double reuse, DataInputView source) throws IOException { return Double.valueOf(source.readDouble()); }
@Override public Double deserialize(Double reuse, DataInputView source) throws IOException { return Double.valueOf(source.readDouble()); }
@Override public void copy(DataInputView source, DataOutputView target) throws IOException { target.writeDouble(source.readDouble()); } }
@Override public double[] deserialize(double[] reuse, DataInputView source) throws IOException { final int len = source.readInt(); reuse = new double[len]; for (int i = 0; i < len; i++) { reuse[i] = source.readDouble(); } return reuse; }
@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 double[] deserialize(double[] reuse, DataInputView source) throws IOException { final int len = source.readInt(); reuse = new double[len]; for (int i = 0; i < len; i++) { reuse[i] = source.readDouble(); } return reuse; }
@Override public void copy(DataInputView source, DataOutputView target) throws IOException { target.writeDouble(source.readDouble()); } }
@Override public VertexWithRank deserialize(VertexWithRank target, DataInputView source) throws IOException { target.setVertexID(source.readLong()); target.setRank(source.readDouble()); return target; }
@Override public VertexWithRank readWithKeyDenormalization(VertexWithRank reuse, DataInputView source) throws IOException { reuse.setVertexID(source.readLong() + Long.MIN_VALUE); reuse.setRank(source.readDouble()); return reuse; }
@Override public VertexWithRankAndDangling readWithKeyDenormalization(VertexWithRankAndDangling reuse, DataInputView source) throws IOException { reuse.setVertexID(source.readLong() + Long.MIN_VALUE); reuse.setRank(source.readDouble()); reuse.setDangling(source.readBoolean()); return reuse; }
@Override public VertexWithRankAndDangling deserialize(VertexWithRankAndDangling target, DataInputView source) throws IOException { target.setVertexID(source.readLong()); target.setRank(source.readDouble()); target.setDangling(source.readBoolean()); return target; }