Identify largish array with a shortish string [message #60651] |
Wed, 28 May 2008 15:28 |
Mark[1]
Messages: 66 Registered: February 2008
|
Member |
|
|
When writing functions that take a long time to execute, it is my
custom to add some simple code to store the results in a temporary
file, this file being saved the first time the function is invoked
with a given set of inputs, and restored on any subsequent invocation
with the same inputs.
So obviously I need to encode the inputs in the file name. This is not
a problem when the inputs are small, as they might be when the
function is processing data from some dataset, and the input to the
function is just a couple of 2-element vectors specifying the
longitude and latitude range. Or whatever, the point is that I have
used this approach successfully and (surprisingly) never run into the
problem I have now.
I now want to use the approach for a function in which the input is a
big numeric array. So I need a way to represent each big numeric array
(its dimensions and values) in the file name with a low probability of
another big numeric array having the same representation and hence
causing the function to retrieve the same file by mistake. Obviously I
can't have a zero probability, but a reasonably low probability will
be fine.
So do such functions exist and are there any implementations in IDL?
|
|
|