0

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.

PyPhys
  • 129
  • 5
  • 10

1 Answers1

6

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

Louis Wasserman
  • 191,574
  • 25
  • 345
  • 413