I am trying to generate a repeatable random DenseVector for a number of distributions. For the native Breeze distributions (Gaussian, Uniform), this is what I am doing:
implicit val randBasis = RandBasis.withSeed(2022)
// For uniform
val uniformRandoms = Uniform(20, 40).samplesVector(100)
// For Gaussian:
val normalRandoms = Gaussian(20, 2).samplesVector(100)
But, I am struggling to do the same with Triangular distribution, which is using the Apache distribution behind the scenes. The following line generates a different DenseVector everytime:
val traingularRandoms = new TriangularDistribution(10, 15, 20).samplesVector(100)
On the other hand, if I remove the "new" keyword, then I get the following message:
No implicit arguments of type: TriangularDistribution.Impl3[Double, Double, Double, VR_]
How do I generate the same DenseVector using the same seed for Triangular distribution? Thanks for any pointers.