gnu.trove.list.TIntList.addAll()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(4.1k)|赞(0)|评价(0)|浏览(65)

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

TIntList.addAll介绍

暂无

代码示例

代码示例来源:origin: MovingBlocks/Terasology

public void setVertexWeights(TIntList vertexStartWeight, TIntList vertexWeightCount) {
  this.vertexStartWeights.clear();
  this.vertexStartWeights.addAll(vertexStartWeight);
  this.vertexWeightCounts.clear();
  this.vertexWeightCounts.addAll(vertexWeightCount);
}

代码示例来源:origin: MovingBlocks/Terasology

public SkeletalMeshData(List<Bone> bones, List<BoneWeight> weights, List<Vector2f> uvs, TIntList vertexStartWeights,
            TIntList vertexWeightCounts, TIntList indices, AABB staticAABB) {
  for (Bone bone : bones) {
    if (bone.getParent() == null) {
      rootBone = bone;
      break;
    }
  }
  this.bones.addAll(bones);
  this.weights.addAll(weights);
  this.uvs = ImmutableList.copyOf(uvs);
  this.vertexStartWeights.addAll(vertexStartWeights);
  this.vertexWeightCounts.addAll(vertexWeightCounts);
  this.indices.addAll(indices);
  this.staticAABB = staticAABB;
  calculateNormals();
}

代码示例来源:origin: MovingBlocks/Terasology

public void setIndices(TIntList indices) {
  this.indices.clear();
  this.indices.addAll(indices);
}

代码示例来源:origin: MovingBlocks/Terasology

texCoord0Mesh.addAll(loader.getTexCoord0());
normalsMesh.addAll(loader.getNormals());
indicesMesh.addAll(loader.getIndices());

代码示例来源:origin: numenta/htm.java

/**
 * Returns an array containing the sub-field bucket indices for
 * each sub-field of the inputData. To get the associated field names for each of
 * the buckets, call getScalarNames().
 * @param      input     The data from the source. This is typically a object with members.
 *
 * @return     array of bucket indices
 */
public int[] getBucketIndices(String input) {
  TIntList l = new TIntArrayList();
  Map<EncoderTuple, List<EncoderTuple>> encoders = getEncoders();
  if(encoders != null && encoders.size() > 0) {
    for(EncoderTuple t : encoders.keySet()) {
      l.addAll(t.getEncoder().getBucketIndices(input));
    }
  }else{
    throw new IllegalStateException("Should be implemented in base classes that are not " +
      "containers for other encoders");
  }
  return l.toArray();
}

代码示例来源:origin: numenta/htm.java

/**
 * Returns an array containing the sub-field bucket indices for
 * each sub-field of the inputData. To get the associated field names for each of
 * the buckets, call getScalarNames().
 * @param      input     The data from the source. This is typically a object with members.
 *
 * @return     array of bucket indices
 */
public int[] getBucketIndices(double input) {
  TIntList l = new TIntArrayList();
  Map<EncoderTuple, List<EncoderTuple>> encoders = getEncoders();
  if(encoders != null && encoders.size() > 0) {
    for(EncoderTuple t : encoders.keySet()) {
      l.addAll(t.getEncoder().getBucketIndices(input));
    }
  }else{
    throw new IllegalStateException("Should be implemented in base classes that are not " +
      "containers for other encoders");
  }
  return l.toArray();
}

代码示例来源:origin: numenta/htm.java

/**
 * Returns an array containing the sub-field bucket indices for
 * each sub-field of the inputData. To get the associated field names for each of
 * the buckets, call getScalarNames().
 * @param      input     The data from the source. This is typically a object with members.
 *
 * @return     array of bucket indices
 */
public int[] getBucketIndices(DateTime input) {
  TDoubleList scalars = getScalars(input);
  TIntList l = new TIntArrayList();
  List<EncoderTuple> encoders = getEncoders(this);
  if(encoders != null && encoders.size() > 0) {
    int i = 0;
    for(EncoderTuple t : encoders) {
      l.addAll(t.getEncoder().getBucketIndices(scalars.get(i)));
      ++i;
    }
  }else{
    throw new IllegalStateException("Should be implemented in base classes that are not " +
        "containers for other encoders");
  }
  return l.toArray();
}

代码示例来源:origin: com.flowpowered/caustic-api

/**
   * Replaces the contents of this vertex data by the provided one. This is a deep copy. The vertex attribute are each individually cloned.
   *
   * @param data The data to copy.
   */
  public void copy(VertexData data) {
    clear();
    indices.addAll(data.indices);
    final TIntObjectIterator<VertexAttribute> iterator = data.attributes.iterator();
    while (iterator.hasNext()) {
      iterator.advance();
      attributes.put(iterator.key(), iterator.value().clone());
    }
    nameToIndex.putAll(data.nameToIndex);
  }
}

代码示例来源:origin: com.flowpowered/caustic-api

vertexData.getIndices().addAll(indices);
return vertexData;

相关文章