@Override public boolean hasNext() { synchronized (ColtIntegerHashSet.this) { return index < mapKeyList.size(); } }
@Override public Long next() { synchronized (ColtIntegerHashSet.this) { if (versionSnapshot != version) { throw new ConcurrentModificationException(); } if (index >= mapKeyList.size()) { throw new NoSuchElementException(); } long value = mapKeyList.getQuick(index); index++; canRemove = true; return value; } }
public int size() { return permutation.size(); }
/** * Appends all elements of the specified list to the receiver. * @param list the list of which all elements shall be appended. */ public void addAllOf(IntArrayList other) { addAllOfFromTo(other,0,other.size()-1); } /**
/** * Trims the capacity of the receiver to be the receiver's current * size. Releases any superfluous internal memory. An application can use this operation to minimize the * storage of the receiver. */ public void trimToSize() { elements = cern.colt.Arrays.trimToCapacity(elements,size()); } }
/** * Appends all elements of the specified list to the receiver. * @param list the list of which all elements shall be appended. */ public void addAllOf(IntArrayList other) { addAllOfFromTo(other,0,other.size()-1); } /**
/** * Trims the capacity of the receiver to be the receiver's current * size. Releases any superfluous internal memory. An application can use this operation to minimize the * storage of the receiver. */ public void trimToSize() { elements = cern.colt.Arrays.trimToCapacity(elements,size()); } }
/** * Trims the capacity of the receiver to be the receiver's current size. * Releases any superfluous internal memory. An application can use this * operation to minimize the storage of the receiver. */ public void trimToSize() { elements = cern.colt.Arrays.trimToCapacity(elements, size()); } }
/** * Appends all elements of the specified list to the receiver. * * @param other * the list of which all elements shall be appended. */ public void addAllOf(IntArrayList other) { addAllOfFromTo(other, 0, other.size() - 1); }
/** * Adds all specified (x,y,z) points to the receiver. * @param xElements the x-coordinates of the points. * @param yElements the y-coordinates of the points. * @param zElements the y-coordinates of the points. */ public void addAllOf(IntArrayList xElements, IntArrayList yElements, IntArrayList zElements) { int listSize = xElements.size(); if (this.size + listSize >= this.capacity) flush(); this.target.addAllOf(xElements, yElements, zElements); } /**
/** * Adds all specified points (x,y) to the receiver. * @param x the x-coordinates of the points to add. * @param y the y-coordinates of the points to add. */ public void addAllOf(IntArrayList x, IntArrayList y) { int listSize = x.size(); if (this.size + listSize >= this.capacity) flush(); this.target.addAllOf(x, y); } /**
/** * Adds all elements of the specified list to the receiver. * @param list the list of which all elements shall be added. */ public void addAllOf(IntArrayList list) { int listSize = list.size(); if (this.size + listSize >= this.capacity) flush(); this.target.addAllOf(list); } /**
/** * Adds all specified points (x,y) to the receiver. * @param x the x-coordinates of the points to add. * @param y the y-coordinates of the points to add. */ public void addAllOf(IntArrayList x, IntArrayList y) { int listSize = x.size(); if (this.size + listSize >= this.capacity) flush(); this.target.addAllOf(x, y); } /**
/** * Adds all elements of the specified list to the receiver. * @param list the list of which all elements shall be added. */ public void addAllOf(IntArrayList list) { int listSize = list.size(); if (this.size + listSize >= this.capacity) flush(); this.target.addAllOf(list); } /**
/** * Adds all specified (x,y,z) points to the receiver. * @param xElements the x-coordinates of the points. * @param yElements the y-coordinates of the points. * @param zElements the y-coordinates of the points. */ public void addAllOf(IntArrayList xElements, IntArrayList yElements, IntArrayList zElements) { int listSize = xElements.size(); if (this.size + listSize >= this.capacity) flush(); this.target.addAllOf(xElements, yElements, zElements); } /**
public int elementsHash() { if (elementsHashDirty) { // Update elementsHash if (permutation.size() > permutation.elements().length) { permutation.trimToSize(); } elementsHash = Arrays.hashCode(permutation.elements()); elementsHashDirty = false; } return elementsHash; } }
private void quickAdd(int varName) { permutation.add(varName); int index = permutation.size() - 1; permutationHash.put(varName, index); positionHash.put(index, varName); elementsHashDirty = true; }
public List<ConceptData> getConceptDataList(DoubleMatrix1D v1){ IntArrayList arg0 = new IntArrayList() ; DoubleArrayList arg1=new DoubleArrayList(); v1.getNonZeros(arg0, arg1); List<ConceptData> vectorTopic=new ArrayList<ConceptData>() ; for(int i=0;i<arg0.size();i++){ String concept=inverseindex.get(arg0.get(i)); ConceptData data=new ConceptData(concept,arg1.get(i)); vectorTopic.add(data); } return vectorTopic; }
/** * Equivalent to <tt>partition(list.elements(), from, to, splitters.elements(), 0, splitters.size()-1, splitIndexes.elements())</tt>. */ public static void partition(IntArrayList list, int from, int to, IntArrayList splitters, IntArrayList splitIndexes) { partition(list.elements(),from,to,splitters.elements(),0,splitters.size()-1,splitIndexes.elements()); } /**
/** * Equivalent to <tt>partition(list.elements(), from, to, splitters.elements(), 0, splitters.size()-1, splitIndexes.elements())</tt>. */ public static void partition(IntArrayList list, int from, int to, IntArrayList splitters, IntArrayList splitIndexes) { partition(list.elements(),from,to,splitters.elements(),0,splitters.size()-1,splitIndexes.elements()); } /**