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

Home » Public Forums » archive » Re: combinatory analysis with restrictions
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: combinatory analysis with restrictions [message #41750 is a reply to message #41749] Wed, 08 December 2004 21:29 Go to previous messageGo to previous message
Y.T. is currently offline  Y.T.
Messages: 25
Registered: December 2004
Junior Member
If I had to do it once, I'd brute-force it:

IDL> for a=0.,1.,.1 do for b=0.,1.,.1 do for c=0.,1.,.1 do $
IDL> if a+b+c eq 1. then print,a,b,c

or some such.

If I had to do this many times, I'd consider pre-filling an array
vaguely like this

IDL> r=intarr(11,11,11)
IDL> for i=0,10 do for j=0,10 do for k=0,10 do $
IDL> if i+j+k eq 10 then r[i,j,k]=1

and then later simply looking up r[a*10,b*10,c*10] ...
cordially

Y.T.

--
Remove YourClothes before you email me.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Help with Nested FOR Loop
Next Topic: iplot

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

Current Time: Sat Oct 11 00:56:31 PDT 2025

Total time taken to generate the page: 0.41755 seconds