mirror of https://github.com/CGAL/cgal
making it compile with SunPRO
This commit is contained in:
parent
521b24b556
commit
4b83c6f9a3
|
|
@ -171,10 +171,11 @@ public:
|
|||
|
||||
std::vector<Point> points(first, last);
|
||||
std::random_shuffle (points.begin(), points.end());
|
||||
|
||||
std::cout<<'a';std::cout.flush();
|
||||
Cell_handle hint;
|
||||
std::vector<Vertex_handle> dummy_points, double_vertices;
|
||||
typename std::vector<Point>::iterator pbegin = points.begin();
|
||||
std::cout<<'b';std::cout.flush();
|
||||
if (is_large_point_set)
|
||||
dummy_points = insert_dummy_points();
|
||||
else while (!is_1_cover()) {
|
||||
|
|
@ -182,13 +183,16 @@ public:
|
|||
++pbegin;
|
||||
if (pbegin == points.end()) return number_of_vertices() - n;
|
||||
}
|
||||
std::cout<<'c';std::cout.flush();
|
||||
|
||||
spatial_sort (pbegin, points.end(), geom_traits());
|
||||
std::cout<<'d';std::cout.flush();
|
||||
|
||||
Conflict_tester tester(*pbegin,this);
|
||||
Point_hider hider;
|
||||
double_vertices = Base::insert_in_conflict(
|
||||
points.begin(),points.end(),hint,tester,hider);
|
||||
std::cout<<'e';std::cout.flush();
|
||||
|
||||
if (is_large_point_set) {
|
||||
typedef CGAL::Periodic_3_triangulation_remove_traits_3< Gt > P3removeT;
|
||||
|
|
@ -198,10 +202,12 @@ public:
|
|||
DT dt(remove_traits);
|
||||
Remover remover(this,dt);
|
||||
Conflict_tester t(this);
|
||||
std::cout<<'f';std::cout.flush();
|
||||
for (unsigned int i=0; i<dummy_points.size(); i++) {
|
||||
if (std::find(double_vertices.begin(), double_vertices.end(),
|
||||
dummy_points[i]) == double_vertices.end())
|
||||
Base::remove(dummy_points[i],remover,t);
|
||||
std::cout<<'g';std::cout.flush();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -402,8 +408,62 @@ public:
|
|||
|
||||
private:
|
||||
class Conflict_tester;
|
||||
template <class DT> struct Vertex_remover;
|
||||
class Point_hider;
|
||||
|
||||
//#ifndef CGAL_CFG_OUTOFLINE_TEMPLATE_MEMBER_DEFINITION_BUG
|
||||
//template <class Triangulation_R3> struct Vertex_remover;
|
||||
//#else
|
||||
template <class TriangulationR3>
|
||||
struct Vertex_remover
|
||||
{
|
||||
typedef TriangulationR3 Triangulation_R3;
|
||||
typedef Conflict_tester Conflict_tester;
|
||||
typedef Point_hider Point_hider;
|
||||
|
||||
typedef typename std::vector<Point>::iterator Hidden_points_iterator;
|
||||
|
||||
// TODO: All these typedefs are only needed in the remove.
|
||||
// If they are not different for the Regular_conflict_tester, then
|
||||
// they should be moved to the remove.
|
||||
|
||||
typedef Triple < Vertex_handle, Vertex_handle, Vertex_handle > Vertex_triple;
|
||||
|
||||
typedef typename Triangulation_R3::Triangulation_data_structure TDSE;
|
||||
typedef typename Triangulation_R3::Cell_handle CellE_handle;
|
||||
typedef typename Triangulation_R3::Vertex_handle VertexE_handle;
|
||||
typedef typename Triangulation_R3::Facet FacetE;
|
||||
typedef typename Triangulation_R3::Finite_cells_iterator Finite_cellsE_iterator;
|
||||
|
||||
typedef Triple< VertexE_handle, VertexE_handle, VertexE_handle >
|
||||
VertexE_triple;
|
||||
|
||||
typedef std::map<Vertex_triple,Facet> Vertex_triple_Facet_map;
|
||||
typedef std::map<Vertex_triple, FacetE> Vertex_triple_FacetE_map;
|
||||
typedef typename Vertex_triple_FacetE_map::iterator
|
||||
Vertex_triple_FacetE_map_it;
|
||||
|
||||
Vertex_remover(const Self *t, Triangulation_R3 &tmp_) : _t(t),tmp(tmp_) {}
|
||||
|
||||
const Self *_t;
|
||||
Triangulation_R3 &tmp;
|
||||
|
||||
void add_hidden_points(Cell_handle) {
|
||||
std::copy (hidden_points_begin(), hidden_points_end(),
|
||||
std::back_inserter(hidden));
|
||||
}
|
||||
|
||||
Hidden_points_iterator hidden_points_begin() {
|
||||
return hidden.begin();
|
||||
}
|
||||
Hidden_points_iterator hidden_points_end() {
|
||||
return hidden.end();
|
||||
}
|
||||
//private:
|
||||
// The removal of v may un-hide some points,
|
||||
// Space functions output them.
|
||||
std::vector<Point> hidden;
|
||||
};
|
||||
//#endif CGAL_CFG_OUTOFLINE_TEMPLATE_MEMBER_DEFINITION_BUG
|
||||
};
|
||||
|
||||
template < class GT, class Tds >
|
||||
|
|
@ -861,61 +921,6 @@ public:
|
|||
|
||||
};
|
||||
|
||||
template <class GT, class Tds>
|
||||
template <class EuclideanTriangulation>
|
||||
struct Periodic_3_Delaunay_triangulation_3<GT,Tds>::Vertex_remover
|
||||
{
|
||||
typedef typename Periodic_3_Delaunay_triangulation_3<GT,Tds>::Conflict_tester
|
||||
Conflict_tester;
|
||||
typedef typename Periodic_3_Delaunay_triangulation_3<GT,Tds>::Point_hider
|
||||
Point_hider;
|
||||
|
||||
typedef typename std::vector<Point>::iterator Hidden_points_iterator;
|
||||
|
||||
// TODO: All these typedefs are only needed in the remove.
|
||||
// If they are not different for the Regular_conflict_tester, then
|
||||
// they should be moved to the remove.
|
||||
|
||||
typedef EuclideanTriangulation Triangulation;
|
||||
|
||||
typedef Triple < Vertex_handle, Vertex_handle, Vertex_handle > Vertex_triple;
|
||||
|
||||
typedef typename Triangulation::Triangulation_data_structure TDSE;
|
||||
typedef typename Triangulation::Cell_handle CellE_handle;
|
||||
typedef typename Triangulation::Vertex_handle VertexE_handle;
|
||||
typedef typename Triangulation::Facet FacetE;
|
||||
typedef typename Triangulation::Finite_cells_iterator Finite_cellsE_iterator;
|
||||
|
||||
typedef Triple< VertexE_handle, VertexE_handle, VertexE_handle >
|
||||
VertexE_triple;
|
||||
|
||||
typedef std::map<Vertex_triple,Facet> Vertex_triple_Facet_map;
|
||||
typedef std::map<Vertex_triple, FacetE> Vertex_triple_FacetE_map;
|
||||
typedef typename Vertex_triple_FacetE_map::iterator
|
||||
Vertex_triple_FacetE_map_it;
|
||||
|
||||
Vertex_remover(const Self *t, Triangulation &tmp_) : _t(t),tmp(tmp_) {}
|
||||
|
||||
const Self *_t;
|
||||
Triangulation &tmp;
|
||||
|
||||
void add_hidden_points(Cell_handle) {
|
||||
std::copy (hidden_points_begin(), hidden_points_end(),
|
||||
std::back_inserter(hidden));
|
||||
}
|
||||
|
||||
Hidden_points_iterator hidden_points_begin() {
|
||||
return hidden.begin();
|
||||
}
|
||||
Hidden_points_iterator hidden_points_end() {
|
||||
return hidden.end();
|
||||
}
|
||||
//private:
|
||||
// The removal of v may un-hide some points,
|
||||
// Space functions output them.
|
||||
std::vector<Point> hidden;
|
||||
};
|
||||
|
||||
template < class GT, class Tds>
|
||||
class Periodic_3_Delaunay_triangulation_3<GT,Tds>::Point_hider
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1846,11 +1846,10 @@ template < class GT, class TDS >
|
|||
inline typename Periodic_3_triangulation_3<GT,TDS>::Vertex_handle
|
||||
Periodic_3_triangulation_3<GT,TDS>::create_initial_triangulation(
|
||||
const Point &p) {
|
||||
/** NGHK: Assume diagonal is Vector(1,1,1) for now **/
|
||||
/// Virtual vertices, one per periodic domain
|
||||
Vertex_handle vir_vertices[_cover[0]][_cover[1]][_cover[2]];
|
||||
Vertex_handle vir_vertices[3][3][3];
|
||||
/// Virtual cells, 6 per periodic domain
|
||||
Cell_handle cells[_cover[0]][_cover[1]][_cover[2]][6];
|
||||
Cell_handle cells[3][3][3][6];
|
||||
|
||||
// Initialise vertices:
|
||||
vir_vertices[0][0][0] = _tds.create_vertex();
|
||||
|
|
@ -2471,7 +2470,7 @@ inline void Periodic_3_triangulation_3<GT,TDS>::periodic_remove(Vertex_handle v,
|
|||
remover.tmp.clear();
|
||||
|
||||
for(unsigned int i=0; i < vertices.size(); i++){
|
||||
typedef typename Point_remover::Triangulation::Point TRPoint;
|
||||
typedef typename Point_remover::Triangulation_R3::Point TRPoint;
|
||||
CGAL_assertion(get_offset(vertices[i])
|
||||
+ combine_offsets(Offset(), vh_off_map[vertices[i]])
|
||||
== combine_offsets(get_offset(vertices[i]),vh_off_map[vertices[i]]));
|
||||
|
|
|
|||
|
|
@ -437,14 +437,16 @@ struct Offset_converter_3
|
|||
|
||||
typedef typename Periodic_3_triangulation_traits_base_3<Source_kernel>
|
||||
::Offset Source_off;
|
||||
typedef typename Periodic_3_triangulation_traits_base_3<Source_kernel>
|
||||
::Point_3 Source_pt;
|
||||
|
||||
typedef typename Periodic_3_triangulation_traits_base_3<Target_kernel>
|
||||
::Offset Target_off;
|
||||
typedef typename Periodic_3_triangulation_traits_base_3<Target_kernel>
|
||||
::Point_3 Target_pt;
|
||||
|
||||
|
||||
#ifndef CGAL_CFG_MATCHING_BUG_6
|
||||
using Converter::operator();
|
||||
#endif
|
||||
|
||||
Target_off
|
||||
operator()(const Source_off &off) const
|
||||
|
|
|
|||
|
|
@ -137,13 +137,13 @@ public:
|
|||
|
||||
reference operator*() const
|
||||
{
|
||||
periodic_tetrahedron = construct_periodic_tetrahedron(_t);
|
||||
periodic_tetrahedron = construct_periodic_tetrahedron();
|
||||
return periodic_tetrahedron;
|
||||
}
|
||||
|
||||
pointer operator->() const
|
||||
{
|
||||
periodic_tetrahedron = construct_periodic_tetrahedron(_t);
|
||||
periodic_tetrahedron = construct_periodic_tetrahedron();
|
||||
return &periodic_tetrahedron;
|
||||
}
|
||||
|
||||
|
|
@ -299,7 +299,7 @@ private:
|
|||
return( 4*offx + 2*offy + offz );
|
||||
}
|
||||
|
||||
Periodic_tetrahedron construct_periodic_tetrahedron(const T* _t) const {
|
||||
Periodic_tetrahedron construct_periodic_tetrahedron() const {
|
||||
CGAL_assertion(pos != typename T::Cell_handle());
|
||||
Offset off0, off1, off2, off3;
|
||||
get_edge_offsets(off0, off1, off2, off3);
|
||||
|
|
@ -438,13 +438,13 @@ public:
|
|||
|
||||
reference operator*() const
|
||||
{
|
||||
periodic_triangle = construct_periodic_triangle(_t);
|
||||
periodic_triangle = construct_periodic_triangle();
|
||||
return periodic_triangle;
|
||||
}
|
||||
|
||||
pointer operator->() const
|
||||
{
|
||||
periodic_triangle = construct_periodic_triangle(_t);
|
||||
periodic_triangle = construct_periodic_triangle();
|
||||
return &periodic_triangle;
|
||||
}
|
||||
|
||||
|
|
@ -587,7 +587,7 @@ private:
|
|||
return( 4*offx + 2*offy + offz );
|
||||
}
|
||||
|
||||
Periodic_triangle construct_periodic_triangle(const T* _t) const {
|
||||
Periodic_triangle construct_periodic_triangle() const {
|
||||
CGAL_assertion(pos->first != typename T::Cell_handle());
|
||||
Offset off0, off1, off2;
|
||||
get_edge_offsets(off0, off1, off2);
|
||||
|
|
@ -723,13 +723,13 @@ public:
|
|||
|
||||
reference operator*() const
|
||||
{
|
||||
periodic_segment = construct_periodic_segment(_t);
|
||||
periodic_segment = construct_periodic_segment();
|
||||
return periodic_segment;
|
||||
}
|
||||
|
||||
pointer operator->() const
|
||||
{
|
||||
periodic_segment = construct_periodic_segment(_t);
|
||||
periodic_segment = construct_periodic_segment();
|
||||
return &periodic_segment;
|
||||
}
|
||||
|
||||
|
|
@ -846,7 +846,7 @@ private:
|
|||
+ (diff_off.z() == 0 ? 0:1) );
|
||||
}
|
||||
|
||||
Periodic_segment construct_periodic_segment(const T* _t) const {
|
||||
Periodic_segment construct_periodic_segment() const {
|
||||
CGAL_assertion(pos->first != typename T::Cell_handle());
|
||||
Offset off0, off1;
|
||||
get_edge_offsets(off0, off1);
|
||||
|
|
@ -977,13 +977,13 @@ public:
|
|||
|
||||
reference operator*() const
|
||||
{
|
||||
periodic_point = construct_periodic_point(_t);
|
||||
periodic_point = construct_periodic_point();
|
||||
return periodic_point;
|
||||
}
|
||||
|
||||
pointer operator->() const
|
||||
{
|
||||
periodic_point = construct_periodic_point(_t);
|
||||
periodic_point = construct_periodic_point();
|
||||
return &periodic_point;
|
||||
}
|
||||
|
||||
|
|
@ -1002,7 +1002,7 @@ private:
|
|||
return (_t->get_offset(pos) == Offset(0,0,0));
|
||||
}
|
||||
|
||||
Periodic_point construct_periodic_point(const T* _t) const {
|
||||
Periodic_point construct_periodic_point() const {
|
||||
CGAL_assertion(pos != typename T::Vertex_handle());
|
||||
Offset off = _t->get_offset(pos);
|
||||
return std::make_pair(pos->point(),off);
|
||||
|
|
|
|||
Loading…
Reference in New Issue