#8364: Forward options like "solver" in all the functions using LP
------------------------------------------------------------+---------------
Reporter: ncohen | Owner:
jkantor
Type: enhancement | Status:
needs_review
Priority: critical | Milestone:
sage-4.4.3
Component: graph theory | Keywords:
Author: Nathann Cohen | Upstream: N/A
Reviewer: Harald Schilly, Jason Grout, Minh Van Nguyen | Merged:
Work_issues: |
------------------------------------------------------------+---------------
Changes (by newvalueoldvalue):
* reviewer: schilly => Harald Schilly, Jason Grout, Minh Van Nguyen
* work_issues: rebase on top of #7671, #7854, #7966, #8273, #8273, #8331
=>
* author: => Nathann Cohen
Comment:
Changes in reviewer patch include:
* Some consistency along the lines of
[http://www.python.org/dev/peps/pep-0008/ PEP 008].
* Some documentation fixes.
* Sphinx fixes to get LaTeX markups processed and displayed on the
reference manual.
* Cross reference classes and methods.
Some issues:
* In `graphs/generic_graph.py`, for the method `dominating_set()`, the
following change was made:
{{{
@@ -3941,13 +4002,13 @@
p.set_integer(b)
if value_only:
- return p.solve(objective_only=True,log=log)
- else:
- obj=p.solve(log=log)
+ return p.solve(objective_only=True, solver = solver, log =
verbose)
+ else:
+ obj=p.solve(solver = solver, log = verbose)
b=p.get_values(b)
return [v for v in g.vertices() if b[v]==1]
}}}
And yet from thereon, "obj" isn't used at all. I have changed that to
{{{
p.solve(solver=solver, log=verbose)
}}}
* Remove a redundant import in `graphs/graph.py` in the method `minor()`:
{{{
from sage.sets.set import Set
rs_dict = {}
for h in H:
rs_dict[h] = [v for v in self if rs[h][v]==1]
return rs_dict
}}}
The class `Set` is imported there, but is never used from thereon within
the method.
In short, my reviewer patch is about making the documentation added by
ncohen consistent. Anyone care for a final review?
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8364#comment:18>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.