mirror of https://github.com/CGAL/cgal
PCA: Corrected one bug for cuboids (dimension 0 tag)
removed a default tag
This commit is contained in:
parent
11474e52d7
commit
013183aeef
|
|
@ -166,6 +166,10 @@ linear_least_squares_fitting_3(InputIterator first,
|
||||||
points.push_back(t[1]);
|
points.push_back(t[1]);
|
||||||
points.push_back(t[2]);
|
points.push_back(t[2]);
|
||||||
points.push_back(t[3]);
|
points.push_back(t[3]);
|
||||||
|
points.push_back(t[4]);
|
||||||
|
points.push_back(t[5]);
|
||||||
|
points.push_back(t[6]);
|
||||||
|
points.push_back(t[7]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// compute fitting plane
|
// compute fitting plane
|
||||||
|
|
@ -307,6 +311,10 @@ linear_least_squares_fitting_3(InputIterator first,
|
||||||
points.push_back(t[1]);
|
points.push_back(t[1]);
|
||||||
points.push_back(t[2]);
|
points.push_back(t[2]);
|
||||||
points.push_back(t[3]);
|
points.push_back(t[3]);
|
||||||
|
points.push_back(t[4]);
|
||||||
|
points.push_back(t[5]);
|
||||||
|
points.push_back(t[6]);
|
||||||
|
points.push_back(t[7]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// compute fitting line
|
// compute fitting line
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ linear_least_squares_fitting_3(InputIterator first,
|
||||||
typename K::Point_3& c, // centroid
|
typename K::Point_3& c, // centroid
|
||||||
const typename K::Point_3*, // used for indirection
|
const typename K::Point_3*, // used for indirection
|
||||||
const K& k, // kernel
|
const K& k, // kernel
|
||||||
const CGAL::PCA_dimension_0_tag& tag = CGAL::PCA_dimension_0_tag())
|
const CGAL::PCA_dimension_0_tag& tag)
|
||||||
{
|
{
|
||||||
typedef typename K::FT FT;
|
typedef typename K::FT FT;
|
||||||
typedef typename K::Point_3 Point;
|
typedef typename K::Point_3 Point;
|
||||||
|
|
@ -77,7 +77,7 @@ linear_least_squares_fitting_3(InputIterator first,
|
||||||
typename K::Point_3& c, // centroid
|
typename K::Point_3& c, // centroid
|
||||||
const typename K::Point_3*, // used for indirection
|
const typename K::Point_3*, // used for indirection
|
||||||
const K& k, // kernel
|
const K& k, // kernel
|
||||||
const CGAL::PCA_dimension_0_tag& tag = CGAL::PCA_dimension_0_tag)
|
const CGAL::PCA_dimension_0_tag& tag)
|
||||||
{
|
{
|
||||||
typedef typename K::FT FT;
|
typedef typename K::FT FT;
|
||||||
typedef typename K::Point_3 Point;
|
typedef typename K::Point_3 Point;
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,6 @@ int main()
|
||||||
cuboids.push_back(Iso_cuboid(a,b));
|
cuboids.push_back(Iso_cuboid(a,b));
|
||||||
cuboids.push_back(Iso_cuboid(a,c));
|
cuboids.push_back(Iso_cuboid(a,c));
|
||||||
|
|
||||||
Kernel kernel;
|
|
||||||
Line line;
|
Line line;
|
||||||
Plane plane;
|
Plane plane;
|
||||||
Point centroid;
|
Point centroid;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue