Fixes #15.
Showing 1 of 4 files from the diff.
src/generic.jl
changed.
Other files ignored by Codecov
@@ -10,6 +10,8 @@
Loading
10 | 10 | 1. `hypercube_dimension` falls back to `dimension`, |
|
11 | 11 | ||
12 | 12 | 2. `logdensity` works through `logdensity_and_gradient` (inefficient, but should not matter) |
|
13 | + | ||
14 | + | 3. `rand` is implemented via `hypercube_transform`. |
|
13 | 15 | """ |
|
14 | 16 | abstract type SamplingLogDensity end |
|
15 | 17 |
@@ -38,6 +40,12 @@
Loading
38 | 40 | """ |
|
39 | 41 | function hypercube_transform end |
|
40 | 42 | ||
43 | + | function Random.rand(rng::Random.AbstractRNG, |
|
44 | + | d::Random.SamplerTrivial{<:SamplingLogDensity}) |
|
45 | + | ℓ = d[] |
|
46 | + | hypercube_transform(ℓ, rand(rng, dimension(ℓ))) |
|
47 | + | end |
|
48 | + | ||
41 | 49 | """ |
|
42 | 50 | $(SIGNATURES) |
|
43 | 51 |
Files | Coverage |
---|---|
src | 98.93% |
Project Totals (5 files) | 98.93% |
3480376047
3480376047
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file.
The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files.
The size and color of each slice is representing the number of statements and the coverage, respectively.