Re: hashmap in idl [message #67240] |
Mon, 20 July 2009 05:21 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
b.a writes:
> I have some 2D arrays that I want to give each of them, kind of index
> so I can call them in my program by their indexes. Maybe something
> like Hashmap in java and the number of arrays is not constant. I mean
> in the middle of the program, new 2D arrays are created or eliminated
> and I want to keep track of them.
You could use Craig Markwardt's HashTable, or even my LinkedList
object. Or, even a simple pointer array, for that matter.
http://cow.physics.wisc.edu/~craigm/idl/arrays.html
http://www.dfanning.com/programs/linkedlist__define.pro
> I am also thinking of associating each 2D array to its relevant
> widget_base which makes my program more efficient. But I don't know
> how!!!
I typically make an image object in these cases, with which window
to draw into part of the "state" of an image, along with which color
table to use to display it, how to scale it, etc.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|