Changed name to avoid template confusion in VC 2016
parent
b89478c0fa
commit
b9174ae0f4
|
|
@ -75,17 +75,15 @@ double dot(const Point3 &p, const Point3 &q, OptionalJacobian<1, 3> H1,
|
||||||
return p.x() * q.x() + p.y() * q.y() + p.z() * q.z();
|
return p.x() * q.x() + p.y() * q.y() + p.z() * q.z();
|
||||||
}
|
}
|
||||||
|
|
||||||
Point3Pair mean(const std::vector<Point3Pair> &abPointPairs) {
|
Point3Pair means(const std::vector<Point3Pair> &abPointPairs) {
|
||||||
const size_t n = abPointPairs.size();
|
const size_t n = abPointPairs.size();
|
||||||
Point3 aCentroid(0, 0, 0), bCentroid(0, 0, 0);
|
Point3 aSum(0, 0, 0), bSum(0, 0, 0);
|
||||||
for (const Point3Pair &abPair : abPointPairs) {
|
for (const Point3Pair &abPair : abPointPairs) {
|
||||||
aCentroid += abPair.first;
|
aSum += abPair.first;
|
||||||
bCentroid += abPair.second;
|
bSum += abPair.second;
|
||||||
}
|
}
|
||||||
const double f = 1.0 / n;
|
const double f = 1.0 / n;
|
||||||
aCentroid *= f;
|
return {aSum * f, bSum * f};
|
||||||
bCentroid *= f;
|
|
||||||
return make_pair(aCentroid, bCentroid);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ GTSAM_EXPORT Point3 mean(const CONTAINER& points) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// mean of Point3 pair
|
/// mean of Point3 pair
|
||||||
GTSAM_EXPORT Point3Pair mean(const std::vector<Point3Pair>& abPointPairs);
|
GTSAM_EXPORT Point3Pair means(const std::vector<Point3Pair> &abPointPairs);
|
||||||
|
|
||||||
template <typename A1, typename A2>
|
template <typename A1, typename A2>
|
||||||
struct Range;
|
struct Range;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue