Skip to content

Commit 6dd3cad

Browse files
committed
add docs detail on VND
1 parent 702bd02 commit 6dd3cad

File tree

1 file changed

+38
-11
lines changed

1 file changed

+38
-11
lines changed

src/entities/DFGVariable.jl

Lines changed: 38 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,32 +17,63 @@ Fields:
1717
$(TYPEDFIELDS)
1818
"""
1919
Base.@kwdef mutable struct VariableNodeData{T<:InferenceVariable, P}
20+
"""
21+
Globally unique identifier.
22+
"""
2023
id::Union{UUID, Nothing} = nothing # If it's blank it doesn't exist in the DB.
24+
"""
25+
Vector of on-manifold points used to represent a ManifoldKernelDensity (or parametric) belief.
26+
"""
2127
val::Vector{P}
28+
"""
29+
Common kernel bandwith parameter used with ManifoldKernelDensity, and as legacy also stores covariance until a dedicated field is created for parametric case.
30+
"""
2231
bw::Matrix{Float64} = zeros(0,0)
2332
BayesNetOutVertIDs::Vector{Symbol} = Symbol[]
24-
dimIDs::Vector{Int} = Int[] # Likely deprecate
33+
dimIDs::Vector{Int} = Int[] # TODO Likely deprecate
2534

2635
dims::Int = 0
36+
"""
37+
Flag used by junction (Bayes) tree construction algorith to know whether this variable has yet been included in the tree construction.
38+
"""
2739
eliminated::Bool = false
2840
BayesNetVertID::Symbol = :NOTHING # Union{Nothing, }
2941
separator::Vector{Symbol} = Symbol[]
30-
42+
"""
43+
Variables each have a type, such as Position1, or RoME.Pose2, etc.
44+
"""
3145
variableType::T
46+
"""
47+
False if initial numerical values are not yet available or stored values are not ready for further processing yet.
48+
"""
3249
initialized::Bool = false
3350
"""
34-
Replacing previous `inferdim::Float64`, new `.infoPerCoord::Vector{Float64}` will in
35-
future stores the amount information (per measurement dimension) captured in each
36-
coordinate dimension.
51+
Stores the amount information (per measurement dimension) captured in each coordinate dimension.
3752
"""
3853
infoPerCoord::Vector{Float64} = Float64[0.0;]
54+
"""
55+
Should this variable solveKey be treated as marginalized in inference computations.
56+
"""
3957
ismargin::Bool = false
40-
58+
"""
59+
Shoudl this variable solveKey always be kept fluid and not be automatically marginalized.
60+
"""
4161
dontmargin::Bool = false
62+
"""
63+
Convenience flag on whether a solver is currently busy working on this variable solveKey.
64+
"""
4265
solveInProgress::Int = 0
66+
"""
67+
How many times has a solver updated this variable solveKey estimte.
68+
"""
4369
solvedCount::Int = 0
70+
"""
71+
solveKey identifier associated with thsi VariableNodeData object.
72+
"""
4473
solveKey::Symbol
45-
74+
"""
75+
Future proofing field for when more multithreading operations on graph nodes are implemented, these conditions are meant to be used for atomic write transactions to this VND.
76+
"""
4677
events::Dict{Symbol,Threads.Condition} = Dict{Symbol,Threads.Condition}()
4778
#
4879
end
@@ -62,10 +93,6 @@ function VariableNodeData(variableType::T; solveKey::Symbol=:default) where T <:
6293
bw = zeros(0,0)
6394
# bw[1] = zeros(getDimension(T))
6495
VariableNodeData(; val, bw, solveKey, variableType )
65-
# VariableNodeData( nothing, P0, BW, Symbol[], Int[],
66-
# 0, false, :NOTHING, Symbol[],
67-
# variableType, false, [0.0], false,
68-
# false, 0, 0, solveKey )
6996
end
7097

7198

0 commit comments

Comments
 (0)