Fix two small problems
parent
3fda4dd33a
commit
6f509a34fd
|
@ -69,7 +69,7 @@ double Point2::norm(OptionalJacobian<1,2> H) const {
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
double Point2::distance(const Point2& point, OptionalJacobian<1,2> H1,
|
double Point2::distance(const Point2& point, OptionalJacobian<1,2> H1,
|
||||||
OptionalJacobian<1,2> H2) const {
|
OptionalJacobian<1,2> H2) const {
|
||||||
return distance(point, H1, H2);
|
return gtsam::distance2(*this, point, H1, H2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
|
|
|
@ -64,7 +64,7 @@ int main()
|
||||||
long timeLog = clock();
|
long timeLog = clock();
|
||||||
Point2 measurement(0,0);
|
Point2 measurement(0,0);
|
||||||
for(int i = 0; i < n; i++)
|
for(int i = 0; i < n; i++)
|
||||||
measurement.localCoordinates(camera.project(point1));
|
camera.project(point1)-measurement;
|
||||||
long timeLog2 = clock();
|
long timeLog2 = clock();
|
||||||
double seconds = (double)(timeLog2-timeLog)/CLOCKS_PER_SEC;
|
double seconds = (double)(timeLog2-timeLog)/CLOCKS_PER_SEC;
|
||||||
cout << ((double)seconds*1e9/n) << " nanosecs/call" << endl;
|
cout << ((double)seconds*1e9/n) << " nanosecs/call" << endl;
|
||||||
|
|
Loading…
Reference in New Issue