Fixed issue with 'count'
parent
94010aee9d
commit
e2363e90bd
|
|
@ -387,7 +387,7 @@ namespace gtsam {
|
|||
|
||||
// Count values of given type \c ValueType
|
||||
template<class ValueType>
|
||||
bool count() const {
|
||||
size_t count() const {
|
||||
size_t i = 0;
|
||||
for (const auto& key_value : *this) {
|
||||
if (dynamic_cast<const GenericValue<ValueType>*>(&key_value.value))
|
||||
|
|
|
|||
|
|
@ -384,6 +384,7 @@ TEST(Values, filter) {
|
|||
}
|
||||
EXPECT_LONGS_EQUAL(2, (long)i);
|
||||
EXPECT_LONGS_EQUAL(2, (long)values.count<Pose3>());
|
||||
EXPECT_LONGS_EQUAL(2, (long)values.count<Pose2>());
|
||||
|
||||
// construct a values with the view
|
||||
Values actualSubValues2(pose_filtered);
|
||||
|
|
|
|||
|
|
@ -880,7 +880,7 @@ bool writeBALfromValues(const string& filename, const SfM_data &data,
|
|||
}
|
||||
} else {
|
||||
cout
|
||||
<< "writeBALfromValues: different number of cameras in SfM_dataValues (#cameras= "
|
||||
<< "writeBALfromValues: different number of cameras in SfM_dataValues (#cameras "
|
||||
<< dataValues.number_cameras() << ") and values (#cameras "
|
||||
<< nrPoses << ", #poses " << nrCameras << ")!!"
|
||||
<< endl;
|
||||
|
|
|
|||
Loading…
Reference in New Issue