Opened 8 years ago
Closed 8 years ago
#13691 closed enhancement (fixed)
Graph.has_homomorphism_to
Reported by: | ncohen | Owned by: | jason, ncohen, rlm |
---|---|---|---|
Priority: | major | Milestone: | sage-5.6 |
Component: | graph theory | Keywords: | |
Cc: | Merged in: | sage-5.6.beta2 | |
Authors: | Nathann Cohen | Reviewers: | Volker Braun |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | #13784 | Stopgaps: |
Description (last modified by )
This ticket adds a function that just checks whether there exists a homomorphism from the given graph to another one.
The classical LP patch :-)
Nathann
Apply trac_13691.patch, trac_13691_Sum.patch
Attachments (2)
Change History (17)
comment:1 Changed 8 years ago by
- Status changed from new to needs_review
comment:2 Changed 8 years ago by
comment:3 Changed 8 years ago by
Also, needs to be rebased for #12091 (which is in sage-5.5.rc0)
comment:4 Changed 8 years ago by
- Status changed from needs_review to needs_work
Oh... Right.. Sage-5-5.rc0 is when all my LP code breaks :-/
comment:5 Changed 8 years ago by
Hey, I just applied it on 5.5.rc0 and nothing bad happens. What do you think needs to be rebased ? O_o
Nathann
comment:6 Changed 8 years ago by
Did you run doctests for sage/graphs/graph.py
? They do fail on the patchbot.
comment:7 Changed 8 years ago by
ahahahah.
Yeah, of course... I saw that the first file modified was generic_graph (ony whitespaces, of course :-P
) and all tests passed, of course.
Ok, so it backfired. I won't play with whitespaces anymore :-P
Nathann
comment:8 Changed 8 years ago by
- Status changed from needs_work to needs_review
Ok, patch updated... But I don't get something : how come the error was
File "mip.pyx", line 2083, in sage.numerical.mip.Sum (sage/numerical/mip.c:10864) File "element.pyx", line 332, in sage.structure.element.Element.__getattr__ (sage/structure/element.c:3523) File "misc.pyx", line 204, in sage.structure.misc.getattr_from_other_class (sage/structure/misc.c:1509) AttributeError: 'sage.numerical.linear_functions.LinearFunction' object has no attribute 'sum'
(hence it came from the Sum function, hence the function still exists in Sage and can be imported) while it cannot be used with the new variables ? Why does it still exist after all your patches to replace the LP's symbolics ? O_o
Nathann
comment:9 Changed 8 years ago by
The capital-s Sum
is still there, its just deprecated. Though there is a bug in it that apparently went unnoticed. I'll attach a patch.
comment:10 Changed 8 years ago by
- Description modified (diff)
- Reviewers set to Volker Braun
- Status changed from needs_review to positive_review
Positive review.
comment:11 Changed 8 years ago by
Thaaaaaaaaaaaaanks !!
comment:12 Changed 8 years ago by
- Milestone changed from sage-5.5 to sage-5.6
comment:13 Changed 8 years ago by
- Dependencies set to #13784
- Status changed from positive_review to needs_work
This patch conflicts with #13784. This one should be rebased.
comment:14 Changed 8 years ago by
- Status changed from needs_work to positive_review
Patch updated !
Nathann
Changed 8 years ago by
comment:15 Changed 8 years ago by
- Merged in set to sage-5.6.beta2
- Resolution set to fixed
- Status changed from positive_review to closed
Lots of unnecessary whitespace changes in graphs/generic_graph.py