alan-turing-institute / PDSampler.jl

Piecewise Deterministic Sampler library (Bouncy particle sampler, Zig Zag sampler, ...)
Other
33 stars 8 forks source link

add possibility to index factors by key value #2

Closed tlienart closed 7 years ago

tlienart commented 7 years ago

[migrated from private repo]

At the moment factors are indexed from 1 to K where K is the number of factor.

In some cases, there may be another indexing which the user may want to use. For example if the factors correspond to entries of a matrix, it's more convenient to refer to a factor using a tuple (i,j).

In order to do that the only thing we care about is to have a mapping from key to index. So I don't think it's necessary to modify Factor

I believe this should be rather easy to do although it's late and I need to think a bit more carefully about it.

tlienart commented 7 years ago

this is not relevant anymore as per PMF example.