#16714: Add a matrix of constraints in a LP
-------------------------------------+-------------------------------------
Reporter: ncohen | Owner:
Type: enhancement | Status: new
Priority: major | Milestone: sage-6.3
Component: linear | Resolution:
programming | Merged in:
Keywords: | Reviewers:
Authors: | Work issues:
Report Upstream: N/A | Commit:
Branch: | 04f9ce174c2c7f9b205dfb1d5ef67710d9553f15
u/vbraun/add_a_matrix_of_constraints_in_a_lp| Stopgaps:
Dependencies: |
-------------------------------------+-------------------------------------
Comment (by vbraun):
I've added a Parent for MIPVariables, this allows for matrix
multiplication to work from both sides:
{{{
sage: p = MixedIntegerLinearProgram()
sage: v = p.new_variable()
sage: m = matrix([[1,2], [3,4]])
sage: v * m
(3.0, 4.0)*x_1 + (1.0, 2.0)*x_0
sage: m * v
(2.0, 4.0)*x_1 + (1.0, 3.0)*x_0
}}}
The parent must refer back to the mip so there is a reference cycle
(#12616). Deal with it...
--
Ticket URL: <http://trac.sagemath.org/ticket/16714#comment:19>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.