2.8. update.findFluid: Mark cliques that involve marked variables and ancestors.
2.8.1. 从成员变量roots_的元素中递归寻找,其元素是团
2.8.2. Does the separator contain any of the relinKeys?
2.8.3. If it is true then add this clique to markedKeys
2.8.4. 在detail中进行标记
2.8.5. UpdateImpl::ExpmapMasked: Update linearization point for marked variables
2.8.6. update.linearizeNewFactors: Linearize new factors
2.8.7. update.augmentVariableIndex:
Augment the variable index with the new factors
Augment it with existing factors which now affect to more variables
2.8.8. Recalculate: Redo top of Bayes tree and update data structures
removeTop: Remove top of Bayes tree and convert to a factor graph: (a) For each affected variable, remove the corresponding clique and all parents up to the root. (b) Store orphaned sub-trees of removed cliques to variable orphans. 对于markedKeys中的每一个key,如果存在于成员变量nodes_中,则该节点从贝叶斯树中移除,存入贝叶斯网affectedBayesNet中,生成的孤儿放在orphans中
把贝叶斯网affectedBayesNet中的所有key存入affectedKeys中
recalculateBatch: Do a batch step – reorder and relinearize all variables
3.6. Re-order and eliminate the factor graph into a Bayes net (Algorithm [alg:eliminate]), and re-assemble into a new Bayes tree (Algorithm [alg:BayesTree])
create a partial reordering for the new and contaminated factors result->markedKeys are passed in: those variables will be forced to the end in the ordering, Create ordering constraints,constraintGroups即updateParams.constrainedKeys
Remove unaffected keys from the constraints,如果某key存在于unusedKeys中,即它未被使用,或者它不存在于affectedKeysSet中,即它未被影响,则把它从constraintGroups中删除,即不参与重排序
3.6. Re-order and eliminate the factor graph into a Bayes net (Algorithm [alg:eliminate]), and re-assemble into a new Bayes tree (Algorithm [alg:BayesTree])