Revision 23c7ab1e util/UnitDiskGraph.py

View differences:

util/UnitDiskGraph.py
13 13
        self.nxG.add_nodes_from(range(len(points)))
14 14
        
15 15
        self.gtG = gt.Graph(directed=False)
16
        self.gtG.add_vertex(len(points))
16 17
        self.edge_weights = self.gtG.new_edge_property('float')
17 18
        self.gtG.edge_properties['weight'] = self.edge_weights        
18 19

  
......
43 44
        
44 45
        self.gtG.ep["weight"] = self.gtG.new_edge_property("float")
45 46
        eprops = [self.gtG.ep["weight"]]
46
        self.gtG.add_edge_list(edges, hashed=True, eprops=eprops)
47
        self.gtG.add_edge_list(edges, eprops=eprops)
47 48

  
48 49
    def getGraph(self):
49 50
        return self.gtG, self.nxG

Also available in: Unified diff