This might seem totally overblown -- but already the development of this prototype showed me time and again, that it is warranted. Because it is damn hard to get the probabilities and the mappings to fixed output values correct. After in-depth analysis, I decided completely to abandon the initially chosen approach with the Cap helper, where the user just specifies an upper and lower bound. While this seems compellingly simple at start, it directly lures into writing hard-to-understand code tied to the implementation logic. With the changed approach, most code should get along rather with auto myRule = Draw().probabilty(0.6).maxVal(4); ...which is obviously a thousand times more legible than any kind of tricky modulus expressions with shifted bounds. |
||
|---|---|---|
| .. | ||
| clang-static-init-1.cpp | ||
| clang-static-init-2.cpp | ||
| clang-static-init.hpp | ||
| crash_gdb_jessie-2015-08.sh | ||
| DIR_INFO | ||
| gtk-canvas-experiment.cpp | ||
| gtk-canvas-experiment.hpp | ||
| gtk-canvas-main.cpp | ||
| gtk-style-experiment.cpp | ||
| gtk-style-experiment.css | ||
| SConscript | ||
| try.cpp | ||