mirror of https://github.com/CGAL/cgal
Interpolation
This commit is contained in:
parent
cb58f1bda8
commit
9eaeb04023
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue