summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Chapoton <chapoton@math.univ-lyon1.fr>2018-03-01 11:31:05 +0100
committerFrédéric Chapoton <chapoton@math.univ-lyon1.fr>2018-03-01 11:31:05 +0100
commit067ee5631df7353d9fabec160ed85f6f112a0e93 (patch)
treefaa6d69c13f5b609b0029b314ae9933bfdefc759
parentnew methods for Tamari interval-posets (diff)
another code detail in interval-posets
-rw-r--r--src/sage/combinat/interval_posets.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/sage/combinat/interval_posets.py b/src/sage/combinat/interval_posets.py
index 4f3eda5..abe04f5 100644
--- a/src/sage/combinat/interval_posets.py
+++ b/src/sage/combinat/interval_posets.py
@@ -2497,11 +2497,12 @@ class TamariIntervalPoset(Element):
12
"""
G = self.poset().hasse_diagram()
- for x in G:
+ n = self.size()
+ for x in range(2, n):
nx = G.neighbors_out(x)
nx.append(x)
y = min(nx)
- if y < x and any(z > x for z in G.neighbors_out(y)):
+ if y < x and any(z > x for z in G.neighbor_out_iterator(y)):
return False
return True