public ColtIntegerHashSet(int initialCapacity) { this.map = new OpenIntObjectHashMap(initialCapacity); }
@Override public SnapshotableSet<Long> create() { if (numberType == NumberType.INTEGER) { return new ColtIntegerHashSet( new OpenIntObjectHashMap(initialValue, minLoadFactor, maxLoadFactor) ); } else if (numberType == NumberType.LONG) { return new ColtLongHashSet( new OpenLongObjectHashMap(initialValue, minLoadFactor, maxLoadFactor) ); } else { throw new IllegalStateException(String.format("unknown type %s", numberType)); } } }
private static OpenIntObjectHashMap getNodeAttIDToAttNameMap() { if (nodeAttIDToAttNameMap == null) nodeAttIDToAttNameMap = new OpenIntObjectHashMap(); return nodeAttIDToAttNameMap; }
private static OpenIntObjectHashMap getNodeAttributeIDToAttributeValuesMap() { if (nodeAttributeIDToAttributeValuesMap == null) nodeAttributeIDToAttributeValuesMap = new OpenIntObjectHashMap(); return nodeAttributeIDToAttributeValuesMap; }
/** * Constructs a matrix with a given number of rows and columns using memory as specified. * All entries are initially <tt>null</tt>. * For details related to memory usage see {@link cern.colt.map.OpenIntObjectHashMap}. * * @param rows the number of rows the matrix shall have. * @param columns the number of columns the matrix shall have. * @param initialCapacity the initial capacity of the hash map. * If not known, set <tt>initialCapacity=0</tt> or small. * @param minLoadFactor the minimum load factor of the hash map. * @param maxLoadFactor the maximum load factor of the hash map. * @throws IllegalArgumentException if <tt>initialCapacity < 0 || (minLoadFactor < 0.0 || minLoadFactor >= 1.0) || (maxLoadFactor <= 0.0 || maxLoadFactor >= 1.0) || (minLoadFactor >= maxLoadFactor)</tt>. * @throws IllegalArgumentException if <tt>rows<0 || columns<0 || (double)columns*rows > Integer.MAX_VALUE</tt>. */ public SparseObjectMatrix2D(int rows, int columns, int initialCapacity, double minLoadFactor, double maxLoadFactor) { setUp(rows,columns); this.elements = new OpenIntObjectHashMap(initialCapacity, minLoadFactor, maxLoadFactor); } /**
/** * Constructs a matrix with a given number of parameters. * All entries are initially <tt>null</tt>. * For details related to memory usage see {@link cern.colt.map.OpenIntObjectHashMap}. * * @param size the number of cells the matrix shall have. * @param initialCapacity the initial capacity of the hash map. * If not known, set <tt>initialCapacity=0</tt> or small. * @param minLoadFactor the minimum load factor of the hash map. * @param maxLoadFactor the maximum load factor of the hash map. * @throws IllegalArgumentException if <tt>initialCapacity < 0 || (minLoadFactor < 0.0 || minLoadFactor >= 1.0) || (maxLoadFactor <= 0.0 || maxLoadFactor >= 1.0) || (minLoadFactor >= maxLoadFactor)</tt>. * @throws IllegalArgumentException if <tt>size<0</tt>. */ public SparseObjectMatrix1D(int size, int initialCapacity, double minLoadFactor, double maxLoadFactor) { setUp(size); this.elements = new OpenIntObjectHashMap(initialCapacity, minLoadFactor, maxLoadFactor); } /**
private FilterManager() { filterList = new Vector(); ID2Filter = new OpenIntObjectHashMap(); Filter2ID = new HashMap(); // Add the Select All filter before anything else. // This is needed by the NodeTopologyFilter addFilter(new filter.cytoscape.SelectAllFilter()); }
/** * Constructs a matrix with a given number of parameters. * All entries are initially <tt>null</tt>. * For details related to memory usage see {@link cern.colt.map.OpenIntObjectHashMap}. * * @param size the number of cells the matrix shall have. * @param initialCapacity the initial capacity of the hash map. * If not known, set <tt>initialCapacity=0</tt> or small. * @param minLoadFactor the minimum load factor of the hash map. * @param maxLoadFactor the maximum load factor of the hash map. * @throws IllegalArgumentException if <tt>initialCapacity < 0 || (minLoadFactor < 0.0 || minLoadFactor >= 1.0) || (maxLoadFactor <= 0.0 || maxLoadFactor >= 1.0) || (minLoadFactor >= maxLoadFactor)</tt>. * @throws IllegalArgumentException if <tt>size<0</tt>. */ public SparseObjectMatrix1D(int size, int initialCapacity, double minLoadFactor, double maxLoadFactor) { setUp(size); this.elements = new OpenIntObjectHashMap(initialCapacity, minLoadFactor, maxLoadFactor); } /**
/** * Constructs a matrix with a given number of rows and columns using memory as specified. * All entries are initially <tt>null</tt>. * For details related to memory usage see {@link cern.colt.map.OpenIntObjectHashMap}. * * @param rows the number of rows the matrix shall have. * @param columns the number of columns the matrix shall have. * @param initialCapacity the initial capacity of the hash map. * If not known, set <tt>initialCapacity=0</tt> or small. * @param minLoadFactor the minimum load factor of the hash map. * @param maxLoadFactor the maximum load factor of the hash map. * @throws IllegalArgumentException if <tt>initialCapacity < 0 || (minLoadFactor < 0.0 || minLoadFactor >= 1.0) || (maxLoadFactor <= 0.0 || maxLoadFactor >= 1.0) || (minLoadFactor >= maxLoadFactor)</tt>. * @throws IllegalArgumentException if <tt>rows<0 || columns<0 || (double)columns*rows > Integer.MAX_VALUE</tt>. */ public SparseObjectMatrix2D(int rows, int columns, int initialCapacity, double minLoadFactor, double maxLoadFactor) { setUp(rows,columns); this.elements = new OpenIntObjectHashMap(initialCapacity, minLoadFactor, maxLoadFactor); } /**
/** * Constructs a matrix with a given number of slices, rows and columns using memory as specified. * All entries are initially <tt>null</tt>. * For details related to memory usage see {@link cern.colt.map.OpenIntObjectHashMap}. * * @param slices the number of slices the matrix shall have. * @param rows the number of rows the matrix shall have. * @param columns the number of columns the matrix shall have. * @param initialCapacity the initial capacity of the hash map. * If not known, set <tt>initialCapacity=0</tt> or small. * @param minLoadFactor the minimum load factor of the hash map. * @param maxLoadFactor the maximum load factor of the hash map. * @throws IllegalArgumentException if <tt>initialCapacity < 0 || (minLoadFactor < 0.0 || minLoadFactor >= 1.0) || (maxLoadFactor <= 0.0 || maxLoadFactor >= 1.0) || (minLoadFactor >= maxLoadFactor)</tt>. * @throws IllegalArgumentException if <tt>(double)slices*columns*rows > Integer.MAX_VALUE</tt>. * @throws IllegalArgumentException if <tt>slices<0 || rows<0 || columns<0</tt>. */ public SparseObjectMatrix3D(int slices, int rows, int columns, int initialCapacity, double minLoadFactor, double maxLoadFactor) { setUp(slices,rows,columns); this.elements = new OpenIntObjectHashMap(initialCapacity, minLoadFactor, maxLoadFactor); } /**
/** * Constructs a matrix with a given number of slices, rows and columns using memory as specified. * All entries are initially <tt>null</tt>. * For details related to memory usage see {@link cern.colt.map.OpenIntObjectHashMap}. * * @param slices the number of slices the matrix shall have. * @param rows the number of rows the matrix shall have. * @param columns the number of columns the matrix shall have. * @param initialCapacity the initial capacity of the hash map. * If not known, set <tt>initialCapacity=0</tt> or small. * @param minLoadFactor the minimum load factor of the hash map. * @param maxLoadFactor the maximum load factor of the hash map. * @throws IllegalArgumentException if <tt>initialCapacity < 0 || (minLoadFactor < 0.0 || minLoadFactor >= 1.0) || (maxLoadFactor <= 0.0 || maxLoadFactor >= 1.0) || (minLoadFactor >= maxLoadFactor)</tt>. * @throws IllegalArgumentException if <tt>(double)slices*columns*rows > Integer.MAX_VALUE</tt>. * @throws IllegalArgumentException if <tt>slices<0 || rows<0 || columns<0</tt>. */ public SparseObjectMatrix3D(int slices, int rows, int columns, int initialCapacity, double minLoadFactor, double maxLoadFactor) { setUp(slices,rows,columns); this.elements = new OpenIntObjectHashMap(initialCapacity, minLoadFactor, maxLoadFactor); } /**
public SimpleFormula() { permutation = new SimplePermutation(); tiers = new ObjectArrayList(); tiersHash1 = new OpenIntObjectHashMap(); tiersHash2 = new OpenLongObjectHashMap(); tiersHash3 = new OpenLongObjectHashMap(); }
public StructuresForConcordantShift(int hssSize) { substructureEdges = new ObjectArrayList(hssSize); hsIntersections = new OpenIntObjectHashMap(hssSize); coincidentIntersections = new ObjectArrayList(hssSize); for (int h = 0; h < hssSize; h++) { hsIntersections.put(h, new ObjectArrayList(8)); } } public void clear()
hs.getTiers().add(new OpenIntObjectHashMap(8));
public void addVertex(int tierSize, IVertex vertex) { int tierIndex = vertex.getTierIndex(); OpenIntObjectHashMap edges; if (tierIndex == tiers.size()) { edges = new OpenIntObjectHashMap(tierSize); tiers.add(edges); } else { edges = (OpenIntObjectHashMap) tiers.get(tierIndex); } edges.put(vertex.getTripletValue().getTierKey(), vertex); ((SimpleVertex)vertex).setHyperStructure(this); } }
a2v.put(id, string_map); } else { OpenIntObjectHashMap object_map = new OpenIntObjectHashMap(); a2v.put(id, object_map);
OpenIntObjectHashMap verticesFromLastTiers = new OpenIntObjectHashMap();
ObjectArrayList structures = new ObjectArrayList(); OpenIntObjectHashMap verticesFromLastTiers = new OpenIntObjectHashMap(); fillVerticesFromLastTier(hss, structures, verticesFromLastTiers);
OpenIntObjectHashMap hsIntersections = new OpenIntObjectHashMap(); for (int h = 0; h < hss.size(); h++)