You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We use method is_directed_acyclic to find cycles instead of computing shortest paths. This should have been done long ago as it's faster this way.
Before:
sage: D = digraphs.TransitiveTournament(10)
sage: D.add_edges((i+1, i) for i in range(9))
sage: flow = {e: 1 for e in D.edge_iterator(labels=0)}
sage: %time F = D._build_flow_graph(flow, False)
CPU times: user 1.45 ms, sys: 320 µs, total: 1.77 ms
Wall time: 1.55 ms
After:
sage: D = digraphs.TransitiveTournament(10)
sage: D.add_edges((i+1, i) for i in range(9))
sage: flow = {e: 1 for e in D.edge_iterator(labels=0)}
sage: %time F = D._build_flow_graph(flow, False)
CPU times: user 958 µs, sys: 244 µs, total: 1.2 ms
Wall time: 1.02 ms
We use method
is_directed_acyclic
to find cycles instead of computing shortest paths. This should have been done long ago as it's faster this way.Before:
After:
Component: graph theory
Author: David Coudert
Branch/Commit:
0a24c03
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/26941
The text was updated successfully, but these errors were encountered: