@@ -150,6 +150,7 @@ mutable struct DFGVariable <: AbstractDFGVariable
150
150
smallData:: Dict{String, String}
151
151
bigData:: Dict{Symbol, AbstractBigDataEntry}
152
152
solvable:: Int
153
+ solveCount:: Int
153
154
_internalId:: Int64
154
155
end
155
156
@@ -166,14 +167,14 @@ function DFGVariable(label::Symbol, _internalId::Int64 = 0) #where {T <:Inferenc
166
167
Dict {Symbol, MeanMaxPPE} (),
167
168
Dict {Symbol, VariableNodeData{T}} (:default => VariableNodeData ()),
168
169
Dict {String, String} (),
169
- Dict {Symbol,AbstractBigDataEntry} (), 0 , _internalId)
170
+ Dict {Symbol,AbstractBigDataEntry} (), 0 , 0 , _internalId)
170
171
end
171
172
DFGVariable (label:: Symbol , softtype:: T , _internalId:: Int64 = 0 ) where {T <: InferenceVariable } =
172
173
DFGVariable (label, now (), Symbol[],
173
174
Dict {Symbol, MeanMaxPPE} (),
174
175
Dict {Symbol, VariableNodeData{T}} (:default => VariableNodeData {T} ()),
175
176
Dict {String, String} (),
176
- Dict {Symbol,AbstractBigDataEntry} (), 0 , _internalId)
177
+ Dict {Symbol,AbstractBigDataEntry} (), 0 , 0 , _internalId)
177
178
178
179
"""
179
180
$(SIGNATURES)
@@ -184,7 +185,7 @@ mutable struct DFGVariableSummary <: AbstractDFGVariable
184
185
timestamp:: DateTime
185
186
tags:: Vector{Symbol}
186
187
ppeDict:: Dict{Symbol, <:AbstractPointParametricEst}
187
- softtypename:: Symbol
188
+ softtypename:: Symbol # should be removed
188
189
_internalId:: Int64
189
190
end
190
191
@@ -273,8 +274,38 @@ TODO, DO NOT USE v.softtypename in DFGVariableSummary
273
274
"""
274
275
getSofttype (v:: DFGVariableSummary ):: Symbol = v. softtypename
275
276
277
+ """
278
+ $SIGNATURES
279
+
280
+ Get the number of times a variable has been inferred -- i.e. `solveCount`.
276
281
282
+ Related
283
+
284
+ isSolved, setSolved!
285
+ """
286
+ getSolved (v:: VariableDataLevel2 ) = v. solveCount
277
287
288
+ """
289
+ $SIGNATURES
290
+
291
+ Boolena on whether the variable has been solved.
292
+
293
+ Related
294
+
295
+ getSolved, setSolved!
296
+ """
297
+ isSolved (v:: VariableDataLevel2 ):: Bool = 0 < getSolved (v)
298
+
299
+ """
300
+ $SIGNATURES
301
+
302
+ Update/set the `solveCount` value.
303
+
304
+ Related
305
+
306
+ getSolved, isSolved
307
+ """
308
+ setSolved! (v:: VariableDataLevel2 , val:: Int ) = v. solveCount = val
278
309
279
310
"""
280
311
$SIGNATURES
0 commit comments