Merged in fix/no-deprecated-partition-errors (pull request #358)
Fix trivial compiler errorsrelease/4.3a0
commit
94cf67b398
|
@ -47,15 +47,15 @@ namespace gtsam { namespace partition {
|
|||
toErase.push_back(itFactor); nrFactors--; continue;
|
||||
}
|
||||
|
||||
size_t label1 = dsf.findSet(key1.index);
|
||||
size_t label2 = dsf.findSet(key2.index);
|
||||
size_t label1 = dsf.find(key1.index);
|
||||
size_t label2 = dsf.find(key2.index);
|
||||
if (label1 == label2) { toErase.push_back(itFactor); nrFactors--; continue; }
|
||||
|
||||
// merge two trees if the connection is strong enough, otherwise cache it
|
||||
// an odometry factor always merges two islands
|
||||
if (key1.type == NODE_POSE_2D && key2.type == NODE_POSE_2D) {
|
||||
toErase.push_back(itFactor); nrFactors--;
|
||||
dsf.makeUnionInPlace(label1, label2);
|
||||
dsf.merge(label1, label2);
|
||||
succeed = true;
|
||||
break;
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ namespace gtsam { namespace partition {
|
|||
if ((dsf.isSingleton(label1)==1 && key1.type == NODE_LANDMARK_2D) ||
|
||||
(dsf.isSingleton(label2)==1 && key2.type == NODE_LANDMARK_2D)) {
|
||||
toErase.push_back(itFactor); nrFactors--;
|
||||
dsf.makeUnionInPlace(label1, label2);
|
||||
dsf.merge(label1, label2);
|
||||
succeed = true;
|
||||
break;
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ namespace gtsam { namespace partition {
|
|||
} else {
|
||||
toErase.push_back(itFactor); nrFactors--;
|
||||
toErase.push_back(itCached->second); nrFactors--;
|
||||
dsf.makeUnionInPlace(label1, label2);
|
||||
dsf.merge(label1, label2);
|
||||
connections.erase(itCached);
|
||||
succeed = true;
|
||||
break;
|
||||
|
@ -150,8 +150,8 @@ namespace gtsam { namespace partition {
|
|||
}
|
||||
|
||||
if (graph.size() == 178765) cout << "kai22" << endl;
|
||||
size_t label1 = dsf.findSet(key1.index);
|
||||
size_t label2 = dsf.findSet(key2.index);
|
||||
size_t label1 = dsf.find(key1.index);
|
||||
size_t label2 = dsf.find(key2.index);
|
||||
if (label1 == label2) { toErase.push_back(itFactor); nrFactors--; continue; }
|
||||
|
||||
if (graph.size() == 178765) cout << "kai23" << endl;
|
||||
|
@ -160,7 +160,7 @@ namespace gtsam { namespace partition {
|
|||
if ((key1.type == NODE_POSE_3D && key2.type == NODE_LANDMARK_3D) ||
|
||||
(key1.type == NODE_POSE_3D && key2.type == NODE_POSE_3D)) {
|
||||
toErase.push_back(itFactor); nrFactors--;
|
||||
dsf.makeUnionInPlace(label1, label2);
|
||||
dsf.merge(label1, label2);
|
||||
succeed = true;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue