Interpolation

This commit is contained in:
Andreas Fabri 2019-06-03 18:20:42 +02:00
parent cb58f1bda8
commit 9eaeb04023
3 changed files with 6 additions and 8 deletions

View File

@ -43,9 +43,9 @@ int main()
CGAL:: Data_access<Point_value_map>(value_function),
Traits());
for(Point_vector_map::iterator it = gradient_function.begin(); it != gradient_function.end(); ++it)
for(const Point_vector_map::value_type& pv : gradient_function)
{
std::cout << it->first << " " << it->second << std::endl;
std::cout << pv.first << " " << pv.second << std::endl;
}
// coordinate computation
K::Point_2 p(1.6, 1.4);

View File

@ -52,9 +52,8 @@ int main()
CGAL::Data_access<Point_value_map>(value_function),
Traits());
for(Point_vector_map::iterator it = gradient_function.begin();
it != gradient_function.end(); ++it) {
std::cout << it->first << " " << it->second << std::endl;
for(const Point_vector_map::value_type& pv : gradient_function) {
std::cout << pv.first << " " << pv.second << std::endl;
}
//coordinate computation

View File

@ -48,9 +48,8 @@ int main()
std::cout << "Testing the barycentric property " << std::endl;
Point_3 b(0, 0, 0);
for(std::vector< std::pair< Point_3, Coord_type > >::const_iterator
it = coords.begin(); it!=coords.end(); ++it)
b = b + (it->second/norm) * (it->first - CGAL::ORIGIN);
for(const std::pair< Point_3, Coord_type >& pc : coords)
b = b + (pc.second/norm) * (pc.first - CGAL::ORIGIN);
std::cout << " weighted barycenter: " << b <<std::endl;
std::cout << " squared distance: " << CGAL::squared_distance(p,b) << std::endl;