tpapp / TransformVariables.jl
Showing 4 of 9 files from the diff.
Newly tracked file
src/utilities.jl changed.
Newly tracked file
src/scalar.jl changed.
Newly tracked file
src/generic.jl changed.
Other files ignored by Codecov

@@ -37,37 +37,3 @@
Loading
37 37
end
38 38
39 39
extended_eltype(x::T) where T = extended_eltype(T)
40 -
41 -
####
42 -
#### random values
43 -
####
44 -
45 -
"Shared part of docstrings for keyword arguments of or passed to [`random_reals`](@ref)."
46 -
const _RANDOM_REALS_KWARGS_DOC = """
47 -
A standard multivaritate normal or Cauchy is used, depending on `cauchy`, then scaled with
48 -
`scale`. `rng` is the random number generator used.
49 -
"""
50 -
51 -
_random_reals_scale(rng::AbstractRNG, scale::Real, cauchy::Bool) =
52 -
    cauchy ? scale / abs2(randn(rng)) : scale * 1.0
53 -
54 -
"""
55 -
$(SIGNATURES)
56 -
57 -
Random real number.
58 -
59 -
$(_RANDOM_REALS_KWARGS_DOC)
60 -
"""
61 -
random_real(; scale::Real = 1, cauchy::Bool = false, rng::AbstractRNG = GLOBAL_RNG) =
62 -
    randn(rng) * _random_reals_scale(rng, scale, cauchy)
63 -
64 -
"""
65 -
$(SIGNATURES)
66 -
67 -
Random vector in ``ℝⁿ``.
68 -
69 -
$(_RANDOM_REALS_KWARGS_DOC)
70 -
"""
71 -
random_reals(n::Integer; scale::Real = 1, cauchy::Bool = false,
72 -
             rng::AbstractRNG = GLOBAL_RNG) =
73 -
                 randn(rng, n) .* _random_reals_scale(rng, scale, cauchy)

@@ -18,5 +18,6 @@
Loading
18 18
include("constant.jl")
19 19
include("aggregation.jl")
20 20
include("custom.jl")
21 +
include("deprecated.jl")
21 22
22 23
end # module

@@ -28,8 +28,6 @@
Loading
28 28
29 29
inverse_eltype(t::ScalarTransform, y::T) where {T <: Real} = float(T)
30 30
31 -
random_arg(t::ScalarTransform; kwargs...) = random_real(; kwargs...)
32 -
33 31
####
34 32
#### identity
35 33
####

@@ -1,5 +1,5 @@
Loading
1 1
export dimension, transform, transform_and_logjac, transform_logdensity, inverse, inverse!,
2 -
    inverse_eltype, as, random_arg, random_value
2 +
    inverse_eltype, as
3 3
4 4
###
5 5
### log absolute Jacobian determinant
@@ -282,25 +282,3 @@
Loading
282 282
function inverse(t::VectorTransform, y)
283 283
    inverse!(Vector{inverse_eltype(t, y)}(undef, dimension(t)), t, y)
284 284
end
285 -
286 -
"""
287 -
$(SIGNATURES)
288 -
289 -
A random argument for a transformation.
290 -
291 -
# Keyword arguments
292 -
293 -
$(_RANDOM_REALS_KWARGS_DOC)
294 -
"""
295 -
random_arg(x::VectorTransform; kwargs...) = random_reals(dimension(x); kwargs...)
296 -
297 -
"""
298 -
$(SIGNATURES)
299 -
300 -
Random value from a transformation.
301 -
302 -
# Keyword arguments
303 -
304 -
$(_RANDOM_REALS_KWARGS_DOC)
305 -
"""
306 -
random_value(t::AbstractTransform; kwargs...) = transform(t, random_arg(t; kwargs...))
Files Coverage
src 99.06%
Project Totals (8 files) 99.06%
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.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading