本文整理了Java中it.unimi.dsi.fastutil.ints.IntSet.clear()
方法的一些代码示例,展示了IntSet.clear()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。IntSet.clear()
方法的具体详情如下:
包路径:it.unimi.dsi.fastutil.ints.IntSet
类名称:IntSet
方法名:clear
暂无
代码示例来源:origin: org.apache.giraph/giraph-core
@Override
public void clear() {
set.clear();
}
代码示例来源:origin: org.apache.giraph/giraph-core
@Override
public void readFields(DataInput in) throws IOException {
long size = in.readLong();
set.clear();
trim(size);
for (long i = 0; i < size; ++i) {
set.add(in.readInt());
}
}
}
代码示例来源:origin: com.metsci.glimpse/glimpse-extras-dnc
public void set( IntCollection indices )
{
if ( !hSet.isEmpty( ) )
{
hSet.clear( );
hSetChanged = true;
}
if ( hSet.addAll( indices ) )
{
hSetChanged = true;
}
}
代码示例来源:origin: CampagneLaboratory/variationanalysis
public void set(List<Integer> readIndicesForwardStrandList, List<Integer> readIndicesReverseStrandList) {
readIndices.clear();
readIndices.addAll(readIndicesForwardStrandList);
readIndices.addAll(readIndicesReverseStrandList);
}
代码示例来源:origin: SquidDev-CC/plethora
@Nullable
synchronized MessageCanvasUpdate getUpdateMessage() {
List<BaseObject> changed = null;
for (BaseObject object : objects.values()) {
if (object.pollDirty()) {
if (changed == null) changed = new ArrayList<>();
changed.add(object);
}
}
if (changed == null && removed.size() == 0) return null;
if (changed == null) changed = Collections.emptyList();
MessageCanvasUpdate message = new MessageCanvasUpdate(
canvasId, changed, removed.toIntArray()
);
removed.clear();
return message;
}
代码示例来源:origin: emorynlp/nlp4j
protected void update(boolean sparse)
{
IntSet s = sparse ? sparse_updated_indices : dense_updated_indices;
MajorVector w = weight_vector.getMajorVector(sparse);
MajorVector d = diagonals .getMajorVector(sparse);
MajorVector g = gradients .getMajorVector(sparse);
int[] indices = s.toIntArray();
Arrays.sort(indices);
updateDiagonals(d, g, indices);
updateWeights (w, g, indices, sparse);
clearGraidents (g, indices);
s.clear();
}
代码示例来源:origin: edu.emory.mathcs.nlp/nlp4j-core
protected void update(boolean sparse)
{
IntSet s = sparse ? sparse_updated_indices : dense_updated_indices;
MajorVector w = weight_vector.getMajorVector(sparse);
MajorVector d = diagonals .getMajorVector(sparse);
MajorVector g = gradients .getMajorVector(sparse);
int[] indices = s.toIntArray();
Arrays.sort(indices);
updateDiagonals(d, g, indices);
updateWeights (w, g, indices, sparse);
clearGraidents (g, indices);
s.clear();
}
代码示例来源:origin: it.unimi.dsi/webgraph
localNextMustBeChecked.clear();
代码示例来源:origin: stackoverflow.com
downKeys.clear();
Gdx.input.setInputProcessor(inputAdapter);
代码示例来源:origin: com.metsci.glimpse/glimpse-extras-dnc
dSet.clear( );
dSet.addAll( hSet );
hSetChanged = false;
代码示例来源:origin: senbox-org/s2tbx
borderCells.clear(); // clear the set
if (borderCells.add(refNode.getId())) {
List<Node> resultNodes = borderPixelMap.get(refNode.getId());
代码示例来源:origin: org.apache.giraph/giraph-core
@Override
public Vertex<IntWritable, FloatWritable, NullWritable>
getCurrentVertex() throws IOException, InterruptedException {
Vertex<IntWritable, FloatWritable, NullWritable> vertex =
getConf().createVertex();
int vertexId = startingVertexId + verticesRead;
OutEdges<IntWritable, NullWritable> edges =
getConf().createOutEdges();
edges.initialize(edgesPerVertex);
destVertices.clear();
for (int i = 0; i < edgesPerVertex; ++i) {
int destVertexId;
do {
destVertexId = localEdgesHelper.generateDestVertex(vertexId, rand);
} while (!destVertices.add(destVertexId));
Edge<IntWritable, NullWritable> edge =
(reusableEdge == null) ? getConf().createEdge() : reusableEdge;
edge.getTargetVertexId().set(destVertexId);
edges.add(edge);
}
vertex.initialize(
new IntWritable(vertexId), new FloatWritable(1.0f), edges);
++verticesRead;
return vertex;
}
代码示例来源:origin: senbox-org/s2tbx
IntSet borderCells = new IntOpenHashSet();
for (int i = 0; i < nodeCount; i++) {
borderCells.clear();
代码示例来源:origin: senbox-org/s2tbx
Edge edge = currentNode.findEdge(firstNeighborNode);
if (edge == null) {
borderCells.clear(); // clear the set
int boundary = 0;
if (borderCells.add(currentNode.getId())) {
代码示例来源:origin: it.unimi.dsi/webgraph
if (currentNode != x) {
final IntSet succSet = new IntOpenHashSet();
succSet.clear();
代码示例来源:origin: vmware/hillview
dec += 1;
if (dec == min) {
toRemove.clear();
for (ObjectIterator<Int2ObjectMap.Entry<MutableInteger>> it =
hMap.int2ObjectEntrySet().fastIterator(); it.hasNext(); ) {
内容来源于网络,如有侵权,请联系作者删除!