com.esotericsoftware.kryo.io.Input.readDoubles()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(2.8k)|赞(0)|评价(0)|浏览(84)

本文整理了Java中com.esotericsoftware.kryo.io.Input.readDoubles()方法的一些代码示例,展示了Input.readDoubles()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Input.readDoubles()方法的具体详情如下:
包路径:com.esotericsoftware.kryo.io.Input
类名称:Input
方法名:readDoubles

Input.readDoubles介绍

[英]Bulk input of a double array.
[中]双数组的大容量输入。

代码示例

代码示例来源:origin: com.esotericsoftware/kryo

/** Bulk input of a double array. */
public double[] readDoubles (int length) throws KryoException {
  if (capacity - position >= length * 8 && isNativeOrder()) {
    double[] array = new double[length];
    DoubleBuffer buf = niobuffer.asDoubleBuffer();
    buf.get(array);
    position += length * 8;
    niobuffer.position(position);
    return array;
  } else
    return super.readDoubles(length);
}

代码示例来源:origin: com.esotericsoftware/kryo

public double[] read (Kryo kryo, Input input, Class<double[]> type) {
  int length = input.readVarInt(true);
  if (length == NULL) return null;
  return input.readDoubles(length - 1);
}

代码示例来源:origin: com.esotericsoftware.kryo/kryo

/** Bulk input of a double array. */
public double[] readDoubles (int length) throws KryoException {
  if (capacity - position >= length * 8 && isNativeOrder()) {
    double[] array = new double[length];
    DoubleBuffer buf = niobuffer.asDoubleBuffer();
    buf.get(array);
    position += length * 8;
    niobuffer.position(position);
    return array;
  } else
    return super.readDoubles(length);
}

代码示例来源:origin: com.esotericsoftware.kryo/kryo

public double[] read (Kryo kryo, Input input, Class<double[]> type) {
  int length = input.readVarInt(true);
  if (length == NULL) return null;
  return input.readDoubles(length-1);
}

代码示例来源:origin: svn2github/kryo

public double[] read (Kryo kryo, Input input, Class<double[]> type) {
  int length = input.readVarInt(true);
  if (length == NULL) return null;
  return input.readDoubles(length-1);
}

代码示例来源:origin: com.esotericsoftware/kryo-shaded

public double[] read (Kryo kryo, Input input, Class<double[]> type) {
  int length = input.readVarInt(true);
  if (length == NULL) return null;
  return input.readDoubles(length - 1);
}

代码示例来源:origin: com.esotericsoftware/kryo-shaded

/** Bulk input of a double array. */
public double[] readDoubles (int length) throws KryoException {
  if (capacity - position >= length * 8 && isNativeOrder()) {
    double[] array = new double[length];
    DoubleBuffer buf = niobuffer.asDoubleBuffer();
    buf.get(array);
    position += length * 8;
    niobuffer.position(position);
    return array;
  } else
    return super.readDoubles(length);
}

代码示例来源:origin: svn2github/kryo

/** Bulk input of a double array. */
public double[] readDoubles (int length) throws KryoException {
  if (capacity - position >= length * 8 && isNativeOrder()) {
    double[] array = new double[length];
    DoubleBuffer buf = niobuffer.asDoubleBuffer();
    buf.get(array);
    position += length * 8;
    niobuffer.position(position);
    return array;
  } else
    return super.readDoubles(length);
}

代码示例来源:origin: apache/apex-malhar

case "double":
 NDArray<double[]> doubleNDArray = new NDArray<>(
   input.readDoubles(singleDimensionArrayLength),signedFlag,dimensions);
 return doubleNDArray;
case "long":

相关文章

微信公众号

最新文章

更多