Closed jaanos closed 8 years ago
Sorry for the slow review, I'm still trying to make sense of the last block of the algorithm, the one which relies on a DFS.
Is there any reason to keep neighbors
and ignore_direction
in your DFS/BFS routines? You do not use them.
Nathann
OH. Just got it.
Chocolate works wonders.
And I do eat a lot of it.
Nathann
Branch pushed to git repo; I updated commit sha1. New commits:
1ef4e6a | trac #19985: More doc |
Hello Janoš !
I finally understood the last block of code, and updated the doc. I'm setting this to needs_info
pending your answer about the useless parameters of bfs/dfs.
Nathann
Hi!
Is there any reason to keep
neighbors
andignore_direction
in your DFS/BFS routines? You do not use them.
No, you can remove them. They are a remnant of the first commit, when these functions were still in generic_graph.py
.
Janoš
Branch pushed to git repo; I updated commit sha1. New commits:
6eac601 | trac #19985: Remove keywords |
Reviewer: Nathann Cohen
Yo !
If you agree with the branch in its current status, you can set the ticket to positive_review
. Thanks for this code !
Nathan
Branch pushed to git repo; I updated commit sha1. New commits:
5a054a6 | Some more fixes to the doc |
Hi!
I've made some small fixes - nothing critical, so I guess it's OK if I set the ticket to positive_review
. Thanks again for reviewing and writing the documentation!
Janoš
Changed branch from public/19985 to 5a054a6
Thank you all guys!
This ticket adds a method
is_partial_cube
to theGraph
class, which checks whether a graph is a partial cube. A partial cube is a graph that can be isometrically embedded into a hypercube, i.e., its vertices can be labelled with (0,1)-vectors of some fixed length such that the distance between any two vertices in the graph equals the Hamming distance of their labels. If requested, this labelling can also be returned by the method.The code for this method comes from the PADS library by David Eppstein, which is available at http://www.ics.uci.edu/~eppstein/PADS/. The library is available under the MIT license, and I have also obtained permission from the author via email. The algorithm in question has been described in a paper available at http://arxiv.org/pdf/0705.1025.pdf.
The code has been changed to utilize Sage's structures (namely graphs, digraphs and disjoint sets). However, specialized breadth-first and depth-first search methods for graphs from the PADS library have also been added.
CC: @nathanncohen
Component: graph theory
Keywords: graphs partial cubes
Author: Janoš Vidali
Branch:
5a054a6
Reviewer: Nathann Cohen
Issue created by migration from https://trac.sagemath.org/ticket/19985