Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004489OCamlstandard librarypublic2008-01-23 19:122016-12-07 18:31
Assigned Tofrisch 
PlatformOSOS Version
Product Version3.10.0 
Target VersionFixed in Version4.05.0 +dev/beta1/beta2/beta3/rc1 
Summary0004489: Additional feature for module set
DescriptionI upload a module Myset that contains the Set module plus additional VERY useful functions :

   val max_elt_lt : elt -> t -> elt
return the largest element lower than the first arg
    val min_elt_gt : elt -> t -> elt
return the smallest element greater thant the first arg

The next two function are very useful when the order is only a preorder (when different elements x y are equals using :

    val get_eq : elt -> t -> elt
return the element equals to the first arg if any (or raise Not_found)

    val split_elt : elt -> t -> t * elt option * t
same as split but it returns the element equals to the first arg (if any)

PLEASE, add it to the Set module into the next release :)

Attached Files? file icon myset.tbz2 [^] (4,114 bytes) 2008-01-23 19:12

- Relationships
related to 0000340closedfrisch Implementer dans Map les memes operations que dans Set 

-  Notes
frisch (developer)
2016-12-07 18:31

Set.find_first/find_last in 4.05 can be used to implement easily all these function on the user side. I'm unsure about the actual need for split_elt. If you feel strongly about it, please open a new ticket (or, better, a PR) with more motivation.

- Issue History
Date Modified Username Field Change
2008-01-23 19:12 Christophe New Issue
2008-01-23 19:12 Christophe File Added: myset.tbz2
2008-02-19 15:17 doligez Relationship added related to 0000340
2008-02-19 15:17 doligez Status new => acknowledged
2013-09-04 17:55 doligez Tag Attached: patch
2016-12-07 18:27 shinwell Category OCaml general => OCaml standard library
2016-12-07 18:31 frisch Note Added: 0016788
2016-12-07 18:31 frisch Status acknowledged => resolved
2016-12-07 18:31 frisch Fixed in Version => 4.05.0 +dev/beta1/beta2/beta3/rc1
2016-12-07 18:31 frisch Resolution open => fixed
2016-12-07 18:31 frisch Assigned To => frisch
2017-02-23 16:43 doligez Category OCaml standard library => standard library

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker