Hi Tiago,

I managed to get a self contained example. The strange behaviour appears when filtering/unfiltering between the moment I update the edge list propertymap and the moment I query this list.

Here's the code:

https://gist.github.com/glyg/2005df62820d35e7efe4


And here's the output:


*********************************
gt version:
 2.2.35 (commit c32ffd6c, Thu Sep 11 16:39:47 2014 +0200)

sytem info:
 3.4.1 |Anaconda 2.1.0 (64-bit)| (default, Sep 10 2014, 17:10:18)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)]
*********************************
A simple graph:

<Graph object, undirected, with 400 vertices and 1121 edges at 0x7fe8ad23fa58>
Filtered graph has 200 vertices
vertex 0 neighbours: ['(0, 21)', '(0, 20)']
Looking for (0, 21) in the neighbours:
 False
Looking for (0, 21) in the neighbours:
 True



Le 14/10/2014 08:59, Tiago de Paula Peixoto a écrit :
On 12.10.2014 16:19, Guillaume Gay wrote:
Here is maybe a code snippet demonstrating what I can't understand:

|>>> j_e = eptm.graph.edge(4747, 2693)

print('looking for: {}'.format(j_e))
looking for: (4747, 2693)
## List of edges we're looking in:''')
for e in eptm.cells.junctions[mother_cell]:
    print(e)
(4747, 2693) (4747, 2692) (980, 2693) (4989, 980) (4989, 4990) (4990, 2692)
print('\n Is {} in the list? {}'.format(
     j_e, j_e in eptm.cells.junctions[mother_cell]))
Is (4747, 2693) in the list? False|

Here, |eptm| and |eptm.cells| are just container classes, and 
|eptm.cells.junctions| is a dictionary with the graphs vertices as keys.
Well, I can't reproduce this:

       >>> l = [g.edge(76, 62)]
       >>> g.edge(76, 62) in l
       True

Are you sure your list contains Edge instances, and not tuples?

Unfortunately, without a self-contained example, I cannot investigate
further.

Best,
Tiago



_______________________________________________
graph-tool mailing list
[email protected]
http://lists.skewed.de/mailman/listinfo/graph-tool

_______________________________________________
graph-tool mailing list
[email protected]
http://lists.skewed.de/mailman/listinfo/graph-tool

Reply via email to