/
distributions.jl
73 lines (58 loc) · 2.04 KB
/
distributions.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
"""
FVectorvariate
Structure that subtypes `VariateForm`, indicating that a single sample
is a vector from a fiber of a vector bundle.
"""
struct FVectorvariate <: VariateForm end
"""
FVectorSupport(space::Manifold, VectorBundleFibers)
Value support for vector bundle fiber-valued distributions (values from a fiber of a vector
bundle at a `point` from the given manifold).
For example used for tangent vector-valued distributions.
"""
struct FVectorSupport{TSpace<:VectorBundleFibers,T} <: ValueSupport
space::TSpace
point::T
end
"""
FVectorDistribution{TSpace<:VectorBundleFibers, T}
An abstract distribution for vector bundle fiber-valued distributions (values from a fiber
of a vector bundle at point `x` from the given manifold).
For example used for tangent vector-valued distributions.
"""
abstract type FVectorDistribution{TSpace<:VectorBundleFibers,T} <:
Distribution{FVectorvariate,FVectorSupport{TSpace,T}} end
"""
MPointvariate
Structure that subtypes `VariateForm`, indicating that a single sample
is a point on a manifold.
"""
struct MPointvariate <: VariateForm end
"""
MPointSupport(M::Manifold)
Value support for manifold-valued distributions (values from given
[`Manifold`](@ref) `M`).
"""
struct MPointSupport{TM<:Manifold} <: ValueSupport
manifold::TM
end
"""
MPointDistribution{TM<:Manifold}
An abstract distribution for points on manifold of type `TM`.
"""
abstract type MPointDistribution{TM<:Manifold} <:
Distribution{MPointvariate,MPointSupport{TM}} end
"""
support(d::FVectorDistribution)
Get the object of type `FVectorSupport` for the distribution `d`.
"""
function Distributions.support(::T) where {T<:FVectorDistribution}
return error("support not implemented for type $T")
end
@decorator_transparent_signature normal_tvector_distribution(
M::AbstractDecoratorManifold,
p,
σ,
)
@decorator_transparent_signature projected_distribution(M::AbstractDecoratorManifold, d, p)
@decorator_transparent_signature projected_distribution(M::AbstractDecoratorManifold, d)