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

Home » Public Forums » archive » Re: Expensive loops... can they be avoided?
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: Expensive loops... can they be avoided? [message #58891] Tue, 26 February 2008 08:15 Go to previous message
Rainer is currently offline  Rainer
Messages: 5
Registered: November 2007
Junior Member
Thank you Allan. The TRIGRID solution works, and is amazingly fast,
but unfortunately not quite what I want.

> not be suitable. You can also save xp, yp and tr between calls if your
> "a" data is changing but everything else is staying the same which will
> also speed things up a bit.

Saving the grid indices in my algorithm (nearestr and nearestchi) into
an array and re-using
them already helps a lot but occasionally they need to be re-
calculated.

> I've only ever used triangulate and friends for display purposes so
> can't claim to be an expert on how accurate "b" will end up - since you
> were just picking the nearest point before I guess you're not overly
> concerned with accuracy.

Also my problem is "only" a displaying issue. The nearest neighbor
search was intended, though. I'm visualizing data from numerical
simulations and the points in "A" lie at the center of grid cells with
the value being representative for the whole cell. An interpolation
would give a wrong impression. If the grid is coarse, it should be
visible.


Thanks again,
Rainer
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Convenient IGRF in IDL
Next Topic: Re: using the WHERE function on a portion of an array

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

Current Time: Fri Oct 10 16:05:39 PDT 2025

Total time taken to generate the page: 0.80519 seconds