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

Home » Public Forums » archive » Cyclic array interfaces
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Cyclic array interfaces [message #40200] Mon, 12 July 2004 17:42
Jonathan Greenberg is currently offline  Jonathan Greenberg
Messages: 91
Registered: November 2002
Member
A few months back I was asking about efficient ways of interacting with
images where I can perform spatial transforms (e.g. Applying a 5 x 5 filter
of some sort to the image), and I got lots of good information back, and one
idea in particular intrigued me: working with an array in a cyclic fashion.
My question is: is replacing a single "line" of an N x M arrau with a 1 x M
vector using something like:

A=[[1,2,3],[4,5,6]]
B=[7,8,9]
A[*,1]=B

... An efficient method of replacing data in an array? Or does A get
completely rewritten and takes as much time as:

C=[[10,11,12],[13,14,15]]
A=C

(e.g. Does IDL actually rewrite the entire array, regardless of how many
elements are being changed, or does it only change the particular elements
and hence the first example should be about twice as fast as the second)?

If example #1 is faster than #2, then I can implement a cyclical array
approach, where if I want to work with 5 lines of an image at a time, the
"line index" the first iteration would be:
0,1,2,3,4
And the second iteration (as I shift down one line):
5,1,2,3,4 (so I'm overwriting only one line of data at a time).

Thoughts?

--j

--
Jonathan Greenberg
Graduate Group in Ecology, U.C. Davis
http://www.cstars.ucdavis.edu/~jongreen
http://www.cstars.ucdavis.edu
AIM: jgrn307 or jgrn3007
MSN: jgrn307@msn.com or jgrn3007@msn.com
[Message index]
 
Read Message
Previous Topic: Re: Select directory
Next Topic: dynamic pull down menus, removing items

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

Current Time: Sun Oct 12 13:47:35 PDT 2025

Total time taken to generate the page: 0.56304 seconds