本文整理匯總了Java中com.esotericsoftware.kryo.io.Input.readDouble方法的典型用法代碼示例。如果您正苦於以下問題:Java Input.readDouble方法的具體用法?Java Input.readDouble怎麽用?Java Input.readDouble使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.esotericsoftware.kryo.io.Input
的用法示例。
在下文中一共展示了Input.readDouble方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: read
import com.esotericsoftware.kryo.io.Input; //導入方法依賴的package包/類
@Override
public SensorMeasurement read(Kryo kryo, Input input, Class<SensorMeasurement> clazz) {
int magicNumber = input.readInt();
assert (magicNumber == MAGIC_NUMBER);
boolean is2D = (input.readByte() == 0x01) ? true : false;
int coilId = input.readInt();
double x = input.readDouble();
double y = (is2D) ? input.readDouble() : 0;
int varId = input.readInt();
double value = input.readDouble();
if (is2D) {
return new SensorMeasurement2D(coilId, x, y, varId, value);
} else {
return new SensorMeasurement1D(coilId, x, varId, value);
}
}
示例2: read
import com.esotericsoftware.kryo.io.Input; //導入方法依賴的package包/類
public ArrayMetaData<double[]> read(Kryo kryo, Input input, Class<ArrayMetaData<double[]>> type) {
try {
double[] arrData = arrayMetaData.getArrData();
thatArrMetaData = arrayMetaData.recv(input);
int arrSegNum = thatArrMetaData.getSegNum();
for (int i = 0; i < arrSegNum; i++) {
int from = thatArrMetaData.getFrom(i);
int to = thatArrMetaData.getTo(i);
for (int j = from; j < to; j++) {
arrData[j] = input.readDouble();
}
}
thatArrMetaData.setArrData(arrData);
} catch (IOException e) {
LOG.error("double array read exception", e);
System.exit(1);
}
return thatArrMetaData;
}
示例3: read
import com.esotericsoftware.kryo.io.Input; //導入方法依賴的package包/類
@Override
public Summary read(Kryo kryo, Input input, Class<Summary> type) {
Summary summary = new Summary();
int len = input.readInt();
summary.value = new float[len];
for (int i = 0; i < len; i++) {
summary.value[i] = input.readFloat();
}
len = input.readInt();
summary.rmin = new double[len];
for (int i = 0; i < len; i++) {
summary.rmin[i] = input.readDouble();
}
len = input.readInt();
summary.rmax = new double[len];
for (int i = 0; i < len; i++) {
summary.rmax[i] = input.readDouble();
}
len = input.readInt();
summary.w = new float[len];
for (int i = 0; i < len; i++) {
summary.w[i] = input.readFloat();
}
summary.capacity = input.readInt();
summary.cursor = input.readInt();
summary.B = input.readDouble();
summary.exact = input.readBoolean();
summary.eps = input.readDouble();
summary.poolMap = new TreeMap<>();
PoolNode poolNode = summary.getPoolNode(summary.capacity);
return summary;
}