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

Home » Public Forums » archive » Set Operations on A and B
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: Set Operations on A and B [message #45881 is a reply to message #45700] Mon, 10 October 2005 06:46 Go to previous message
btt is currently offline  btt
Messages: 345
Registered: December 2000
Senior Member
mxd1007@cs.rit.edu wrote:

>
> setA = {vertex0:[1,5,8],vertex1:[0,2,7],vertex2:[,3,6,7},$
> vertex3:[2,4,10],vertex4:[3,5,10],vertex5:[0,4,6,8],$
> vertex6:[2,5,9],vertex7:[1,2,9,10],vertex8:[0,5,9,10],$
> vertex9:[6,7,8,10],vertex10:[3,4,7,8,9]}
>
snip
>
> ;retrieve subarray from structure setA
> newSetA = setA.(i)
>
> sizeColorClass = SIZE(colorClass[h], /n_dimensions)
>
> WHILE( h LT k AND SetIntersection(newSetA, REFORM(colorClass[h],$
> sizeColorClass) NE -1) DO.........
>

Hello,

Two things, I think, will help here.

(1) You probably want change the call to size so that it returns a
vector of dimensions - not a scalar of the number of dimensions. I
think your REFORM statement will work if you do since it will work with

sizeColorClass = SIZE(colorClass[h], /dimensions)


(2) I would seriously be looking transforming this whole thing into an
object system. Make each vertex an object. Then you have two options
- have each vertex know something about its adjacency or have another
type of object provide supervision/navigation for you. I did something
similar with a quadtree object system a long time ago. Once I had my
head wrapped around the object part - the quadtree navigation was a
snap. And a bonus was waaaay less coding than that without objects.


Cheers,
Ben
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: PDF manual on 6.1
Next Topic: Stackplot without axis?

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

Current Time: Sat Oct 11 14:59:32 PDT 2025

Total time taken to generate the page: 7.75909 seconds