fenfire-commits
[Top][All Lists]
Advanced

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

[ff-cvs] libvob/vob/demo/multifil randgraph.py


From: Janne V. Kujala
Subject: [ff-cvs] libvob/vob/demo/multifil randgraph.py
Date: Wed, 27 Aug 2003 06:14:59 -0400

CVSROOT:        /cvsroot/libvob
Module name:    libvob
Branch:         
Changes by:     Janne V. Kujala <address@hidden>        03/08/27 06:14:59

Modified files:
        vob/demo/multifil: randgraph.py 

Log message:
        fix highlighted node selection

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/demo/multifil/randgraph.py.diff?tr1=1.31&tr2=1.32&r1=text&r2=text

Patches:
Index: libvob/vob/demo/multifil/randgraph.py
diff -u libvob/vob/demo/multifil/randgraph.py:1.31 
libvob/vob/demo/multifil/randgraph.py:1.32
--- libvob/vob/demo/multifil/randgraph.py:1.31  Wed Aug 27 04:21:57 2003
+++ libvob/vob/demo/multifil/randgraph.py       Wed Aug 27 06:14:59 2003
@@ -105,6 +105,10 @@
         self.list = GLRen.createCallListCoorded(list)
 
     def putGraph(self, vs, cs, box):
+        #self.N = 24
+        #self.seed = 344239589
+        #self.seed2 = -40716569 
+        
         rng = Random(self.seed)
         N2 = 2*self.N/3
 
@@ -145,13 +149,12 @@
                         nodes2 = filter(lambda y: y["cs"] in x["conns"], nodes)
                     else:
                         nodes2 = nodes1
-                    break
-
-                if self.path2:
-                    nodes2 = filter(lambda y: p2(x, y), nodes1)
                 else:
-                    nodes2 = filter(lambda y: not p2(x, y), nodes1)
-                    
+                    if self.path2:
+                        nodes2 = filter(lambda y: p2(x, y), nodes1)
+                    else:
+                        nodes2 = filter(lambda y: not p2(x, y), nodes1)
+                        
                 if nodes2: break
 
                 nodes0 = filter(lambda y: x != y, nodes0)
@@ -163,16 +166,14 @@
                 y = None
         else:
             x, y = None, None
-                
 
        def pc(conns, cs):
             for node in nodes:
-                if node["conns"]:
-                    if node in [x, y]:
-                        vs.put(getDListNocoords("Color 1 0 0"))
-                    else:
-                        vs.put(getDListNocoords("Color .2 .2 1"))
-                    vs.put(conns, cs + [node["cs"]] + node["conns"])
+                if node in [x, y]:
+                    vs.put(getDListNocoords("Color 1 0 0"))
+                else:
+                    vs.put(getDListNocoords("Color .2 .2 1"))
+                vs.put(conns, cs + [node["cs"]] + node["conns"])
 
             if 0:
                 for node in [x,y]:




reply via email to

[Prev in Thread] Current Thread [Next in Thread]