@Override public double readDouble() throws IOException { try { return input.readDouble(); } catch (KryoException e) { throw new IOException(e); } }
@Override public double readDouble() throws IOException { try { return input.readDouble(); } catch (KryoException e) { throw new IOException(e); } }
@Override public PyFloat read(Kryo kryo, Input input, Class<PyFloat> type) { return new PyFloat(input.readDouble()); } }
@Override public PercentileCounter read(Kryo kryo, Input input, Class type) { double compression = input.readDouble(); double quantileRatio = input.readDouble(); int length = input.readInt(); byte[] buffer = new byte[length]; input.read(buffer); PercentileCounter counter = new PercentileCounter(compression, quantileRatio); counter.readRegisters(ByteBuffer.wrap(buffer)); return counter; } }
@Override public double readDouble() { return unshadedInput.readDouble(); }
@Override public void read(Kryo kryo, Input input) { int digestSize = input.readInt(); byte[] digestBytes = input.readBytes(digestSize); ByteBuffer digestBuff = ByteBuffer.wrap(digestBytes); digest = AVLTreeDigest.fromBytes(digestBuff); n = input.readLong(); sum = input.readDouble(); sumOfSquares = input.readDouble(); sumOfLogs = input.readDouble(); min = input.readDouble(); max = input.readDouble(); M1 = input.readDouble(); M2 = input.readDouble(); M3 = input.readDouble(); M4 = input.readDouble(); } }
/** Bulk input of a double array. */ public double[] readDoubles (int length) throws KryoException { double[] array = new double[length]; for (int i = 0; i < length; i++) array[i] = readDouble(); return array; } }
/** Bulk input of a double array. */ public double[] readDoubles (int length) throws KryoException { double[] array = new double[length]; for (int i = 0; i < length; i++) array[i] = readDouble(); return array; } }
@Override public double readDouble() throws IOException { try { return input.readDouble(); } catch (KryoException e) { throw new IOException(e); } }
public double readDouble() throws IOException { try { return input.readDouble(); } catch (KryoException e) { throw new IOException(e); } }
public void read (Input input, Object object) { try { field.setDouble(object, input.readDouble()); } catch (Exception e) { KryoException ex = new KryoException(e); ex.addTrace(this + " (" + type.getName() + ")"); throw ex; } }
public void read (Input input, Object object) { try { field.setDouble(object, input.readDouble()); } catch (Exception e) { KryoException ex = new KryoException(e); ex.addTrace(this + " (" + type.getName() + ")"); throw ex; } }
public OptionalDouble read (Kryo kryo, Input input, Class<OptionalDouble> type) { boolean present = input.readBoolean(); return present ? OptionalDouble.of(input.readDouble()) : OptionalDouble.empty(); } }
public OptionalDouble read (Kryo kryo, Input input, Class<OptionalDouble> type) { boolean present = input.readBoolean(); return present ? OptionalDouble.of(input.readDouble()) : OptionalDouble.empty(); } }
@Override public ComputeContentEvent read(Kryo kryo, Input input, Class<ComputeContentEvent> type) { long splitId = input.readLong(true); long learningNodeId = input.readLong(true); int dataLength = input.readInt(true); double[] preSplitDist = new double[dataLength]; for(int i = 0; i < dataLength; i++){ preSplitDist[i] = input.readDouble(); } return new ComputeContentEvent(splitId, learningNodeId, preSplitDist); }
@Override public ComputeContentEvent read(Kryo kryo, Input input, Class<ComputeContentEvent> type) { long splitId = input.readLong(true); long learningNodeId = input.readLong(true); int dataLength = input.readInt(true); double[] preSplitDist = new double[dataLength]; for (int i = 0; i < dataLength; i++) { preSplitDist[i] = input.readDouble(); } return new ComputeContentEvent(splitId, learningNodeId, preSplitDist); }
@Override public ComputeContentEvent read(Kryo kryo, Input input, Class<ComputeContentEvent> type) { long splitId = input.readLong(true); long learningNodeId = input.readLong(true); int dataLength = input.readInt(true); double[] preSplitDist = new double[dataLength]; for(int i = 0; i < dataLength; i++){ preSplitDist[i] = input.readDouble(); } return new ComputeContentEvent(splitId, learningNodeId, preSplitDist); }
@Override public AttributeContentEvent read(Kryo kryo, Input input, Class<AttributeContentEvent> type) { AttributeContentEvent ace = new AttributeContentEvent.Builder(input.readLong(true), input.readInt(true)) .attrValue(input.readDouble()) .classValue(input.readInt(true)) .weight(input.readDouble()) .isNominal(input.readBoolean()) .build(); return ace; }
@Override public AttributeContentEvent read(Kryo kryo, Input input, Class<AttributeContentEvent> type) { AttributeContentEvent ace = new AttributeContentEvent.Builder(input.readLong(true), input.readInt(true)) .attrValue(input.readDouble()) .classValue(input.readInt(true)) .weight(input.readDouble()) .isNominal(input.readBoolean()) .build(); return ace; }
@Override public AttributeContentEvent read(Kryo kryo, Input input, Class<AttributeContentEvent> type) { AttributeContentEvent ace = new AttributeContentEvent.Builder(input.readLong(true), input.readInt(true)) .attrValue(input.readDouble(PRECISION, true)) .classValue(input.readInt(true)) .weight(input.readDouble(PRECISION, true)) .isNominal(input.readBoolean()) .build(); return ace; } }