This is the mail archive of the gsl-discuss@sourceware.org mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Adding multiset functionality atop GSL 1.13


At Mon, 21 Sep 2009 20:38:31 -0500,
Rhys Ulerich wrote:
> Attached is a patch that adds multiset functionality atop GSL 1.13.
> Multisets are like combinations but with replacement-- a single item
> may appear multiple times.  Element order is insignificant and
> enumeration uses lexicographical ordering.
> 
> The patch builds very, very, very heavily on the existing combinations
> code.  Documentation, an example, and unit tests are included.
> Please consider it for inclusion in the next feature release.

Nice work... I've committed the patch.


> P.S. One weakness in the patch the amount of code duplication relative
> to combinations.  The underlying data structures are the same, and
> only the _init_first, _init_last, _valid, _next, and _prev functions
> differ in a non-trivial way.  With some thought to naming, multisets
> could be a combinations-with-replacement flag.  If you accept the
> patch, please consider adding a TODO to both directories to merge the
> functionality.

Done.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]