-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathExportAPI.jl
More file actions
389 lines (340 loc) · 8.02 KB
/
ExportAPI.jl
File metadata and controls
389 lines (340 loc) · 8.02 KB
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
# the IncrementalInference API
# reexport
export ℝ, AbstractManifold
export Identity, hat , vee, ArrayPartition, exp!, exp, log!, log
# common groups -- preferred defaults at this time.
export TranslationGroup, RealCircleGroup
# common non-groups -- TODO still teething problems to sort out in IIF v0.25-v0.26.
export Euclidean, Circle
# DFG SpecialDefinitions
export AbstractDFG,
getSolverParams,
GraphsDFG,
LocalDFG,
findShortestPathDijkstra,
isPathFactorsHomogeneous,
getSolvedCount,
isSolved,
setSolvedCount!,
listSupersolves,
listSolveKeys,
cloneSolveKey!,
diagm,
listBlobEntries,
FolderStore,
addBlobStore!,
addData!,
addBlob!,
getData,
DFGVariable,
DFGVariableSummary,
DFGFactor,
DFGFactorSummary,
deleteVariableSolverData!
# listDataBlobs # ERROR: LightDFG{} doesn't override 'listDataBlobs'.
# Inference types
export AbstractPackedFactor, AbstractFactor
export AbstractPrior, AbstractRelative
export AbstractRelativeMinimize, AbstractManifoldMinimize
# not sure if this is necessary
export convert, *
export CSMHistory,
# getTreeCliqsSolverHistories,
AbstractBayesTree,
BayesTreeNodeData,
PackedBayesTreeNodeData,
# state machine methods
StateMachine,
exitStateMachine,
print,
getGraphFromHistory,
getCliqSubgraphFromHistory,
sandboxStateMachineStep,
# draw and animate state machine
getStateLabel,
histStateMachineTransitions,
histGraphStateMachineTransitions,
drawStateTransitionStep,
drawStateMachineHistory,
animateStateMachineHistoryByTime,
animateStateMachineHistoryByTimeCompound,
animateCliqStateMachines,
makeCsmMovie,
areSiblingsRemaingNeedDownOnly,
# general types for softtyping of variable nodes
BeliefArray,
VariableStateType,
ContinuousScalar,
SamplableBelief,
PackedBelief,
Prior,
PackedPrior,
MsgPrior,
PackedMsgPrior,
PartialPrior,
PackedPartialPrior,
ls2,
# lsRear,
# from DFG
ls,
lsf,
listVariables,
listFactors,
exists,
sortDFG,
getLabel,
getVariables,
getVariableOrder,
getPPE,
getPPEDict,
getVariablePPE,
isVariable,
isFactor,
getFactorType,
getSofttype,
getVariableType,
getLogPath,
joinLogPath,
lsfPriors,
isPrior,
lsTypes,
lsfTypes,
findClosestTimestamp,
printVariable,
printFactor,
getTimestamp,
deepcopyGraph,
deepcopyGraph!,
copyGraph!,
getSolverData,
getTags,
# using either dictionary or cloudgraphs
FunctionNodeData,
PackedFunctionNodeData, # moved to DFG
normalfromstring,
categoricalfromstring,
# extractdistribution,
SolverParams,
getSolvable,
setSolvable!,
addVariable!,
deleteVariable!,
addFactor!,
deleteFactor!,
addMsgFactors!,
deleteMsgFactors!,
factorCanInitFromOtherVars,
doautoinit!,
initVariable!,
initVariableManual!,
resetInitialValues!,
resetInitValues!,
# asyncTreeInferUp!,
# initInferTreeUp!,
solveCliqWithStateMachine!,
resetData!,
resetTreeCliquesForUpSolve!,
resetFactorGraphNewTree!,
setVariableInitialized!,
setVariableInferDim!,
resetVariable!,
getFactor,
getFactorDim,
getVariableDim,
getVariable,
getCliqueData,
setCliqueData!,
getManifold, # new Manifolds.jl based operations
getVal,
getBW,
setVal!,
getNumPts,
getBWVal,
setBW!,
setBelief!,
setValKDE!,
buildCliqSubgraph,
#
isPartial,
isInitialized,
isTreeSolved,
isUpInferenceComplete,
isCliqInitialized,
isCliqUpSolved,
areCliqVariablesAllInitialized,
ensureSolvable!,
initAll!,
cycleInitByVarOrder!,
BayesTree,
MetaBayesTree,
TreeBelief,
LikelihoodMessage,
initfg,
buildSubgraph,
buildCliqSubgraph!,
transferUpdateSubGraph!,
getEliminationOrder,
buildBayesNet!,
buildTree!,
buildTreeReset!,
buildCliquePotentials,
getCliqDepth,
getTreeAllFrontalSyms,
getTreeCliqUpMsgsAll,
childCliqs,
getChildren,
parentCliq,
getParent,
getCliqSiblings,
getNumCliqs,
getBelief,
CliqStateMachineContainer,
solveCliqUp!,
solveCliqDown!,
fifoFreeze!,
#functors need
preambleCache,
getSample,
sampleFactor!,
sampleFactor,
#Visualization
drawGraph,
drawGraphCliq,
drawCliqSubgraphUpMocking,
drawTree,
drawTreeAsyncLoop,
# Bayes (Junction) Tree
evalFactor,
calcProposalBelief,
approxConvBelief,
approxConv,
# more debugging tools
localProduct,
treeProductUp,
approxCliqMarginalUp!,
dontMarginalizeVariablesAll!,
unfreezeVariablesAll!,
resetVariableAllInitializations!,
isMarginalized,
setMarginalized!,
isMultihypo,
getMultihypoDistribution,
getHypothesesVectors,
# weiged sampling
AliasingScalarSampler,
rand!,
rand,
fastnorm,
# Factor operational memory
CommonConvWrapper,
CalcFactor,
getCliqVarInitOrderUp,
getCliqNumAssocFactorsPerVar,
# user functions
propagateBelief,
getCliqMat,
getCliqAssocMat,
getCliqMsgMat,
getCliqFrontalVarIds,
getFrontals,
getCliqSeparatorVarIds,
getCliqAllVarIds,
getCliqVarIdsAll,
getCliqVarIdsPriors,
getCliqVarSingletons,
getCliqFactorIdsAll,
getCliqFactors,
areCliqVariablesAllMarginalized,
# generic marginal used during elimitation game
GenericMarginal,
PackedGenericMarginal,
# factor graph operating system utils (fgos)
saveTree,
loadTree,
# Temp placeholder for evaluating string types to real types
saveDFG,
loadDFG!,
loadDFG,
rebuildFactorCache!,
getCliqVarSolveOrderUp,
getFactorsAmongVariablesOnly,
setfreeze!,
#internal dev functions for recycling cliques on tree
attemptTreeSimilarClique,
# some utils
compare,
getMeasurements,
findFactorsBetweenFrom,
addDownVariableFactors!,
getDimension,
getPointType,
getPointIdentity,
setVariableRefence!,
reshapeVec2Mat
export incrSuffix
export calcPPE, calcVariablePPE
export setPPE!, setVariablePosteriorEstimates!
export getPPEDict
export getPPESuggested, getPPEMean, getPPEMax
export getPPESuggestedAll
export loadDFG
export findVariablesNear, defaultFixedLagOnTree!
export fetchDataJSON
export Position, Position1, Position2, Position3, Position4
export ContinuousScalar, ContinuousEuclid # TODO figure out if this will be deprecated, Caesar.jl #807
export Circular, Circle
# serializing distributions
export packDistribution, unpackDistribution
export PackedCategorical #, PackedDiscreteNonParametric
export PackedUniform, PackedNormal
export PackedZeroMeanDiagNormal,
PackedZeroMeanFullNormal, PackedDiagNormal, PackedFullNormal
export PackedManifoldKernelDensity
export PackedAliasingScalarSampler
export PackedRayleigh
export Mixture, PackedMixture
export sampleTangent
export samplePoint
export buildCliqSubgraph_StateMachine
export getCliqueStatus, setCliqueStatus!
export stackCliqUpMsgsByVariable, getCliqDownMsgsAfterDownSolve
export resetCliqSolve!
export addLikelihoodsDifferential!
export addLikelihoodsDifferentialCHILD!
export selectFactorType
export approxDeconv, deconvSolveKey
export approxDeconvBelief
export cont2disc
export rebaseFactorVariable!
export accumulateFactorMeans
export solveFactorParametric
export repeatCSMStep!
export attachCSM!
export filterHistAllToArray, cliqHistFilterTransitions, printCliqSummary
export printHistoryLine, printHistoryLane, printCliqHistorySummary
export printCSMHistoryLogical, printCSMHistorySequential
export MetaBayesTree, BayesTree
export CSMHistoryTuple
export getVariableOrder, calcCliquesRecycled
export getCliquePotentials
export getClique, getCliques, getCliqueIds, getCliqueData
export hasClique
export setCliqueDrawColor!, getCliqueDrawColor
export appendSeparatorToClique!
export buildTreeFromOrdering! # TODO make internal and deprecate external use to only `buildTreeReset!``
export makeSolverData!
export MetaPrior
# weakdeps on Interpolations.jl
export HeatmapGridDensity, LevelSetGridNormal
export PackedHeatmapGridDensity, PackedLevelSetGridNormal
# weakdeps on DifferentialEquations.jl
export DERelative
# weakdeps on Flux.jl
export FluxModelsDistribution, PackedFluxModelsDistribution
export MixtureFluxModels
# weakdeps on InteractiveUtils.jl
export getCurrentWorkspaceFactors, getCurrentWorkspaceVariables
export listTypeTree
# weakdeps on Gadfly.jl
export exportimg, spyCliqMat
#