com.google.flatbuffers.FlatBufferBuilder.addFloat()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(3.1k)|赞(0)|评价(0)|浏览(86)

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

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); }

相关文章

微信公众号

最新文章

更多