本文整理汇总了Java中org.apache.flink.core.memory.DataOutputView.writeDouble方法的典型用法代码示例。如果您正苦于以下问题:Java DataOutputView.writeDouble方法的具体用法?Java DataOutputView.writeDouble怎么用?Java DataOutputView.writeDouble使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.flink.core.memory.DataOutputView
的用法示例。
在下文中一共展示了DataOutputView.writeDouble方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: write
import org.apache.flink.core.memory.DataOutputView; //导入方法依赖的package包/类
@Override
public void write(DataOutputView out) throws IOException {
out.writeDouble(diff);
out.writeDouble(rank);
out.writeDouble(danglingRank);
out.writeLong(numDanglingVertices);
out.writeLong(numVertices);
out.writeLong(edges);
}
示例2: write
import org.apache.flink.core.memory.DataOutputView; //导入方法依赖的package包/类
@Override
public void write(DataOutputView out) throws IOException {
out.writeInt(this.coordinates.length);
for (int i = 0; i < this.coordinates.length; i++) {
out.writeDouble(this.coordinates[i]);
}
}
示例3: serialize
import org.apache.flink.core.memory.DataOutputView; //导入方法依赖的package包/类
@Override
public void serialize(double[] record, DataOutputView target) throws IOException {
if (record == null) {
throw new IllegalArgumentException("The record must not be null.");
}
final int len = record.length;
target.writeInt(len);
for (int i = 0; i < len; i++) {
target.writeDouble(record[i]);
}
}
示例4: write
import org.apache.flink.core.memory.DataOutputView; //导入方法依赖的package包/类
@Override
public void write(DataOutputView out) throws IOException {
out.writeInt(position);
for (int i = 0; i < position; i++) {
out.writeDouble(data[i]);
}
}
示例5: copy
import org.apache.flink.core.memory.DataOutputView; //导入方法依赖的package包/类
@Override
public void copy(DataInputView source, DataOutputView target) throws IOException {
target.writeDouble(source.readDouble());
}
示例6: serialize
import org.apache.flink.core.memory.DataOutputView; //导入方法依赖的package包/类
@Override
public void serialize(Double record, DataOutputView target) throws IOException {
target.writeDouble(record.doubleValue());
}
示例7: write
import org.apache.flink.core.memory.DataOutputView; //导入方法依赖的package包/类
@Override
public void write(DataOutputView out) throws IOException {
out.writeDouble(this.value);
}
示例8: write
import org.apache.flink.core.memory.DataOutputView; //导入方法依赖的package包/类
@Override
public void write(final DataOutputView out) throws IOException {
synchronized (this.confData) {
out.writeInt(this.confData.size());
for (Map.Entry<String, Object> entry : this.confData.entrySet()) {
String key = entry.getKey();
Object val = entry.getValue();
StringValue.writeString(key, out);
Class<?> clazz = val.getClass();
if (clazz == String.class) {
out.write(TYPE_STRING);
StringValue.writeString((String) val, out);
}
else if (clazz == Integer.class) {
out.write(TYPE_INT);
out.writeInt((Integer) val);
}
else if (clazz == Long.class) {
out.write(TYPE_LONG);
out.writeLong((Long) val);
}
else if (clazz == Float.class) {
out.write(TYPE_FLOAT);
out.writeFloat((Float) val);
}
else if (clazz == Double.class) {
out.write(TYPE_DOUBLE);
out.writeDouble((Double) val);
}
else if (clazz == byte[].class) {
out.write(TYPE_BYTES);
byte[] bytes = (byte[]) val;
out.writeInt(bytes.length);
out.write(bytes);
}
else if (clazz == Boolean.class) {
out.write(TYPE_BOOLEAN);
out.writeBoolean((Boolean) val);
}
else {
throw new IllegalArgumentException("Unrecognized type");
}
}
}
}
示例9: write
import org.apache.flink.core.memory.DataOutputView; //导入方法依赖的package包/类
@Override
public void write(DataOutputView out) throws IOException {
out.writeDouble(val0);
out.writeLong(val1);
}