diff options
author | Omar Vega Ramos <ovruni@gnu.org.pe> | 2017-05-26 17:57:04 -0500 |
---|---|---|
committer | Omar Vega Ramos <ovruni@gnu.org.pe> | 2017-05-26 17:57:04 -0500 |
commit | d5388c48f362b3f79053d1ba86de2ff197a4dd81 (patch) | |
tree | f555a20d2f544349fd42320a8605c9a640b9c9bc /libre/sagemath/sagemath-planarity3.patch | |
parent | e978b1e8a3df5a0825292157c3ba1ce369883195 (diff) | |
download | abslibre-d5388c48f362b3f79053d1ba86de2ff197a4dd81.tar.gz abslibre-d5388c48f362b3f79053d1ba86de2ff197a4dd81.tar.bz2 abslibre-d5388c48f362b3f79053d1ba86de2ff197a4dd81.zip |
Removing sagemath: This package is in [community] repo
Diffstat (limited to 'libre/sagemath/sagemath-planarity3.patch')
-rw-r--r-- | libre/sagemath/sagemath-planarity3.patch | 113 |
1 files changed, 0 insertions, 113 deletions
diff --git a/libre/sagemath/sagemath-planarity3.patch b/libre/sagemath/sagemath-planarity3.patch deleted file mode 100644 index 607600879..000000000 --- a/libre/sagemath/sagemath-planarity3.patch +++ /dev/null @@ -1,113 +0,0 @@ -Author: Ximin Luo <infinity0@debian.org> -Bug: https://trac.sagemath.org/ticket/21774 ---- -This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ ---- a/sage/src/sage/graphs/planarity.pyx -+++ b/sage/src/sage/graphs/planarity.pyx -@@ -3,13 +3,19 @@ - """ - - cdef extern from "planarity/graph.h": -- ctypedef struct graphNode: -- int v -+ ctypedef struct vertexRec: - int link[2] -- ctypedef graphNode * graphNodeP -+ int index -+ ctypedef vertexRec * vertexRecP -+ -+ ctypedef struct edgeRec: -+ int link[2] -+ int neighbor -+ ctypedef edgeRec * edgeRecP - - ctypedef struct BM_graph: -- graphNodeP G -+ vertexRecP V -+ edgeRecP E - int N - ctypedef BM_graph * graphP - -@@ -93,15 +99,16 @@ - g._pos = { u: [0,0], v: [0,1] } - return (True, None) if kuratowski else True - -- # create to and from mappings to relabel vertices to the set {0,...,n-1} -+ # create to and from mappings to relabel vertices to the set {1,...,n} -+ # (planarity 3 uses 1-based array indexing, with 0 representing NIL) - cdef int i - listto = g.vertices() - ffrom = {} - for vvv in listto: -- ffrom[vvv] = listto.index(vvv) -+ ffrom[vvv] = listto.index(vvv) + 1 - to = {} - for i from 0 <= i < len(listto): -- to[i] = listto[i] -+ to[i + 1] = listto[i] - g.relabel(ffrom) - - cdef graphP theGraph -@@ -125,7 +132,7 @@ - status = gp_Embed(theGraph, EMBEDFLAGS_PLANAR) - gp_SortVertices(theGraph) - -- # use to and from mappings to relabel vertices back from the set {0,...,n-1} -+ # use to and from mappings to relabel vertices back from the set {1,...,n} - g.relabel(to) - - if status == NOTOK: -@@ -134,12 +141,12 @@ - # Kuratowski subgraph isolator - g_dict = {} - from sage.graphs.graph import Graph -- for i from 0 <= i < theGraph.N: -+ for i from 0 < i <= theGraph.N: - linked_list = [] -- j = theGraph.G[i].link[1] -- while j >= theGraph.N: -- linked_list.append(to[theGraph.G[j].v]) -- j = theGraph.G[j].link[1] -+ j = theGraph.V[i].link[1] -+ while j: -+ linked_list.append(to[theGraph.E[j].neighbor]) -+ j = theGraph.E[j].link[1] - if len(linked_list) > 0: - g_dict[to[i]] = linked_list - G = Graph(g_dict) -@@ -153,12 +160,12 @@ - if set_embedding: - emb_dict = {} - #for i in range(theGraph.N): -- for i from 0 <= i < theGraph.N: -+ for i from 0 < i <= theGraph.N: - linked_list = [] -- j = theGraph.G[i].link[1] -- while j >= theGraph.N: -- linked_list.append(to[theGraph.G[j].v]) -- j = theGraph.G[j].link[1] -+ j = theGraph.V[i].link[1] -+ while j: -+ linked_list.append(to[theGraph.E[j].neighbor]) -+ j = theGraph.E[j].link[1] - emb_dict[to[i]] = linked_list - g._embedding = emb_dict - if set_pos: -@@ -174,12 +181,12 @@ - - emb_dict = {} - #for i in range(theGraph.N): -- for i from 0 <= i < theGraph.N: -+ for i from 0 < i <= theGraph.N: - linked_list = [] -- j = theGraph.G[i].link[0] -- while j >= theGraph.N: -- linked_list.append(to[theGraph.G[j].v]) -- j = theGraph.G[j].link[0] -+ j = theGraph.V[i].link[0] -+ while j: -+ linked_list.append(to[theGraph.E[j].neighbor]) -+ j = theGraph.E[j].link[0] - emb_dict[to[i]] = linked_list - g._embedding = emb_dict - gp_Free(&theGraph) |