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

Home » Public Forums » archive » Selecting groups of 5 coords from a set of n (nC5)
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Selecting groups of 5 coords from a set of n (nC5) [message #47836] Fri, 03 March 2006 07:26
Olivia is currently offline  Olivia
Messages: 16
Registered: February 2006
Junior Member
Dear All,

I am trying to write a loop to perform a calculation on all possible
sets of 5 coordinates from a group of n. The test case I am working on
has a total number of coordinates of 8, so there will be 8c5=56 unique
solutions. At the moment, I am thinking of using 5 for loops as an
extension of a similar problem I worked on choosing 3 points. The 3
point code ran like this:

;Select groups of 3 boundary points
;for p=1, n, 1 do begin
; for k=1, n, 1 do begin
; for m=0, n-1, 1 do begin
; ellipse_points=[[bx[m], by[m]],$
; [bx[m+k], by[m+k]],$
; [bx[m+k+p], by[m+k+p]]]

On reflection, I was wondering if there might be a better way of doing
this. This is probably only a fear as my code is already looking really
complicated and I am worried about putting rubbish in and getting
rubbish out whilst being completely unaware. If anyone has any ideas I
would be really grateful to hear them. Thank you very much,

Olivia
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Problems compiling shared libraries
Next Topic: Re: Selecting groups of 5 coords from a set of n (nC5)

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

Current Time: Wed Oct 08 19:16:50 PDT 2025

Total time taken to generate the page: 0.00500 seconds