Re: Identify largish array with a shortish string [message #60617] |
Fri, 30 May 2008 09:10  |
Jean H.
Messages: 472 Registered: July 2006
|
Senior Member |
|
|
Mark wrote:
> On May 29, 12:46 pm, Vince Hradil <hrad...@yahoo.com> wrote:
>> Yeah like a crc? But I'm confused as to why you need to encode the
>> information in the filename? You could also just add a timestamp...
>
> When I have run the function previously with the same inputs, I want
> it to restore the old result rather than recalculating it. (Unless I
> have deleted the temporary file in the meantime.)
you could also have an array linking your set of parameters to file
names... save and restore this array each time your call your function,
check if the parameter set is written in the array. If yes, read the
filename, open, process. If not, create a new filename that is not
present in your array, add the name and the parameter set, process, save.
Jean
|
|
|
|
|
|
Re: Identify largish array with a shortish string [message #61407 is a reply to message #60617] |
Tue, 15 July 2008 17:47  |
Mark[1]
Messages: 66 Registered: February 2008
|
Member |
|
|
> 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.
Function CHECKSUM32 from the IDL Astronomy User's Library seems to
meet my needs.
|
|
|