ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 31 Dec 2018 10:53:04 +0100Sage Floyd algorithm in Cythonhttps://ask.sagemath.org/question/44823/sage-floyd-algorithm-in-cython/Hi
Classical Floyd algorithm computes all shortest path in a **weighted** graph and this algorithm has a $O(n^3)$ complexity (-> it can be slow). So i'm a bit surprised to see that the Cython version provided in Sage works only if `by_weight==False` meaning that all weights are 1 by default (its computes the transitive closure of the graph).
As a consequence, does it mean the only way to compute the "true" all-shortest-path in Sage is by using the pure Python implementation ?elasticaMon, 31 Dec 2018 10:53:04 +0100https://ask.sagemath.org/question/44823/Cython error: ambiguous overloaded methodhttps://ask.sagemath.org/question/10665/cython-error-ambiguous-overloaded-method/Hello all,
I am trying to extend CGraph using C++ containers only to get a cython compile error: `ambiguous overloaded method` on `memset`, `memcopy` and `strlen`. As CGraph uses bitset which I have to manipulate, I need to include `bitset.pxi` and `bitset.pxd.pxi`, so end up with a mix of c and c++ calls for cython to deal with. I am guessing that cython can't decide which `memset` etc calls to use, C++ or C versions.
Does anyone know how I might to resolve this ambiguity?
Regards Martin
QuestorsSun, 27 Oct 2013 09:38:58 +0100https://ask.sagemath.org/question/10665/