Remove unused code

This commit is contained in:
Andreas Fabri 2019-04-10 14:14:47 +02:00
parent e632bebdba
commit 2bbfe86fe2
6 changed files with 1 additions and 145 deletions

View File

@ -36,15 +36,6 @@ public:
*/
typedef R::Line_2 Line_2;
/*!
*/
typedef R::Segment_2 Segment_2;
/*!
*/
typedef R::Ray_2 Ray_2;
/*!
@ -81,15 +72,6 @@ typedef R::Compare_x_2 Compare_x_2;
*/
typedef R::Construct_line_2 Construct_line_2;
/*!
*/
typedef R::Construct_ray_2 Construct_ray_2;
/*!
*/
typedef R::Construct_segment_2 Construct_segment_2;
/*!

View File

@ -23,34 +23,6 @@ public:
/// `PartitionTraits_2`, the following types are required:
/// @{
/*!
A segment type
*/
typedef unspecified_type Segment_2;
/*!
A ray type
*/
typedef unspecified_type Ray_2;
/*!
A general object type that can be either a point or a segment
*/
typedef unspecified_type Object_2;
/*!
Function object type that provides
`Segment_2 operator()(Point_2 p, Point_2 q)`, which constructs and
returns the segment defined by the points \f$ p\f$ and \f$ q\f$.
*/
typedef unspecified_type Construct_segment_2;
/*!
Function object type that provides
`Ray_2 operator()(Point_2 p, Point_2 q)`, which constructs and returns
the ray from point \f$ p\f$ through point \f$ q\f$.
*/
typedef unspecified_type Construct_ray_2;
/*!
Predicate object type that
@ -73,21 +45,6 @@ and `r`. Note that `false` should be returned if
*/
typedef unspecified_type Are_stritcly_ordered_along_line_2;
/*!
Function object type that provides
`Object_2 operator()(Segment_2 s1, Segment_2 s2)` that returns
the intersection of two segments (which may be either a segment or
a point).
*/
typedef unspecified_type Intersect_2;
/*!
Function object type that provides
`bool operator()(Segment_2 s1, Object_2 o)` that returns
`true` if `o` is a segment and assigns the value of `o`
to `s1`; returns `false` otherwise.
*/
typedef unspecified_type Assign_2;
/// @}
@ -113,15 +70,6 @@ OptimalConvexPartitionTraits_2(OptimalConvexPartitionTraits_2 tr);
*/
Collinear_are_ordered_along_line_2 collinear_are_ordered_along_line_2_object() const;
/*!
*/
Construct_segment_2 construct_segment_2_object() const;
/*!
*/
Construct_ray_2 construct_ray_2_object() const;
/*!

View File

@ -68,7 +68,6 @@
#include <CGAL/Partition_2/Iterator_list.h>
#include <CGAL/Partition_2/Turn_reverser.h>
#include <CGAL/Partition_2/Point_pair_less_xy_2.h>
#include <CGAL/Intersections_2/Ray_2_Segment_2.h>
#include <CGAL/Partition_2/Segment_less_yx_2.h>
#include <cmath>
#include <list>
@ -87,8 +86,6 @@ private:
typedef Vertex_visibility_graph_2<Traits> Self;
typedef typename Traits::Point_2 Point_2;
typedef typename Traits::Segment_2 Segment_2;
typedef typename Traits::Ray_2 Ray_2;
typedef typename Traits::Object_2 Object_2;
typedef typename Traits::Left_turn_2 Left_turn_2;
typedef typename Traits::Less_xy_2 Less_xy_2;
typedef typename Traits::Orientation_2 Orientation_2;
@ -96,11 +93,6 @@ private:
Collinear_are_ordered_along_line_2;
typedef typename Traits::Are_strictly_ordered_along_line_2
Are_strictly_ordered_along_line_2;
// typedef typename Traits::Construct_segment_2
// Construct_segment_2;
// typedef typename Traits::Construct_ray_2 Construct_ray_2;
// typedef typename Traits::Intersect_2 Intersect_2;
// typedef typename Traits::Assign_2 Assign_2;
typedef CGAL::Segment_less_yx_2<Traits> Segment_less_yx_2;
typedef Rotation_tree_2<Traits> Tree;
@ -140,10 +132,6 @@ public:
are_strictly_ordered_along_line_2(
traits.are_strictly_ordered_along_line_2_object()),
less_xy_2(traits.less_xy_2_object()),
// construct_segment_2(traits.construct_segment_2_object()),
//construct_ray_2(traits.construct_ray_2_object()),
//intersect_2(traits.intersect_2_object()),
//assign_2(traits.assign_2_object()),
edges(Point_pair_compare(traits))
{
build(first, beyond, traits);
@ -421,10 +409,6 @@ private:
Collinear_are_ordered_along_line_2 collinear_ordered_2;
Are_strictly_ordered_along_line_2 are_strictly_ordered_along_line_2;
Less_xy_2 less_xy_2;
// Construct_segment_2 construct_segment_2;
// Construct_ray_2 construct_ray_2;
//Intersect_2 intersect_2;
// Assign_2 assign_2;
Edge_set edges;
};

View File

@ -523,36 +523,6 @@ void Vertex_visibility_graph_2<Traits>::update_visibility(
// if it were closer to p than q when looking from p to q, q would
// not be visible.
#if 0
Segment_2 next_seg = construct_segment_2(*(*p_it).second.second,
*next_v_p);
Ray_2 ray = construct_ray_2((*p_it).first, (*q_it).first);
Segment_2 i_seg;
Point_2 i_point;
Object_2 next_result = intersect_2(next_seg, ray);
if (assign_2(i_point, next_result))
{
if (collinear_ordered_2((*p_it).first, (*q_it).first, i_point))
{
(*p_it).second.second = (*q_it).second.first;
}
}
else if (assign_2(i_seg, next_result))
{
if (collinear_ordered_2((*p_it).first,(*q_it).first,i_seg.source()) &&
collinear_ordered_2((*p_it).first,(*q_it).first,i_seg.target()))
{
(*p_it).second.second = (*q_it).second.first;
}
}
else
{
(*p_it).second.second = (*q_it).second.first;
}
#else
// Segment ab and Ray pq
Point_2 a = *(*p_it).second.second;
Point_2 b = *next_v_p;
@ -595,7 +565,6 @@ void Vertex_visibility_graph_2<Traits>::update_visibility(
if(change){
(*p_it).second.second = (*q_it).second.first;
}
#endif
}
else // p sees what q sees
{

View File

@ -45,7 +45,7 @@ class Partition_traits_2 : public Partition_traits_2_base<Kernel_>
typedef CGAL::Polygon_2<Kernel, Container> Polygon_2;
typedef typename Kernel::Less_yx_2 Less_yx_2;
typedef typename Kernel::Less_xy_2 Less_xy_2;
typedef typename Kernel::Left_turn_2 Left_turn_2;
typedef typename Kernel::Left_turn_2 Left_turn_2;
typedef typename Kernel::Orientation_2 Orientation_2;
typedef typename Kernel::Compare_y_2 Compare_y_2;
typedef typename Kernel::Compare_x_2 Compare_x_2;
@ -59,14 +59,10 @@ class Partition_traits_2 : public Partition_traits_2_base<Kernel_>
typedef typename Kernel::Is_horizontal_2 Is_horizontal_2;
// needed by visibility graph and thus by optimal convex
typedef typename Kernel::Ray_2 Ray_2;
typedef typename Kernel::Collinear_are_ordered_along_line_2
Collinear_are_ordered_along_line_2;
typedef typename Kernel::Are_strictly_ordered_along_line_2
Are_strictly_ordered_along_line_2;
typedef typename Kernel::Intersect_2 Intersect_2;
typedef typename Kernel::Assign_2 Assign_2;
typedef typename Kernel::Object_2 Object_2;
// needed by approx_convex (for constrained triangulation)
// and optimal convex (for vis. graph)
@ -112,13 +108,6 @@ class Partition_traits_2 : public Partition_traits_2_base<Kernel_>
is_y_monotone_2_object(const Self& traits) const
{ return Is_y_monotone_2(traits); }
Intersect_2
intersect_2_object() const
{ return Intersect_2(); }
Assign_2
assign_2_object() const
{ return Assign_2(); }
};
}

View File

@ -139,13 +139,9 @@ public:
typedef typename Kernel::Is_horizontal_2 Is_horizontal_2;
// needed by visibility graph and thus by optimal convex
typedef typename Kernel::Ray_2 Ray_2;
typedef Pmap_collinear_are_ordered_along_line_2<PointPropertyMap,Kernel> Collinear_are_ordered_along_line_2;
typedef Pmap_fct<typename Kernel::Are_strictly_ordered_along_line_2>
Are_strictly_ordered_along_line_2;
typedef typename Kernel::Intersect_2 Intersect_2;
typedef typename Kernel::Assign_2 Assign_2;
typedef typename Kernel::Object_2 Object_2;
// needed by approx_convex (for constrained triangulation)
// and optimal convex (for vis. graph)
@ -154,7 +150,6 @@ public:
// needed by optimal convex (for vis. graph)
typedef Pmap_fct<typename Kernel::Construct_segment_2> Construct_segment_2;
typedef Pmap_fct<typename Kernel::Construct_ray_2> Construct_ray_2;
Equal_2
equal_2_object() const
@ -198,10 +193,6 @@ public:
construct_segment_2_object() const
{ return Construct_segment_2(); }
Construct_ray_2
construct_ray_2_object() const
{ return Construct_ray_2(); }
Collinear_are_ordered_along_line_2
collinear_are_ordered_along_line_2_object() const
{ return Collinear_are_ordered_along_line_2(ppmap,static_cast<const Base_traits*>(this)->collinear_are_ordered_along_line_2_object()); }
@ -224,13 +215,6 @@ public:
{ return Is_y_monotone_2(traits); }
Intersect_2
intersect_2_object() const
{ return Intersect_2(); }
Assign_2
assign_2_object() const
{ return Assign_2(); }
};