本文整理汇总了Java中cern.colt.map.OpenIntObjectHashMap类的典型用法代码示例。如果您正苦于以下问题:Java OpenIntObjectHashMap类的具体用法?Java OpenIntObjectHashMap怎么用?Java OpenIntObjectHashMap使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
OpenIntObjectHashMap类属于cern.colt.map包,在下文中一共展示了OpenIntObjectHashMap类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: SparseObjectMatrix3D
import cern.colt.map.OpenIntObjectHashMap; //导入依赖的package包/类
/**
* 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);
}
示例2: SparseObjectMatrix2D
import cern.colt.map.OpenIntObjectHashMap; //导入依赖的package包/类
/**
* 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);
}
示例3: SparseObjectMatrix1D
import cern.colt.map.OpenIntObjectHashMap; //导入依赖的package包/类
/**
* 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);
}