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

Home » Public Forums » archive » Re: Best way to generate arrays of coordinates for hypersurface calculations?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Best way to generate arrays of coordinates for hypersurface calculations? [message #70403] Thu, 08 April 2010 04:01 Go to previous message
Jeremy Bailin is currently offline  Jeremy Bailin
Messages: 618
Registered: April 2008
Senior Member
> I'd like to add a few more features: mainly, the ability to make
> floating point arrays with a range that is smaller than the number of
> elements, like a 100x100x100 unit cube for instance.  I think this
> would make the function quite a bit more complicated, but also a lot
> more complete.  I'm also still uneasy about calculating functions this
> way.  It seems like a huge waste of memory, but I can't think of any
> other way to do it without using many loops!
>
> James Preiss

In these cases, on occasion the loops win out. In particular, if the
volume is smaller along one dimension, it might pay to loop over that
dimension (and vectorize the other dimensions as you're doing).
Depends how much memory is actually required - as long as you're
within the physical memory of the machine, the vectorized approach
will win out, but once you get beyond that it may be worth adding a
loop. If you wanted to be clever, you could have your function
evaluation code check to see how much memory would be required to
create the index array and decide what method to use based on that -
but I'd run some timing tests first to make sure that you know where
the crossover is.

-Jeremy.
[Message index]
 
Read Message
Read Message
Previous Topic: Re: Is there a way to plot with axis breaks in IDL?
Next Topic: Vectorized versions of MAP_2POINTS and LL_ARC_DISTANCE

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

Current Time: Wed Oct 08 15:42:25 PDT 2025

Total time taken to generate the page: 0.00430 seconds