Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Idl-pvware > Re: Avoiding FO...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 9 of 22 Topic 5614 of 6457
Post > Topic >>

Re: Avoiding FOR loops (version googleplex.infinity)

by MichaelT <michael.theusner@[EMAIL PROTECTED] > Apr 9, 2008 at 05:56 AM

On Apr 9, 2:33 pm, Gaurav <selfishgau...@[EMAIL PROTECTED]
> wrote:
> Dear Nathan,
>
> And how do you propose I take care of the pixels where the 'chunks'
> will join other 'chunks'?
>
> I have thought of a very neat algorithm today, but will be able to
> implement it only later today. I promise to come up with some positive
> news tomorrow.
>
> Cheers,
> Gaurav

Hi Gaurav,

you could simply use some overlap.
Generate some vectors which contain the start and end positions of
each chunk.
Something like:
pxs = [0, p1-sr, p2-sr, p3-sr, ...]
pxe = [p1, p2, p3, ...]
and the same for y-coordinates

So you simply need a loop now and take the respective chunks from your
original array:
a = b[pxs[i]: pxe[i], pys[i]: pye[i]]

Then you will get the correct values for each of your chunks. So in
your case it seems to be impossible without loops...
What about Jim's method? What does that one look like? There could be
better solutions than mine.

Michael
 




 22 Posts in Topic:
Avoiding FOR loops (version googleplex.infinity)
Gaurav <selfishgaurav@  2008-04-07 05:42:57 
Re: Avoiding FOR loops (version googleplex.infinity)
MichaelT <michael.theu  2008-04-07 09:19:34 
Re: Avoiding FOR loops (version googleplex.infinity)
MichaelT <michael.theu  2008-04-07 09:25:26 
Re: Avoiding FOR loops (version googleplex.infinity)
MichaelT <michael.theu  2008-04-07 09:27:11 
Re: Avoiding FOR loops (version googleplex.infinity)
Gaurav <selfishgaurav@  2008-04-07 22:31:09 
Re: Avoiding FOR loops (version googleplex.infinity)
Gaurav <selfishgaurav@  2008-04-08 02:41:04 
Re: Avoiding FOR loops (version googleplex.infinity)
nathan12343 <nathan123  2008-04-08 14:33:45 
Re: Avoiding FOR loops (version googleplex.infinity)
Gaurav <selfishgaurav@  2008-04-09 05:33:46 
Re: Avoiding FOR loops (version googleplex.infinity)
MichaelT <michael.theu  2008-04-09 05:56:32 
Re: Avoiding FOR loops (version googleplex.infinity)
Tom McGlynn <tam@[EMAI  2008-04-09 08:18:15 
Re: Avoiding FOR loops (version googleplex.infinity)
Gaurav <selfishgaurav@  2008-04-09 23:13:54 
Re: Avoiding FOR loops (version googleplex.infinity)
Tom McGlynn <tam@[EMAI  2008-04-10 11:49:22 
Re: Avoiding FOR loops (version googleplex.infinity)
Gaurav <selfishgaurav@  2008-04-10 23:15:39 
Re: Avoiding FOR loops (version googleplex.infinity)
David Fanning <news@[E  2008-04-11 06:56:00 
Re: Avoiding FOR loops (version googleplex.infinity)
"R.G. Stockwell"  2008-04-11 10:15:51 
Re: Avoiding FOR loops (version googleplex.infinity)
David Fanning <news@[E  2008-04-11 10:44:55 
Re: Avoiding FOR loops (version googleplex.infinity)
Greg Hennessy <greg.he  2008-04-11 17:32:39 
Re: Avoiding FOR loops (version googleplex.infinity)
David Fanning <news@[E  2008-04-11 11:38:29 
Re: Avoiding FOR loops (version googleplex.infinity)
weitkamp@[EMAIL PROTECTED  2008-04-11 00:52:05 
Re: Avoiding FOR loops (version googleplex.infinity)
Gaurav <selfishgaurav@  2008-04-11 05:41:45 
Re: Avoiding FOR loops (version googleplex.infinity)
Tom McGlynn <tam@[EMAI  2008-04-11 08:04:09 
Re: Avoiding FOR loops (version googleplex.infinity)
Gaurav <selfishgaurav@  2008-04-14 22:46:07 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Dec 3 20:42:20 CST 2008.