I am trying to simulate something like a Markov chain and using a discrete distribution to simulate a change in the state of s_i to s_j. But, of course, this is a Matrix, not a vector. So I try.
std::vector <uint16_t> v {{...}, {...}, ... {...},}; std::vector <std::discrete_distribution <uint16_t> > distr(n, std::distribution <uint16_t> (v.begin(), v.end()) );
but it does not work.
note: if i try only 1 vector, this is uint16_t work vector
// CHANGE v by v[0] std::vector<std::discrete_distribution <uint64_t>> distr(1, std::discrete_distribution <uint64_t> (vecs[0].begin(), vecs[0].end()));
based on this answer
I know that
std::vector <std::discrete_distribution <uint16_t> > distr(n, std::distribution <uint16_t> (v.begin(), v.end()) );
wrong, but I'm talking about changing v1-v. To demonstrate that it is possible to use a vector of discrete distributions
source share