[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

*Subject*: Re: efficient kernel or masking algorithm ?*From*: Craig Markwardt <craigmnet(at)cow.physics.wisc.edu>*Date*: 01 Dec 2000 09:23:03 -0600*Newsgroups*: comp.lang.idl-pvwave*Organization*: U. Wisc. Madison Physics -- Compact Objects*References*: <903m3j$e20$1@canopus.cc.umanitoba.ca> <3A25758E.A83B10CA@astro.cornell.edu> <9040lk$j64$1@canopus.cc.umanitoba.ca> <3A2594D6.9B0C779F@astro.cornell.edu> <onzoih3urw.fsf@cow.physics.wisc.edu> <3A26F2A0.926888E2@astro.cornell.edu>*Reply-To*: craigmnet(at)cow.physics.wisc.edu*Xref*: news.doit.wisc.edu comp.lang.idl-pvwave:22397

"J.D. Smith" <jdsmith@astro.cornell.edu> writes: > Ahh yes, multiplication by decimation. Must have missed that one. I > simply read the comment in your code without looking at the details: > > > ;; *** Multiplication > (newop EQ '*'): begin ;; Multiplication (by summation of logarithms) > > Did you do some time testing and find all that shifted indexing was > really faster than the logarithm? This I suspect will be very > architecture dependent. Looks neat though. The summation of logarithms was never very satisfactory. It never handled zeroes very well. Since there can be multiplication by negative numbers you really had to do a complex logarithm. All of these conversions made it quite slow. > Maybe I'll write up the 100 lines of C it would take for a shared > library to do dimensional multiply, sum, add, median, min, max, and, or, > mode, variance, etc., and send it to RSI. The problem with all of this > specific "vector-aware" coding, is that it reveals a dirty secret of > IDL's. It was built to do some vector operations fast, but was never a > truly generic vector language like APL or J. Yorick is very similar to IDL, but "better" in a lot of ways. One thing it has is the ability to write array indices which are functions. So, if you had a 2 dimensional array, you could get the MIN along one dimension or the other by doing this: array[min,*] or array[*,min] [syntax not totally correct] This is a very compact and meaningful notation. It has all sorts of functions that can go in there, like cumulative sum, first difference, etc. Now, people who want to do complicated sliding variances and medians, that's a much harder thing to accomplish with a vector language. We would need a fairly sophisticated "convolution" routine, which might be hard to optimize. Craig -- -------------------------------------------------------------------------- Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response --------------------------------------------------------------------------

**References**:**efficient kernel or masking algorithm ?***From:*Richard Tyc

**Re: efficient kernel or masking algorithm ?***From:*J.D. Smith

**Re: efficient kernel or masking algorithm ?***From:*Richard Tyc

**Re: efficient kernel or masking algorithm ?***From:*J.D. Smith

**Re: efficient kernel or masking algorithm ?***From:*Craig Markwardt

**Re: efficient kernel or masking algorithm ?***From:*J.D. Smith

- Prev by Date:
**Re: How to make a .Dat file from DICOM series?** - Next by Date:
**Re: JHUAPL Library** - Prev by thread:
**Re: efficient kernel or masking algorithm ?** - Next by thread:
**Re: efficient kernel or masking algorithm ? UPDATE** - Index(es):