comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Identify largish array with a shortish string
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Identify largish array with a shortish string [message #60617] Fri, 30 May 2008 09:10 Go to next message
Jean H. is currently offline  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 #60626 is a reply to message #60617] Fri, 30 May 2008 00:34 Go to previous messageGo to next message
Mark[1] is currently offline  Mark[1]
Messages: 66
Registered: February 2008
Member
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.)
Re: Identify largish array with a shortish string [message #60648 is a reply to message #60626] Wed, 28 May 2008 17:46 Go to previous messageGo to next message
Vince Hradil is currently offline  Vince Hradil
Messages: 574
Registered: December 1999
Senior Member
On May 28, 5:39 pm, Jean H <jghas...@DELTHIS.ucalgary.ANDTHIS.ca>
wrote:
>> So do such functions exist and are there any implementations in IDL?
>
> Hash function comes to mind...
> en.wikipedia.org/wiki/Hash_function
>
> Jean

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...
Re: Identify largish array with a shortish string [message #60649 is a reply to message #60648] Wed, 28 May 2008 15:39 Go to previous messageGo to next message
Jean H. is currently offline  Jean H.
Messages: 472
Registered: July 2006
Senior Member
> So do such functions exist and are there any implementations in IDL?

Hash function comes to mind...
en.wikipedia.org/wiki/Hash_function

Jean
Re: Identify largish array with a shortish string [message #61407 is a reply to message #60617] Tue, 15 July 2008 17:47 Go to previous message
Mark[1] is currently offline  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.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: OpenMPI
Next Topic: LAUNCH JAVA (applet) APPLICATION with IDL

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:16:03 PDT 2025

Total time taken to generate the page: 0.24230 seconds