Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
trac #17474 adding double edges when non-generic form
Browse files Browse the repository at this point in the history
  • Loading branch information
Frédéric Chapoton committed Dec 16, 2014
1 parent 887a2d1 commit 37a6f28
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/sage/geometry/polyhedron/base.py
Expand Up @@ -3290,7 +3290,10 @@ def vertex_digraph(self, f, increasing=False):
- ``increasing`` -- boolean (default ``False``) whether to orient
edges in the increasing direction instead.
By default, an edge is oriented from `v` to `w` if `f(v-w) > 0`.
By default, an edge is oriented from `v` to `w` if
`f(v-w) \geq 0`.
If `f(v)=f(w)`, then two opposite edges are created.
EXAMPLES::
Expand All @@ -3309,7 +3312,7 @@ def vertex_digraph(self, f, increasing=False):
for j in range(self.n_vertices()):
vj = self.Vrepresentation(j)
for vi in vj.neighbors():
if (vi.vector() - vj.vector()).dot_product(f) > 0:
if (vi.vector() - vj.vector()).dot_product(f) >= 0:
dg.add_edge(vi, vj)
return dg

Expand Down

0 comments on commit 37a6f28

Please sign in to comment.