当前位置: 首页>>代码示例>>Java>>正文


Java FloatArrayList类代码示例

本文整理汇总了Java中it.unimi.dsi.fastutil.floats.FloatArrayList的典型用法代码示例。如果您正苦于以下问题:Java FloatArrayList类的具体用法?Java FloatArrayList怎么用?Java FloatArrayList使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


FloatArrayList类属于it.unimi.dsi.fastutil.floats包,在下文中一共展示了FloatArrayList类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: end

import it.unimi.dsi.fastutil.floats.FloatArrayList; //导入依赖的package包/类
@Override
public void end() {
  if (elementClass == boolean.class) {
    parent.add(((BooleanArrayList) container).toBooleanArray());
  } else if (elementClass == byte.class) {
    parent.add(((ByteArrayList) container).toByteArray());
  } else if (elementClass == char.class) {
    parent.add(((CharArrayList) container).toCharArray());
  } else if (elementClass == short.class) {
    parent.add(((ShortArrayList) container).toShortArray());
  } else if (elementClass == int.class) {
    parent.add(((IntArrayList) container).toIntArray());
  } else if (elementClass == long.class) {
    parent.add(((LongArrayList) container).toLongArray());
  } else if (elementClass == float.class) {
    parent.add(((FloatArrayList) container).toFloatArray());
  } else if (elementClass == double.class) {
    parent.add(((DoubleArrayList) container).toDoubleArray());
  } else {
    parent.add(((ArrayList) container).toArray());
  }
}
 
开发者ID:apache,项目名称:parquet-mr,代码行数:23,代码来源:AvroRecordConverter.java

示例2: build

import it.unimi.dsi.fastutil.floats.FloatArrayList; //导入依赖的package包/类
public PairM<FloatList,FloatList> build(float x, float y, float size, char toBuild){
	FloatList vert=new FloatArrayList(),uv=new FloatArrayList();
	build(x, y, size, toBuild, (x0, z0)->{
		vert.add(x0);
		vert.add(z0);
	}, (u, v)->{
		uv.add(u);
		uv.add(v);
	});
	return new PairM<>(vert, uv);
}
 
开发者ID:LapisSea,项目名称:OpenGL-Bullet-engine,代码行数:12,代码来源:FontFamily.java

示例3: PerfQuery

import it.unimi.dsi.fastutil.floats.FloatArrayList; //导入依赖的package包/类
/** Creates a new instance of PerfQuery */
public PerfQuery() {
  results = new FloatArrayList[4];
  results[BRUTE_FORCE] = new FloatArrayList();
  results[HAND_CODED] = new FloatArrayList();
  results[INDEXED] = new FloatArrayList();
  results[INDEX_CREATE] = new FloatArrayList();
}
 
开发者ID:ampool,项目名称:monarch,代码行数:9,代码来源:PerfQuery.java

示例4: toFloatArray

import it.unimi.dsi.fastutil.floats.FloatArrayList; //导入依赖的package包/类
public FloatArrayList toFloatArray() {
    FloatArrayList output = new FloatArrayList(data.size());
    for (long aData : data) {
        output.add(aData);
    }
    return output;
}
 
开发者ID:jtablesaw,项目名称:tablesaw,代码行数:8,代码来源:LongColumn.java

示例5: toFloatArray

import it.unimi.dsi.fastutil.floats.FloatArrayList; //导入依赖的package包/类
public FloatArrayList toFloatArray() {
    FloatArrayList output = new FloatArrayList(data.size());
    for (short aData : data) {
        output.add(aData);
    }
    return output;
}
 
开发者ID:jtablesaw,项目名称:tablesaw,代码行数:8,代码来源:ShortColumn.java

示例6: toFloatArray

import it.unimi.dsi.fastutil.floats.FloatArrayList; //导入依赖的package包/类
public FloatArrayList toFloatArray() {
    FloatArrayList output = new FloatArrayList(data.size());
    for (int aData : data) {
        output.add(aData);
    }
    return output;
}
 
开发者ID:jtablesaw,项目名称:tablesaw,代码行数:8,代码来源:IntColumn.java

示例7: join

import it.unimi.dsi.fastutil.floats.FloatArrayList; //导入依赖的package包/类
/**
 * Joins arrays together, if only one array contains elements it will be returned without coping anything. <br>
 * If given array or arrays is empty, new empty array will be returned.
 *
 * @param arrays arrays to join.
 *
 * @return new joined array, or one of given ones if other arrays were empty.
 */
public static float[] join(final float[]... arrays)
{
    if (arrays.length == 0)
    {
        return EMPTY_FLOATS;
    }
    if (arrays.length == 1)
    {
        return arrays[0];
    }
    if (arrays.length == 2)
    {
        return join(arrays[0], arrays[1]);
    }
    float[] notNull = null;
    int finalSize = 0;
    int nullArrays = 0;
    final FloatArrayList list = new FloatArrayList(arrays.length * 10);
    for (final float[] array : arrays)
    {
        if ((array == null) || (array.length == 0))
        {
            nullArrays++;
        }
        else
        {
            notNull = array;
            finalSize += array.length;
            list.addElements(list.size(), array);
        }
    }
    if (nullArrays == arrays.length)
    {
        return EMPTY_FLOATS;
    }
    if (nullArrays == (arrays.length - 1))
    {
        return notNull;
    }
    return list.toArray(new float[list.size()]);
}
 
开发者ID:Diorite,项目名称:Diorite-old,代码行数:50,代码来源:DioriteArrayUtils.java

示例8: FloatColumn

import it.unimi.dsi.fastutil.floats.FloatArrayList; //导入依赖的package包/类
public FloatColumn(String name) {
    this(name, new FloatArrayList(DEFAULT_ARRAY_SIZE));
}
 
开发者ID:jtablesaw,项目名称:tablesaw,代码行数:4,代码来源:FloatColumn.java

示例9: data

import it.unimi.dsi.fastutil.floats.FloatArrayList; //导入依赖的package包/类
public FloatArrayList data() {
    return data;
}
 
开发者ID:jtablesaw,项目名称:tablesaw,代码行数:4,代码来源:FloatColumn.java

示例10: clear

import it.unimi.dsi.fastutil.floats.FloatArrayList; //导入依赖的package包/类
@Override
public void clear() {
    data = new FloatArrayList(DEFAULT_ARRAY_SIZE);
}
 
开发者ID:jtablesaw,项目名称:tablesaw,代码行数:5,代码来源:FloatColumn.java

示例11: FloatAttributeStore

import it.unimi.dsi.fastutil.floats.FloatArrayList; //导入依赖的package包/类
FloatAttributeStore(AttributeInfo attrInfo) {
    super(attrInfo);
    this.list = new FloatArrayList();
}
 
开发者ID:apache,项目名称:incubator-atlas,代码行数:5,代码来源:AttributeStores.java

示例12: FloatToIdMap

import it.unimi.dsi.fastutil.floats.FloatArrayList; //导入依赖的package包/类
public FloatToIdMap() {
  _valueToIdMap = new Float2IntOpenHashMap();
  _valueToIdMap.defaultReturnValue(INVALID_KEY);
  _idToValueMap = new FloatArrayList();
}
 
开发者ID:linkedin,项目名称:pinot,代码行数:6,代码来源:FloatToIdMap.java


注:本文中的it.unimi.dsi.fastutil.floats.FloatArrayList类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。