HashMap<Integer, double[]> equivalent in trove?

375 Views Asked by At

I have just learned about trove library and how it's more memory efficient than JDK's Maps. I was previously using a hash map to store totalSize = 2^N double array entries, as follows:

final Map myTable = new HashMap(totalSize);

I was wondering if there is an equivalent class in Trove? or if there is a way to use Class TIntDoubleHashMap that makes the same collection as myTable HashMap?

I would appreciate any help/suggestion.

1

There are 1 best solutions below

0
On BEST ANSWER

A double[] is, in fact, an object, so you should probably just use TIntObjectHashMap<double[]>.