Skip to content

Releases: gstonge/SamplableSet

C++11 compatibility

26 Apr 19:26
e1a71f8
Compare
Choose a tag to compare
  • Now compatible with C++11.
  • When sampling an empty set, it raises a KeyError instead or returning a
    None. This also affects the behavior of sampling without replacement when
    n_samplesis larger than the set size.
  • Other forbidden operations raises an error as well instead of returning a
    None.

Fix methods for SamplableSet with unspecified type

02 Feb 21:24
63191d0
Compare
Choose a tag to compare

Fixed

  • The __str__ method now works with SamplableSet of unspecified underlying
    type.
  • All C++ methods (e.g. size) raise an error message until the type is
    specified/inferred.

Bugfix for the copy constructor

14 Dec 19:26
ef54a1f
Compare
Choose a tag to compare

Added

  • Bound check-up now gives a more complete output message.

Fixed

  • The copy constructor was missing minimal and maximal weight attributes.

Bound check-up in C++, new empty method

21 Jul 15:22
3941501
Compare
Choose a tag to compare

Added

  • Bound check-up for the weight of elements in C++ (insertion, set weight).
  • New empty method to test if the set is empty.

Changed

  • Bound checking (exception throw) is now mainly done in C++.

Fixed

  • In python, if one checks the weight of an element not in the set, it
    now returns None.

Simpler initialization and c++ static library availability

10 Jul 17:56
Compare
Choose a tag to compare

Added

  • New tuple 2 and 3-tuple of int and str as available cpp_type.
  • A samplable set can be instanciated empty without specifying the cpp_type.
    It will be inferred at the first insertion.

Changed

  • Structure of C++ source files to allow the compilation of a static library.

Fixed

Test for out of bound weight.

Shared RNG

26 Jun 13:27
Compare
Choose a tag to compare

Changed

  • Class name in C++
  • RNG is now a static member of C++ BaseSamplableSet class. This means all
    objects created (irrespective of the C++ type of the set) share the same RNG.

Removed

  • Obsolete C++ type (Edge, DoubleInt, etc.). Only int and str cpp types
    remain.
  • Initialization of the seed for the RNG at construction. Since the RNG now
    belong to the class, it exits without any object created, and it is
    initialized with current time.

Added

A new static member function for the class SamplableSet to seed the RNG.
Seeding the generator influences all ensuing (or existing) sets objects.

Sampling without replacement

25 Jun 02:38
d9a5e21
Compare
Choose a tag to compare
  • Sampling without replacement
  • Sets are seeded with current time instead of a fixed value by default
  • Bugfix compilation on Mac

Bug and warning fix

02 Oct 14:35
014760e
Compare
Choose a tag to compare
  • Compilation warnings fixed by reordering initialization of members in C++
  • Bug fix for C++ object only. There was an error in the assignement operator implementation. This wouldn't cause issue for python only usage, but could lead to memory issues when using the C++ object directly.

Feature : iterator for SamplableSet objects

08 Sep 04:49
Compare
Choose a tag to compare
  • New template declaration function to facilitate the addition of new types in the c++ binder file
  • New default SamplableSet with strings
  • Implemented C++ methods to iterate over all the elements of a set
  • Implemented Python generator/iterator methods
  • SamplableSet objects are now iterable
  • Implemented a bunch of test (uses pytest)

Post-merging with jsleb333 pythonic wrapper

06 Sep 23:23
Compare
Choose a tag to compare

First true release, with a complete python wrapper.