Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

longest_path broken for digraphs #13019

Closed
mwhansen opened this issue May 26, 2012 · 8 comments
Closed

longest_path broken for digraphs #13019

mwhansen opened this issue May 26, 2012 · 8 comments

Comments

@mwhansen
Copy link
Contributor


sage: g = graphs.CompleteGraph(5).to_directed()
sage: g.longest_path(s=1,t=2)
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
/home/mike/src/Imaging-1.1.7/<ipython-input-88-bddf7e1e9edc> in <module>()
----> 1 g.longest_path(s=Integer(1),t=Integer(2))

/opt/sage/local/lib/python2.6/site-packages/sage/graphs/generic_graph.pyc in longest_path(self, s, t, use_edge_labels, algorithm, solver, verbose)
   4772             (s is not None and (
   4773                     (s not in self) or
-> 4774                     (self._directed and self.degree_out(s) == 0) or
   4775                     (not self._directed and self.degree(s) == 0))) or
   4776             (t is not None and (

AttributeError: 'DiGraph' object has no attribute 'degree_out'

Apply trac_13019.patch

Component: graph theory

Keywords: sd40.5

Author: Nathann Cohen

Reviewer: Mike Hansen

Merged: sage-5.1.beta5

Issue created by migration from https://trac.sagemath.org/ticket/13019

@nathanncohen
Copy link
Mannequin

nathanncohen mannequin commented May 26, 2012

comment:1

Oh, right... We updated degree_out later on, and it looks like we did not add a doctest for digraphs :-)

Nathann

@nathanncohen
Copy link
Mannequin

nathanncohen mannequin commented May 28, 2012

comment:2

Attachment: trac_13019.patch.gz

Here it is ! :-)

Nathann

@nathanncohen nathanncohen mannequin added the s: needs review label May 28, 2012
@mwhansen
Copy link
Contributor Author

Reviewer: Mike Hansen

@mwhansen
Copy link
Contributor Author

Author: Nathann Cohen

@mwhansen

This comment has been minimized.

@mwhansen
Copy link
Contributor Author

Changed keywords from none to sd40.5

@mwhansen
Copy link
Contributor Author

comment:4

Looks good to me.

@jdemeyer
Copy link

Merged: sage-5.1.beta5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants