这个类有个变量很有意思
// Tracks transitive connectivity using a disjoint set forest, i.e. each
// entry points towards the representative for the given trajectory.
std::map<int, int> forest_ GUARDED_BY(lock_);
对于这个操作
本文介绍了ConnectedComponents类中的一个有趣变量,探讨了std::map如何在维护唯一键的同时实现链式结构。通过forest_变量,文章阐述了如何将原本的网状结构转化为单链,以达到压缩路径的效果,简化了朋友关系网络的表示。
这个类有个变量很有意思
// Tracks transitive connectivity using a disjoint set forest, i.e. each
// entry points towards the representative for the given trajectory.
std::map<int, int> forest_ GUARDED_BY(lock_);
对于这个操作
2623
714
4433
3646
3249
3180

被折叠的 条评论
为什么被折叠?