本文整理了Java中com.google.flatbuffers.FlatBufferBuilder.addFloat()
方法的一些代码示例,展示了FlatBufferBuilder.addFloat()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FlatBufferBuilder.addFloat()
方法的具体详情如下:
包路径:com.google.flatbuffers.FlatBufferBuilder
类名称:FlatBufferBuilder
方法名:addFloat
[英]Add a float
to the buffer, properly aligned, and grows the buffer (if necessary).
[中]在缓冲区中添加一个“float”,正确对齐,并增长缓冲区(如果需要)。
代码示例来源:origin: deeplearning4j/nd4j
public static void addScalar(FlatBufferBuilder builder, float scalar) { builder.addFloat(13, scalar, 0.0f); }
public static void addScopeId(FlatBufferBuilder builder, int scopeId) { builder.addInt(14, scopeId, 0); }
代码示例来源:origin: locationtech/geogig
public static void addValue(FlatBufferBuilder builder, float value) { builder.addFloat(0, value, 0.0f); }
public static int endFLOAT(FlatBufferBuilder builder) {
代码示例来源:origin: com.github.davidmoten/flatbuffers-java
/**
* Add a `float` to a table at `o` into its vtable, with value `x` and default `d`.
*
* @param o The index into the vtable.
* @param x A `float` to put into the buffer, depending on how defaults are handled. If
* `force_defaults` is `false`, compare `x` against the default value `d`. If `x` contains the
* default value, it can be skipped.
* @param d A `float` default value to compare against when `force_defaults` is `false`.
*/
public void addFloat (int o, float x, double d) { if(force_defaults || x != d) { addFloat (x); slot(o); } }
代码示例来源:origin: com.google.flatbuffers/flatbuffers-java
/**
* Add a `float` to a table at `o` into its vtable, with value `x` and default `d`.
*
* @param o The index into the vtable.
* @param x A `float` to put into the buffer, depending on how defaults are handled. If
* `force_defaults` is `false`, compare `x` against the default value `d`. If `x` contains the
* default value, it can be skipped.
* @param d A `float` default value to compare against when `force_defaults` is `false`.
*/
public void addFloat (int o, float x, double d) { if(force_defaults || x != d) { addFloat (x); slot(o); } }
代码示例来源:origin: davidmoten/flatbuffers
/**
* Add a `float` to a table at `o` into its vtable, with value `x` and default `d`.
*
* @param o The index into the vtable.
* @param x A `float` to put into the buffer, depending on how defaults are handled. If
* `force_defaults` is `false`, compare `x` against the default value `d`. If `x` contains the
* default value, it can be skipped.
* @param d A `float` default value to compare against when `force_defaults` is `false`.
*/
public void addFloat (int o, float x, double d) { if(force_defaults || x != d) { addFloat (x); slot(o); } }
代码示例来源:origin: com.vlkan/flatbuffers
public void addFloat (int o, float x, double d) { if(force_defaults || x != d) { addFloat (x); slot(o); } }
public void addDouble (int o, double x, double d) { if(force_defaults || x != d) { addDouble (x); slot(o); } }
代码示例来源:origin: flipkart-incubator/kafka-filtering
public void addFloat (int o, float x, double d) { if(force_defaults || x != d) { addFloat (x); slot(o); } }
public void addDouble (int o, double x, double d) { if(force_defaults || x != d) { addDouble (x); slot(o); } }
代码示例来源:origin: locationtech/geogig
public static int createValueVector(FlatBufferBuilder builder, float[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addFloat(data[i]); return builder.endVector(); }
public static void startValueVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); }
内容来源于网络,如有侵权,请联系作者删除!