PySDD icon indicating copy to clipboard operation
PySDD copied to clipboard

Fix srand "bug" for random vtrees

Open RenatoGeh opened this issue 4 years ago • 0 comments

The original SDD library includes an srand(time(NULL)) call at each random vtree construction. This causes a bug where, if multiple random vtrees are to be created in the space of less than a second, they all result in the same vtree, as subsequent calls to new_random_vtree set the same seed every time.

This patchset addresses two issues. The first is a simple addition to setup.cfg. setup.py explicitly calls for python build_ext --inplace to be run for building. By adding an additional entry to setup.cfg, we guarantee every run of python build corresponds to build_ext --inplace. The second is recompiling the C libraries without the offending line to address the issue stated above.

An additional change is adding an AUR package for Arch Linux users entry to the Installation section of the README.

RenatoGeh avatar Apr 26 '20 15:04 RenatoGeh