Document Power_center_d, Power_distance_d (renamed)

This commit is contained in:
Marc Glisse 2020-07-07 23:17:19 +02:00
parent f4a1868cfe
commit 482f5ef2d8
4 changed files with 37 additions and 3 deletions

View File

@ -149,9 +149,26 @@ public:
template<class ForwardIterator>
Bounded_side operator()(ForwardIterator first, ForwardIterator last, const Weighted_point_d&p);
};
class Power_center_d {
public:
/*! returns a weighted point on the affine hull of the weighted points of `A=tuple[first,last)` at power distance 0 of each of them. In other words, this returns the smallest sphere orthogonal to the spheres of A.
\pre A is affinely independent.
\tparam ForwardIterator has `Epeck_d::Weighted_point_d` as value type.
*/
template<class ForwardIterator>
Weighted_point_d operator()(ForwardIterator first, ForwardIterator last);
};
class Compute_power_product_d {
public:
/*! returns the power product (aka power distance) of the weighted points `pw` and `qw`, that is, the squared Euclidean distance between the points minus their weights.
*/
FT operator()(Weighted_point_d pw, Weighted_point_d qw);
};
Construct_circumcenter_d construct_circumcenter_d_object();
Compute_power_product_d compute_power_product_d_object();
Compute_squared_radius_d compute_squared_radius_d_object();
Compute_squared_radius_smallest_orthogonal_sphere_d compute_squared_radius_smallest_orthogonal_sphere_d_object();
Power_center_d power_center_d_object();
Power_side_of_bounded_power_sphere_d power_side_of_bounded_power_sphere_d_object();
}; /* end Epeck_d */
} /* end namespace CGAL */

View File

@ -138,9 +138,26 @@ public:
template<class ForwardIterator>
Bounded_side operator()(ForwardIterator first, ForwardIterator last, const Weighted_point_d&p);
};
class Power_center_d {
public:
/*! returns a weighted point on the affine hull of the weighted points of `A=tuple[first,last)` at power distance 0 of each of them. In other words, this returns the smallest sphere orthogonal to the spheres of A.
\pre A is affinely independent.
\tparam ForwardIterator has `Epick_d::Weighted_point_d` as value type.
*/
template<class ForwardIterator>
Weighted_point_d operator()(ForwardIterator first, ForwardIterator last);
};
class Compute_power_product_d {
public:
/*! returns the power product (aka power distance) of the weighted points `pw` and `qw`, that is, the squared Euclidean distance between the points minus their weights.
*/
FT operator()(Weighted_point_d pw, Weighted_point_d qw);
};
Construct_circumcenter_d construct_circumcenter_d_object();
Compute_power_product_d compute_power_product_d_object();
Compute_squared_radius_d compute_squared_radius_d_object();
Compute_squared_radius_smallest_orthogonal_sphere_d compute_squared_radius_smallest_orthogonal_sphere_d_object();
Power_center_d power_center_d_object();
Power_side_of_bounded_power_sphere_d power_side_of_bounded_power_sphere_d_object();
}; /* end Epick_d */
} /* end namespace CGAL */

View File

@ -60,7 +60,7 @@ template <class Base_> struct Kernel_d_interface : public Base_ {
typedef typename Get_functor<Base, Power_side_of_power_sphere_tag>::type Power_side_of_power_sphere_d;
typedef typename Get_functor<Base, Power_side_of_bounded_power_circumsphere_tag>::type Power_side_of_bounded_power_sphere_d;
typedef typename Get_functor<Base, Power_center_tag>::type Power_center_d;
typedef typename Get_functor<Base, Power_distance_tag>::type Power_distance_d;
typedef typename Get_functor<Base, Power_distance_tag>::type Compute_power_product_d;
typedef typename Get_functor<Base, Contained_in_affine_hull_tag>::type Contained_in_affine_hull_d;
typedef typename Get_functor<Base, Construct_flat_orientation_tag>::type Construct_flat_orientation_d;
typedef typename Get_functor<Base, In_flat_orientation_tag>::type In_flat_orientation_d;
@ -223,7 +223,7 @@ template <class Base_> struct Kernel_d_interface : public Base_ {
Power_side_of_power_sphere_d power_side_of_power_sphere_d_object()const{ return Power_side_of_power_sphere_d(*this); }
Power_side_of_bounded_power_sphere_d power_side_of_bounded_power_sphere_d_object()const{ return Power_side_of_bounded_power_sphere_d(*this); }
Power_center_d power_center_d_object()const{ return Power_center_d(*this); }
Power_distance_d power_distance_d_object()const{ return Power_distance_d(*this); }
Compute_power_product_d compute_power_product_d_object()const{ return Compute_power_product_d(*this); }
Side_of_bounded_sphere_d side_of_bounded_sphere_d_object()const{ return Side_of_bounded_sphere_d(*this); }
Contained_in_affine_hull_d contained_in_affine_hull_d_object()const{ return Contained_in_affine_hull_d(*this); }
Contained_in_linear_hull_d contained_in_linear_hull_d_object()const{ return Contained_in_linear_hull_d(*this); }

View File

@ -142,7 +142,7 @@ void test2(){
typedef typename K1::Compute_squared_radius_d SR;
typedef typename K1::Translated_point_d TP;
typedef typename K1::Power_center_d PC;
typedef typename K1::Power_distance_d PoD;
typedef typename K1::Compute_power_product_d PoD;
typedef typename K1::Construct_weighted_point_d CWP;
typedef typename K1::Power_side_of_bounded_power_sphere_d PSBPS;
typedef typename K1::Compute_squared_radius_smallest_orthogonal_sphere_d CSRSOS;