Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#7637 closed enhancement (fixed)

Default dictionary in MixedIntegerLinearProgram

Reported by: ncohen Owned by: jkantor
Priority: major Milestone: sage-4.3
Component: numerical Keywords:
Cc: malb Merged in: sage-4.3.rc1
Authors: Nathann Cohen Reviewers: Martin Albrecht
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description

Martin Albrecht requested this functionality for his code, and it would also simplify mine. For short linear programs, of when some global variables do not require the creation of a new dictionary of variables ( from which only one field would be used ), this trick is good enough !

Nathann

Attachments (1)

trac_7637.patch (1.8 KB) - added by ncohen 10 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 10 years ago by malb

  • try: foo except AttributeError: seems to be favoured in the Python community over hasattr. It is also faster if the attribute does in fact exist.
  • Why do you call __getitem__() instead of using the normal syntax [x]?

comment:2 Changed 10 years ago by ncohen

  • Status changed from new to needs_review

Done !

Changed 10 years ago by ncohen

comment:3 Changed 10 years ago by malb

  • Status changed from needs_review to positive_review

comment:4 Changed 10 years ago by mhansen

  • Authors set to Nathann Cohen
  • Merged in set to sage-4.3.rc1
  • Resolution set to fixed
  • Reviewers set to Martin Albrecht
  • Status changed from positive_review to closed

comment:5 Changed 10 years ago by mhansen

  • Milestone changed from sage-4.3.1 to sage-4.3
Note: See TracTickets for help on using tickets.