248. An undirected graph's edges() gives the end first in V as u (2026-11-22)
- Decision.
Graph.edges()yieldsEdge(e, u, v)with the ends as built forGraph.directed, and withuthe end that comes first inVforGraph.undirected. Case:spec/conformance/std-graph/edges-undirected-ends-in-v-order.cp. - Why. The doc said "as given to the build", but
Graph.undirectedstores the arcsu -> vandv -> ufor each edge and nothing else, so edges(1, 0)and(0, 1)build equal graphs and the order can't be recovered. Keeping it would cost a stored bit or end per edge in every undirected graph, for a method no port or spec chapter calls. - Reverse. Store each edge's
u(or an orientation bit) inGraphat build, haveedges()read it, and make the case expect0 1 0.