MikeLing commented on this pull request.


> @@ -56,26 +56,34 @@ class DiscreteDistribution
    * @param numObservations Number of possible observations this distribution
    *    can have.
    */
-  DiscreteDistribution(const size_t numObservations) :
-      probabilities(arma::ones<arma::vec>(numObservations) / numObservations)
-  { /* nothing to do */ }
+  DiscreteDistribution(const size_t numObservations, const size_t dimension=1):
+          probabilities(dimension, numObservations)
+  {
+    probabilities.ones();

Hi @rcurtin, Could I define and init a matrix like this? Why this failed and I 
also can't use `probabilities.set_size(dimension, numObservations)`? 

I had google it but it doesn't help. I have no idea how to use `arma:mat `class 
even after I read some documents about it.

Thank you

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/pull/830#pullrequestreview-14170953
_______________________________________________
mlpack mailing list
[email protected]
http://knife.lugatgt.org/cgi-bin/mailman/listinfo/mlpack

Reply via email to