Sampling from a discrete probability distribution in C++

前端 未结 5 572
故里飘歌
故里飘歌 2021-01-06 04:47

I am new to C++ and extremely surprised by the lack of accessible, common probability manipulation tools (i.e. the lack of things in Boost and the standard library). I\'ve d

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-06 05:11

    You should do less C++ bashing, and more question asking - we try to be helpful and respectful on SO. Questions like yours are often tagged as inflammatory.

    Boost::math seems to provide exactly what you're looking for: https://www.quantnet.com/cplusplus-statistical-distributions-boost/ - I'm not 100% sure about how well it handles multi-variate distributions though (nor am I an expert on statistics).

    Get it here: http://www.boost.org/doc/libs/1_49_0/libs/math/doc/html/index.html

提交回复
热议问题