If OpenIntToDoubleHashMap returns NaN for non-existent keys, then the Sparse Matrix could check for NaN to return 0 to its client.

-sujit

Phil Steitz wrote:
I am still working through this class and the sparse matrix class that it was extracted from (thanks, Ismael and Sugit!), so I am not sure if changing this would cause problems, but the current setup (returning 0 for missing keys) limits usefulness of this class. I see how this is convenient for sparse matrices; but I would see NaN as a more natural return value for non-existent keys in the general case. Alternatively, I guess we could add another method get(int key, double missingReturn).

Thoughts?

Phil

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to