changes to make SunPro happy; adding CGAL:: and not using std::list.sort

This commit is contained in:
Susan Hert 2001-12-03 14:13:20 +00:00
parent cb16612e0c
commit 4f6a4f584d
6 changed files with 18 additions and 11 deletions

View File

@ -1,3 +1,7 @@
1.23 (2 Dec 2001)
- added some CGAL prefixes to make SunPro happy
- also changed to use of std::sort instead of sort in std::list
1.22 (26 Oct 2001)
- fixed bug in Indirect_edge_compare for comparing edge with itself

View File

@ -53,8 +53,8 @@ class Partition_traits_2 : public Partition_traits_2_base<R_>
typedef typename R::Orientation_2 Orientation_2;
typedef typename R::Compare_y_2 Compare_y_2;
typedef typename R::Compare_x_2 Compare_x_2;
typedef Is_convex_2<Self> Is_convex_2;
typedef Is_y_monotone_2<Self> Is_y_monotone_2;
typedef CGAL::Is_convex_2<Self> Is_convex_2;
typedef CGAL::Is_y_monotone_2<Self> Is_y_monotone_2;
// needed by Indirect_edge_compare, used in y_monotone and greene_approx
typedef typename R::Line_2 Line_2;
@ -63,7 +63,7 @@ class Partition_traits_2 : public Partition_traits_2_base<R_>
typedef typename R::Is_horizontal_2 Is_horizontal_2;
// needed by visibility graph and thus by optimal convex
typedef Ray_2<R_> Ray_2;
typedef R::Ray_2 Ray_2;
typedef typename R::Collinear_are_ordered_along_line_2
Collinear_are_ordered_along_line_2;
typedef typename R::Are_strictly_ordered_along_line_2

View File

@ -52,7 +52,7 @@ public:
typedef typename Traits::Leftturn_2 Leftturn_2;
typedef typename Traits::Less_xy_2 Less_xy_2;
typedef typename Traits::Point_2 Point_2;
typedef Edge_info<Iterator> Edge_info;
typedef CGAL::Edge_info<Iterator> Edge_info;
CW_indirect_edge_info_compare (Iterator v_it) : vertex_it(v_it),
left_turn(Traits().leftturn_2_object()),
@ -186,7 +186,8 @@ public:
// order), and this is what you need when you construct the union
// polygon.
if (size() > 2)
sort(CW_indirect_edge_info_compare<Vertex_iterator,Traits>(vertex_it));
std::sort(begin(), end(),
CW_indirect_edge_info_compare<Vertex_iterator,Traits>(vertex_it));
#ifdef CGAL_PARTITION_CHECK_DEBUG
std::cout << "after sort: edges for " << *vertex_it << std::endl;
@ -392,9 +393,9 @@ public:
// order), and this is what you need to begin the construction
// of the union polygon.
if ((*m_it).second.size() > 2)
(*m_it).second.sort(
std::sort((*m_it).second.begin(), (*m_it).second.end(),
CW_indirect_edge_info_compare<Vertex_iterator,Traits>(
(*m_it).first));
(*m_it).first));
// find the previous vertex in this vertex's list
next_v_it=(*m_it).second.next_ccw_edge_info(prev_v_it).endpoint();
if (next_v_it != first_v_it)

View File

@ -353,8 +353,8 @@ class Partition_vertex : public Traits_::Point_2
// and remove any duplicate diagonals
void sort_diagonals(const Circulator& prev, const Circulator& next)
{
diag_endpoint_refs.sort(
Indirect_CW_diag_compare<Circulator,Traits>(*this, prev, next));
std::sort(diag_endpoint_refs.begin(), diag_endpoint_refs.end(),
Indirect_CW_diag_compare<Circulator,Traits>(*this, prev, next));
diag_endpoint_refs.unique();
current_diag = diag_endpoint_refs.begin();
}

View File

@ -176,7 +176,8 @@ Vertex_visibility_graph_2<Traits>::initialize_vertex_map(
// Sort the event list (iterators to points) from left to right
// (using less_xy)
iterator_list.sort(Indirect_less_xy_2<Traits>());
std::sort(iterator_list.begin(), iterator_list.end(),
Indirect_less_xy_2<Traits>());
// Create an ordered list of edge endpoints (iterators), initially empty
typedef std::set< Point_pair, Segment_less_yx_2 > Ordered_edge_set;

View File

@ -440,7 +440,8 @@ OutputIterator partition_y_monotone_2(InputIterator first,
Circulator first_c(polygon.begin(), polygon.end());
Circulator_list<Circulator> circ_list(first_c);
circ_list.sort(Indirect_not_less_yx_2<Traits>(traits));
std::sort(circ_list.begin(), circ_list.end(),
Indirect_not_less_yx_2<Traits>(traits));
#ifdef CGAL_PARTITION_Y_MONOTONE_DEBUG
std::cout << "Initial vertex list: "<< circ_list << std::endl;