Making mir.random.ndvariable.multivariateNormalVar create bigger data sets than 2
Nathan S.
no.public.email at example.com
Tue Feb 27 17:24:22 UTC 2018
On Tuesday, 27 February 2018 at 16:42:00 UTC, Nathan S. wrote:
> On Tuesday, 27 February 2018 at 15:08:42 UTC, jmh530 wrote:
>> Nevertheless, it probably can't hurt to file an issue if you
>> can't get something like the first one to work. I would think
>> it should just work.
>
> The problem is that `mir.random.ndvariable` doesn't satisfy
> `mir.random.variable.isRandomVariable!T`. ndvariables have a
> slightly different interface from variables: instead of of
> `rv(gen)` returning a result, `rv(gen, dst)` writes to dst. I
> agree that the various methods for working with variables
> should be enhanced to work with ndvariables.
So, I see that the interface will have to be slightly different
for ndvariable than for variable. With the exception of
MultivariateNormalVariable, the same ndvariable instance can be
called to fill output of any length "n", so one can't
meaningfully create a range based on just the ndvariable without
further specification. What would "front" return? For
MultivariateNormalVariable "n" is constrained but it is a runtime
parameter rather than a compile-time parameter.
You'll want to ping @9il / Ilya Yaroshenko to discuss what the
API should be like for this.
More information about the Digitalmars-d-learn
mailing list