# HG changeset patch
# User Yann Laigle-Chapuy <yannlaiglechapuy@gmail.com>
# Date 1268147196 -3600
# Node ID 9493d7e861c40b7be12260999bbdc5047aad30d4
# Parent 4485d8f9d1fc2b733a4f2bd8e2215f01206682e0
trac 8406-doctests
diff -r 4485d8f9d1fc -r 9493d7e861c4 sage/graphs/base/c_graph.pyx
|
a
|
b
|
|
| 631 | 631 | Returns an int representing the arbitrary hashable vertex u (whether or not |
| 632 | 632 | u is actually in the graph), or -1 if a new association must be made for u |
| 633 | 633 | to be a vertex. |
| | 634 | |
| | 635 | TESTS: |
| | 636 | |
| | 637 | We check that the bug described in #8406 is gone:: |
| | 638 | |
| | 639 | sage: G=Graph() |
| | 640 | sage: R.<a>=GF(3**3) |
| | 641 | sage: S.<x>=R[] |
| | 642 | sage: G.add_vertex(a**2) |
| | 643 | sage: G.add_vertex(x) |
| | 644 | sage: G.vertices() |
| | 645 | [a^2, x] |
| | 646 | |
| 634 | 647 | """ |
| 635 | 648 | if u in vertex_ints: |
| 636 | 649 | return vertex_ints[u] |