| Anonymous | Login | Signup for a new account | 2013-05-25 21:13 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | |||
| 0003730 | OCaml | OCaml general | public | 2005-07-18 11:54 | 2012-03-24 15:01 | |||
| Reporter | administrator | |||||||
| Assigned To | frisch | |||||||
| Priority | normal | Severity | feature | Reproducibility | always | |||
| Status | closed | Resolution | fixed | |||||
| Platform | OS | OS Version | ||||||
| Product Version | ||||||||
| Target Version | Fixed in Version | |||||||
| Summary | 0003730: Feature wish: Map.S.length, Map.S.max_key, Map.S.min_key | |||||||
| Description | Full_Name: Christoph Bauer Version: 3.08.3 OS: Submission from: 213.68.136.226 (213.68.136.226) Hi, Map.S.length : 'a t -> int would be nice. Should return then number of elements in the given Map. Furthermore: Map.S.max_key : 'a t -> 'a Map.S.min_key : 'a t -> 'a max_key returns the greatest key in the map or raises Invalid_arg for a empty map. This could be done efficiently only with the internal representation of the map. Thanks, Christoph Bauer | |||||||
| Tags | No tags attached. | |||||||
| Attached Files | ||||||||
Notes |
|
|
(0003873) berke (reporter) 2006-12-01 17:33 |
I second this. Indeed, min_key and max_key would come in very handy. These already exist in Set, so could we add those ? Thanks. |
|
(0004169) berke (reporter) 2007-10-06 12:22 edited on: 2007-10-06 12:28 |
Here's a patch adding min_key, max_key, choose_key, choose, length and pairs. The last two could be defined efficiently by the user with fold, however the first three cannot. Also see 0003876 (asks for Map.keys which can be done with fold or the proposed Map.pairs), 0003875 for Map.filter (doable with fold), 0003562 and 0000340 (which asks for Set -like functions), 0001297 which contributes a patch with union, elements, min_elt. I suggest 0001297 be integrated. |
|
(0005509) frisch (developer) 2010-05-25 15:34 |
Rev 10468 introduces new functions that can be used to simulate efficiently the desired functionality (min_binding, max_binding). |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2005-11-18 10:13 | administrator | New Issue | |
| 2006-12-01 17:33 | berke | Note Added: 0003873 | |
| 2007-10-06 12:22 | berke | Note Added: 0004169 | |
| 2007-10-06 12:23 | berke | File Added: ocaml-map-patch.diff | |
| 2007-10-06 12:28 | berke | Note Edited: 0004169 | |
| 2008-01-22 17:06 | doligez | Relationship added | child of 0000340 |
| 2010-05-25 15:34 | frisch | Note Added: 0005509 | |
| 2010-05-25 15:34 | frisch | Status | acknowledged => resolved |
| 2010-05-25 15:34 | frisch | Resolution | open => fixed |
| 2010-05-25 15:34 | frisch | Assigned To | => frisch |
| 2012-03-24 15:01 | xleroy | Status | resolved => closed |
| Copyright © 2000 - 2011 MantisBT Group |