#11606: simplify constraints in linear programs
----------------------------------+-----------------------------------------
   Reporter:  john_perry          |          Owner:  ncohen    
       Type:  enhancement         |         Status:  needs_info
   Priority:  major               |      Milestone:  sage-4.7.2
  Component:  linear programming  |       Keywords:  sd32      
Work_issues:                      |       Upstream:  N/A       
   Reviewer:                      |         Author:  john_perry
     Merged:                      |   Dependencies:            
----------------------------------+-----------------------------------------

Comment(by john_perry):

 Replying to [comment:7 ncohen]:
 > > > This could also be rewritten as an interator to avoid the cost of
 memory...
 > >
 > > I'm not quite following how to do this.
 >
 > Oh. For the moment your patch returns a list of tuples, representing the
 constraints. Instead of that (which requires to build the whole list
 first, then to return it, thus doubling the memory cost), python can
 return the list element by element using the "yield" keyword. This would
 avoid doubling the memory, especially if you just want to check something
 for each constraint returned.

 Are you thinking of #11607 here? This patch only affects the return value
 in one place; it returns `None`, and then only if the constraint is
 redundant.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11606#comment:8>
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.

Reply via email to