Implementation:
Note that this implementation is not synchronized. Uses a {@link cern.colt.map.OpenIntObjectHashMap}, which is a compact and performant hashing technique.
Memory requirements:
Cells that
worst case: memory [bytes] = (1/minLoadFactor) * nonZeros * 13.
best case: memory [bytes] = (1/maxLoadFactor) * nonZeros * 13.
Where nonZeros = cardinality() is the number of non-zero cells. Thus, a 1000000 matrix with minLoadFactor=0.25 and maxLoadFactor=0.5 and 1000000 non-zero cells consumes between 25 MB and 50 MB. The same 1000000 matrix with 1000 non-zero cells consumes between 25 and 50 KB.
Time complexity:
This class offers expected time complexity O(1) (i.e. constant time) for the basic operations get, getQuick, set, setQuick and size assuming the hash function disperses the elements properly among the buckets. Otherwise, pathological cases, although highly improbable, can occur, degrading performance to O(N) in the worst case. As such this sparse class is expected to have no worse time complexity than its dense counterpart {@link DenseObjectMatrix1D}. However, constant factors are considerably larger. @author wolfgang.hoschek@cern.ch @version 1.0, 09/24/99
|
|
|
|
|
|
|
|