Skip to content

Commit

Permalink
use size_t variable type
Browse files Browse the repository at this point in the history
  • Loading branch information
acxz committed Jun 14, 2021
1 parent 9430807 commit ad7d8f1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gtsam_unstable/timing/timeShonanAveraging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ void saveResult(string name, const Values& values) {
myfile.open("shonan_result_of_" + name + ".dat");
size_t nrSO3 = values.count<SO3>();
myfile << "#Type SO3 Number " << nrSO3 << "\n";
for (int i = 0; i < nrSO3; ++i) {
for (size_t i = 0; i < nrSO3; ++i) {
Matrix R = values.at<SO3>(i).matrix();
// Check if the result of R.Transpose*R satisfy orthogonal constraint
checkR(R);
Expand All @@ -72,7 +72,7 @@ void saveG2oResult(string name, const Values& values, std::map<Key, Pose3> poses
ofstream myfile;
myfile.open("shonan_result_of_" + name + ".g2o");
size_t nrSO3 = values.count<SO3>();
for (int i = 0; i < nrSO3; ++i) {
for (size_t i = 0; i < nrSO3; ++i) {
Matrix R = values.at<SO3>(i).matrix();
// Check if the result of R.Transpose*R satisfy orthogonal constraint
checkR(R);
Expand All @@ -92,7 +92,7 @@ void saveResultQuat(const Values& values) {
ofstream myfile;
myfile.open("shonan_result.dat");
size_t nrSOn = values.count<SOn>();
for (int i = 0; i < nrSOn; ++i) {
for (size_t i = 0; i < nrSOn; ++i) {
GTSAM_PRINT(values.at<SOn>(i));
Rot3 R = Rot3(values.at<SOn>(i).matrix());
float x = R.toQuaternion().x();
Expand Down

0 comments on commit ad7d8f1

Please sign in to comment.