mirror of https://github.com/CGAL/cgal
type of boolean marks modified from int to size_type in both Combinatorial_map and Linear_cell_complex
This commit is contained in:
parent
040924ad27
commit
41464f142f
|
|
@ -7,13 +7,43 @@
|
|||
typedef CGAL::Combinatorial_map<3> CMap_3;
|
||||
typedef CMap_3::Dart_handle Dart_handle;
|
||||
|
||||
typedef CMap_3::size_type size_type;
|
||||
|
||||
typedef CMap_3::Exception_mark_is_out_of_border Exception_mark_is_out_of_border;
|
||||
|
||||
int main()
|
||||
{
|
||||
CMap_3 cm;
|
||||
|
||||
// we try to reserve more marks than available
|
||||
std::cout << cm.NB_MARKS << " available marks\n";
|
||||
size_type marks[cm.NB_MARKS+1];
|
||||
for (size_type i=0;i<cm.NB_MARKS+1;i++)
|
||||
{
|
||||
try
|
||||
{
|
||||
marks[i] = cm.get_new_mark();
|
||||
}
|
||||
catch (Exception_mark_is_out_of_border e)
|
||||
{
|
||||
std::cout << "Mark number " << i << " is NOT ok\n";
|
||||
std::cerr<<"No more free mark, exit."<<std::endl;
|
||||
exit(-1);
|
||||
}
|
||||
std::cout << "Mark number " << i << " is ok\n";
|
||||
}
|
||||
for (size_type i=0;i<cm.NB_MARKS+1;i++)
|
||||
{
|
||||
cm.free_mark(marks[i]);
|
||||
}
|
||||
|
||||
// 1) Reserve a mark.
|
||||
int mark = cm.get_new_mark();
|
||||
if ( mark==-1 )
|
||||
size_type mark;
|
||||
try
|
||||
{
|
||||
mark = cm.get_new_mark();
|
||||
}
|
||||
catch (Exception_mark_is_out_of_border e)
|
||||
{
|
||||
std::cerr<<"No more free mark, exit."<<std::endl;
|
||||
exit(-1);
|
||||
|
|
|
|||
|
|
@ -1,72 +0,0 @@
|
|||
#include <CGAL/Combinatorial_map.h>
|
||||
#include <CGAL/Combinatorial_map_constructors.h>
|
||||
#include <CGAL/Combinatorial_map_operations.h>
|
||||
#include <iostream>
|
||||
#include <cstdlib>
|
||||
|
||||
typedef CGAL::Combinatorial_map<3> CMap_3;
|
||||
typedef CMap_3::Dart_handle Dart_handle;
|
||||
|
||||
int main()
|
||||
{
|
||||
CMap_3 cm;
|
||||
|
||||
// 1) Reserve a mark.
|
||||
std::cout << cm.NB_MARKS << " available marks\n";
|
||||
|
||||
// we try to reserve more marks than available
|
||||
int marks[cm.NB_MARKS+1];
|
||||
for (unsigned int i=0;i<cm.NB_MARKS+1;i++)
|
||||
{
|
||||
marks[i] = cm.get_new_mark();
|
||||
if (marks[i] == -1)
|
||||
{
|
||||
std::cout << "Mark number " << i << " is NOT ok\n";
|
||||
std::cerr<<"No more free mark, exit."<<std::endl;
|
||||
exit(-1);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "Mark number " << i << " is ok\n";
|
||||
}
|
||||
}
|
||||
|
||||
int mark = cm.get_new_mark();
|
||||
if ( mark==-1 )
|
||||
{
|
||||
std::cerr<<"No more free mark, exit."<<std::endl;
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
// 2) Create two tetrahedra.
|
||||
Dart_handle dh1 = CGAL::make_combinatorial_tetrahedron(cm);
|
||||
Dart_handle dh2 = CGAL::make_combinatorial_tetrahedron(cm);
|
||||
|
||||
// 3) 3-sew them.
|
||||
cm.sew<3>(dh1, dh2);
|
||||
|
||||
// 4) Mark the darts belonging to the first tetrahedron.
|
||||
for (CMap_3::Dart_of_cell_range<3>::iterator
|
||||
it(cm.darts_of_cell<3>(dh1).begin()),
|
||||
itend(cm.darts_of_cell<3>(dh1).end()); it!=itend; ++it)
|
||||
cm.mark(it, mark);
|
||||
|
||||
// 4) Remove the common 2-cell between the two cubes:
|
||||
// the two tetrahedra are merged.
|
||||
CGAL::remove_cell<CMap_3, 2>(cm, dh1);
|
||||
|
||||
// 5) Thanks to the mark, we know which darts come from the first tetrahedron.
|
||||
unsigned int res=0;
|
||||
for (CMap_3::Dart_range::iterator it(cm.darts().begin()),
|
||||
itend(cm.darts().end()); it!=itend; ++it)
|
||||
{
|
||||
if ( cm.is_marked(it, mark) )
|
||||
++res;
|
||||
}
|
||||
|
||||
std::cout<<"Number of darts from the first tetrahedron: "<<res<<std::endl;
|
||||
cm.free_mark(mark);
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
@ -105,8 +105,8 @@ namespace CGAL {
|
|||
unmark_treated_darts();
|
||||
this->mmap->free_mark(mcell_mark_number);
|
||||
this->mmap->free_mark(this->mmark_number);
|
||||
this->mcell_mark_number = -1; // To avoid basic class to try to unmark darts.
|
||||
this->mmark_number = -1; // To avoid basic class to try to unmark darts.
|
||||
this->mcell_mark_number = Map::MARK_ERROR; // To avoid basic class to try to unmark darts.
|
||||
this->mmark_number = Map::MARK_ERROR; // To avoid basic class to try to unmark darts.
|
||||
}
|
||||
|
||||
/// Copy constructor.
|
||||
|
|
@ -163,7 +163,7 @@ namespace CGAL {
|
|||
|
||||
private:
|
||||
/// A mark used to mark treated cells.
|
||||
int mcell_mark_number;
|
||||
typename Map::size_type mcell_mark_number;
|
||||
};
|
||||
//****************************************************************************
|
||||
/* Class CMap_cell_iterator<Map,Ite,i,dim,Tag_false>: to iterate onto the
|
||||
|
|
@ -217,7 +217,7 @@ namespace CGAL {
|
|||
if (this->mmap->get_number_of_times_mark_reserved(mmark_number)==1)
|
||||
unmark_treated_darts();
|
||||
this->mmap->free_mark(mmark_number);
|
||||
this->mmark_number = -1; // To avoid basic class to try to unmark darts.
|
||||
this->mmark_number = Map::MARK_ERROR; // To avoid basic class to try to unmark darts.
|
||||
}
|
||||
|
||||
/// Copy constructor.
|
||||
|
|
@ -268,7 +268,7 @@ namespace CGAL {
|
|||
|
||||
private:
|
||||
/// A mark used to mark treated cells.
|
||||
int mmark_number;
|
||||
typename Map::size_type mmark_number;
|
||||
};
|
||||
//****************************************************************************
|
||||
/* Class CMap_cell_iterator<Map,CMap_dart_iterator_basic_of_all<Map>,
|
||||
|
|
@ -333,7 +333,7 @@ namespace CGAL {
|
|||
if (this->mmap->get_number_of_times_mark_reserved(mmark_number)==1)
|
||||
unmark_treated_darts();
|
||||
this->mmap->free_mark(mmark_number);
|
||||
this->mmark_number = -1; // To avoid basic class to try to unmark darts.
|
||||
this->mmark_number = Map::MARK_ERROR; // To avoid basic class to try to unmark darts.
|
||||
}
|
||||
|
||||
/// Copy constructor.
|
||||
|
|
@ -384,7 +384,7 @@ namespace CGAL {
|
|||
|
||||
private:
|
||||
/// A mark used to mark treated cells.
|
||||
int mmark_number;
|
||||
typename Map::size_type mmark_number;
|
||||
};
|
||||
//****************************************************************************
|
||||
/* Class CMap_one_dart_per_incident_cell_iterator<Map,i,j,dim>: to iterate
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ namespace CGAL {
|
|||
* Definition of generic dD Combinatorial map.
|
||||
*/
|
||||
|
||||
|
||||
/** Generic definition of combinatorial map in dD.
|
||||
* The Combinatorial_map class describes an dD combinatorial map. It allows
|
||||
* mainly to create darts, to use marks onto these darts, to get and set
|
||||
|
|
@ -95,6 +96,8 @@ namespace CGAL {
|
|||
typedef typename Base::Use_index Use_index;
|
||||
|
||||
static const size_type NB_MARKS = Base::NB_MARKS;
|
||||
// to fix the use of -1 to test unused marks in several algorithms
|
||||
static const size_type MARK_ERROR = NB_MARKS;
|
||||
static const unsigned int dimension = Base::dimension;
|
||||
|
||||
typedef typename Base::Null_handle_type Null_handle_type;
|
||||
|
|
@ -143,6 +146,8 @@ namespace CGAL {
|
|||
public Base::template Attribute_const_range<i>
|
||||
{};
|
||||
|
||||
class Exception_mark_is_out_of_border {};
|
||||
|
||||
public:
|
||||
/** Default Combinatorial_map constructor.
|
||||
* The map is empty.
|
||||
|
|
@ -161,7 +166,7 @@ namespace CGAL {
|
|||
|
||||
for ( size_type i = 0; i < NB_MARKS; ++i)
|
||||
{
|
||||
this->mfree_marks_stack[i] = (int)i;
|
||||
this->mfree_marks_stack[i] = i;
|
||||
this->mindex_marks[i] = i;
|
||||
this->mnb_marked_darts[i] = 0;
|
||||
this->mnb_times_reserved_marks[i] = 0;
|
||||
|
|
@ -336,7 +341,7 @@ namespace CGAL {
|
|||
void clear()
|
||||
{
|
||||
mdarts.clear();
|
||||
for ( unsigned int i = 0; i < NB_MARKS; ++i)
|
||||
for ( size_type i = 0; i < NB_MARKS; ++i)
|
||||
this->mnb_marked_darts[i] = 0;
|
||||
|
||||
internal::Clear_all::run(mattribute_containers);
|
||||
|
|
@ -454,7 +459,7 @@ namespace CGAL {
|
|||
void erase_dart(Dart_handle adart)
|
||||
{
|
||||
// 1) We update the number of marked darts.
|
||||
for ( unsigned int i = 0; i < mnb_used_marks; ++i)
|
||||
for ( size_type i = 0; i < mnb_used_marks; ++i)
|
||||
{
|
||||
if (is_marked(adart, mused_marks_stack[i]))
|
||||
--mnb_marked_darts[mused_marks_stack[i]];
|
||||
|
|
@ -742,31 +747,31 @@ namespace CGAL {
|
|||
/** Test if a given mark is reserved.
|
||||
* @return true iff the mark is reserved (ie in used).
|
||||
*/
|
||||
bool is_reserved(int amark) const
|
||||
bool is_reserved(size_type amark) const
|
||||
{
|
||||
CGAL_assertion(amark>=0 && (size_type)amark<NB_MARKS);
|
||||
CGAL_assertion(amark>=0 && amark<NB_MARKS);
|
||||
// CGAL_assume( (size_type)amark<NB_MARKS );
|
||||
|
||||
return (mnb_times_reserved_marks[(size_type)amark]!=0);
|
||||
return (mnb_times_reserved_marks[amark]!=0);
|
||||
}
|
||||
|
||||
/** Count the number of marked darts for a given mark.
|
||||
* @param amark the mark index.
|
||||
* @return the number of marked darts for amark.
|
||||
*/
|
||||
size_type number_of_marked_darts(int amark) const
|
||||
size_type number_of_marked_darts(size_type amark) const
|
||||
{
|
||||
CGAL_assertion( is_reserved(amark) );
|
||||
// CGAL_assume( (size_type)amark<NB_MARKS );
|
||||
|
||||
return mnb_marked_darts[(size_type)amark];
|
||||
return mnb_marked_darts[amark];
|
||||
}
|
||||
|
||||
/** Count the number of unmarked darts for a given mark.
|
||||
* @param amark the mark index.
|
||||
* @return the number of unmarked darts for amark.
|
||||
*/
|
||||
size_type number_of_unmarked_darts(int amark) const
|
||||
size_type number_of_unmarked_darts(size_type amark) const
|
||||
{
|
||||
CGAL_assertion( is_reserved(amark) );
|
||||
return number_of_darts() - number_of_marked_darts(amark);
|
||||
|
|
@ -776,14 +781,14 @@ namespace CGAL {
|
|||
* @param amark the mark index.
|
||||
* @return true iff all the darts are unmarked for amark.
|
||||
*/
|
||||
bool is_whole_map_unmarked(int amark) const
|
||||
bool is_whole_map_unmarked(size_type amark) const
|
||||
{ return number_of_marked_darts(amark) == 0; }
|
||||
|
||||
/** Test if all the darts are marked for a given mark.
|
||||
* @param amark the mark index.
|
||||
* @return true iff all the darts are marked for amark.
|
||||
*/
|
||||
bool is_whole_map_marked(int amark) const
|
||||
bool is_whole_map_marked(size_type amark) const
|
||||
{ return number_of_marked_darts(amark) == number_of_darts(); }
|
||||
|
||||
/** Reserve a new mark.
|
||||
|
|
@ -792,16 +797,18 @@ namespace CGAL {
|
|||
* @return the index of the new mark.
|
||||
* @pre mnb_used_marks < NB_MARKS
|
||||
*/
|
||||
unsigned int get_new_mark() const
|
||||
size_type get_new_mark() const
|
||||
{
|
||||
if (mnb_used_marks == NB_MARKS)
|
||||
{
|
||||
std::cerr << "Not enough Boolean marks: "
|
||||
"increase NB_MARKS in item class." << std::endl;
|
||||
return -1;
|
||||
// return -1;
|
||||
std::cerr << " (exception launched)" << std::endl;
|
||||
throw Exception_mark_is_out_of_border();
|
||||
}
|
||||
|
||||
int m = mfree_marks_stack[mnb_used_marks];
|
||||
size_type m = mfree_marks_stack[mnb_used_marks];
|
||||
mused_marks_stack[mnb_used_marks] = m;
|
||||
|
||||
mindex_marks[m] = mnb_used_marks;
|
||||
|
|
@ -816,20 +823,20 @@ namespace CGAL {
|
|||
/** Increase the number of times a mark is reserved.
|
||||
* @param amark the mark to share.
|
||||
*/
|
||||
void share_a_mark(int amark) const
|
||||
void share_a_mark(size_type amark) const
|
||||
{
|
||||
CGAL_assertion( is_reserved(amark) );
|
||||
// CGAL_assume( (size_type)amark<NB_MARKS );
|
||||
|
||||
++mnb_times_reserved_marks[(size_type)amark];
|
||||
++mnb_times_reserved_marks[amark];
|
||||
}
|
||||
|
||||
/** @return the number of times a mark is reserved.
|
||||
* @param amark the mark to share.
|
||||
*/
|
||||
size_type get_number_of_times_mark_reserved(int amark) const
|
||||
size_type get_number_of_times_mark_reserved(size_type amark) const
|
||||
{
|
||||
CGAL_assertion( (size_type)amark<NB_MARKS );
|
||||
CGAL_assertion( amark<NB_MARKS );
|
||||
// CGAL_assume( (size_type)amark<NB_MARKS );
|
||||
|
||||
return mnb_times_reserved_marks[amark];
|
||||
|
|
@ -840,14 +847,14 @@ namespace CGAL {
|
|||
* unmarked darts become marked (in constant time operation).
|
||||
* @param amark the mark index
|
||||
*/
|
||||
void negate_mark(int amark) const
|
||||
void negate_mark(size_type amark) const
|
||||
{
|
||||
CGAL_assertion( is_reserved(amark) );
|
||||
// CGAL_assume( (size_type)amark<NB_MARKS );
|
||||
|
||||
mnb_marked_darts[amark] = number_of_darts() - mnb_marked_darts[amark];
|
||||
|
||||
mmask_marks.flip((size_type)amark);
|
||||
mmask_marks.flip(amark);
|
||||
}
|
||||
|
||||
/** Test if a given dart is marked for a given mark.
|
||||
|
|
@ -855,13 +862,13 @@ namespace CGAL {
|
|||
* @param amark the given mark.
|
||||
* @return true iff adart is marked for the mark amark.
|
||||
*/
|
||||
bool is_marked(Dart_const_handle adart, int amark) const
|
||||
bool is_marked(Dart_const_handle adart, size_type amark) const
|
||||
{
|
||||
// CGAL_assertion( adart != null_dart_handle );
|
||||
CGAL_assertion( is_reserved(amark) );
|
||||
// CGAL_assume( (size_type)amark<NB_MARKS );
|
||||
|
||||
return get_dart_mark(adart, amark)!=mmask_marks[(size_type)amark];
|
||||
return get_dart_mark(adart, amark)!=mmask_marks[amark];
|
||||
}
|
||||
|
||||
/** Set the mark of a given dart to a state (on or off).
|
||||
|
|
@ -869,7 +876,7 @@ namespace CGAL {
|
|||
* @param amark the given mark.
|
||||
* @param astate the state of the mark (on or off).
|
||||
*/
|
||||
void set_mark_to(Dart_const_handle adart, int amark,
|
||||
void set_mark_to(Dart_const_handle adart, size_type amark,
|
||||
bool astate) const
|
||||
{
|
||||
CGAL_assertion( adart != null_dart_handle );
|
||||
|
|
@ -878,8 +885,8 @@ namespace CGAL {
|
|||
|
||||
if (is_marked(adart, amark) != astate)
|
||||
{
|
||||
if (astate) ++mnb_marked_darts[(size_type)amark];
|
||||
else --mnb_marked_darts[(size_type)amark];
|
||||
if (astate) ++mnb_marked_darts[amark];
|
||||
else --mnb_marked_darts[amark];
|
||||
|
||||
flip_dart_mark(adart, amark);
|
||||
}
|
||||
|
|
@ -889,7 +896,7 @@ namespace CGAL {
|
|||
* @param adart the dart.
|
||||
* @param amark the given mark.
|
||||
*/
|
||||
void mark(Dart_const_handle adart, int amark) const
|
||||
void mark(Dart_const_handle adart, size_type amark) const
|
||||
{
|
||||
CGAL_assertion( adart != null_dart_handle );
|
||||
CGAL_assertion( is_reserved(amark) );
|
||||
|
|
@ -897,7 +904,7 @@ namespace CGAL {
|
|||
|
||||
if (is_marked(adart, amark)) return;
|
||||
|
||||
++mnb_marked_darts[(size_type)amark];
|
||||
++mnb_marked_darts[amark];
|
||||
flip_dart_mark(adart, amark);
|
||||
}
|
||||
|
||||
|
|
@ -905,7 +912,7 @@ namespace CGAL {
|
|||
* @param adart the dart.
|
||||
* @param amark the given mark.
|
||||
*/
|
||||
void unmark(Dart_const_handle adart, int amark) const
|
||||
void unmark(Dart_const_handle adart, size_type amark) const
|
||||
{
|
||||
CGAL_assertion( adart != null_dart_handle );
|
||||
CGAL_assertion( is_reserved(amark) );
|
||||
|
|
@ -913,7 +920,7 @@ namespace CGAL {
|
|||
|
||||
if (!is_marked(adart, amark)) return;
|
||||
|
||||
--mnb_marked_darts[(size_type)amark];
|
||||
--mnb_marked_darts[amark];
|
||||
flip_dart_mark(adart, amark);
|
||||
}
|
||||
|
||||
|
|
@ -922,7 +929,7 @@ namespace CGAL {
|
|||
* as number of marked darts.
|
||||
* @param amark the given mark.
|
||||
*/
|
||||
void mark_null_dart(int amark) const
|
||||
void mark_null_dart(size_type amark) const
|
||||
{
|
||||
CGAL_assertion( is_reserved(amark) );
|
||||
// CGAL_assume( (size_type)amark<NB_MARKS );
|
||||
|
|
@ -930,13 +937,13 @@ namespace CGAL {
|
|||
#ifdef CGAL_CMAP_DEPRECATED
|
||||
if ( null_dart_handle!=NULL ) // Pb with static null_dart_handle for windows
|
||||
#endif // CGAL_CMAP_DEPRECATED
|
||||
set_dart_mark(null_dart_handle, amark, !mmask_marks[(size_type)amark]);
|
||||
set_dart_mark(null_dart_handle, amark, !mmask_marks[amark]);
|
||||
}
|
||||
|
||||
/** Unmark null_dart.
|
||||
* @param amark the given mark.
|
||||
*/
|
||||
void unmark_null_dart(int amark) const
|
||||
void unmark_null_dart(size_type amark) const
|
||||
{
|
||||
CGAL_assertion( is_reserved(amark) );
|
||||
// CGAL_assume( (size_type)amark<NB_MARKS );
|
||||
|
|
@ -944,7 +951,7 @@ namespace CGAL {
|
|||
#ifdef CGAL_CMAP_DEPRECATED
|
||||
if ( null_dart_handle!=NULL ) // Pb with static null_dart_handle for windows
|
||||
#endif // CGAL_CMAP_DEPRECATED
|
||||
set_dart_mark(null_dart_handle, amark, mmask_marks[(size_type)amark]);
|
||||
set_dart_mark(null_dart_handle, amark, mmask_marks[amark]);
|
||||
}
|
||||
|
||||
/** Unmark all the darts of the map for a given mark.
|
||||
|
|
@ -952,7 +959,7 @@ namespace CGAL {
|
|||
* operations, otherwise it traverses all the darts of the map.
|
||||
* @param amark the given mark.
|
||||
*/
|
||||
void unmark_all(int amark) const
|
||||
void unmark_all(size_type amark) const
|
||||
{
|
||||
CGAL_assertion( is_reserved(amark) );
|
||||
|
||||
|
|
@ -973,7 +980,7 @@ namespace CGAL {
|
|||
/** Free a given mark, previously calling unmark_all_darts.
|
||||
* @param amark the given mark.
|
||||
*/
|
||||
void free_mark(int amark) const
|
||||
void free_mark(size_type amark) const
|
||||
{
|
||||
CGAL_assertion( is_reserved(amark) );
|
||||
// CGAL_assume( (size_type)amark<NB_MARKS );
|
||||
|
|
@ -988,14 +995,14 @@ namespace CGAL {
|
|||
|
||||
// 1) We remove amark from the array mused_marks_stack by
|
||||
// replacing it with the last mark in this array.
|
||||
mused_marks_stack[mindex_marks[(size_type)amark]] =
|
||||
mused_marks_stack[mindex_marks[amark]] =
|
||||
mused_marks_stack[--mnb_used_marks];
|
||||
mindex_marks[mused_marks_stack[mnb_used_marks]] =
|
||||
mindex_marks[(size_type)amark];
|
||||
mindex_marks[amark];
|
||||
|
||||
// 2) We add amark in the array mfree_marks_stack and update its index.
|
||||
mfree_marks_stack[ mnb_used_marks ] = amark;
|
||||
mindex_marks[(size_type)amark] = mnb_used_marks;
|
||||
mindex_marks[amark] = mnb_used_marks;
|
||||
|
||||
mnb_times_reserved_marks[amark]=0;
|
||||
}
|
||||
|
|
@ -1084,9 +1091,9 @@ namespace CGAL {
|
|||
{
|
||||
bool valid = true;
|
||||
unsigned int i = 0, j = 0;
|
||||
std::vector<int> marks(dimension+1);
|
||||
std::vector<size_type> marks(dimension+1);
|
||||
for ( i=0; i<=dimension; ++i)
|
||||
marks[i] = -1;
|
||||
marks[i] = MARK_ERROR;
|
||||
|
||||
Helper::template
|
||||
Foreach_enabled_attributes<Reserve_mark_functor<Self> >::
|
||||
|
|
@ -1098,7 +1105,7 @@ namespace CGAL {
|
|||
if ( !valid )
|
||||
{ // We continue the traversal to mark all the darts.
|
||||
for ( i=0; i<=dimension; ++i)
|
||||
if (marks[i]!=-1) mark(it,marks[i]);
|
||||
if (marks[i]!=MARK_ERROR) mark(it,marks[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1171,7 +1178,7 @@ namespace CGAL {
|
|||
}
|
||||
}
|
||||
for ( i=0; i<=dimension; ++i)
|
||||
if ( marks[i]!=-1 )
|
||||
if ( marks[i]!=MARK_ERROR )
|
||||
{
|
||||
CGAL_assertion( is_whole_map_marked(marks[i]) );
|
||||
free_mark(marks[i]);
|
||||
|
|
@ -1183,9 +1190,9 @@ namespace CGAL {
|
|||
/// correct invalid attributes in the map
|
||||
void correct_invalid_attributes()
|
||||
{
|
||||
std::vector<int> marks(dimension+1);
|
||||
std::vector<size_type> marks(dimension+1);
|
||||
for ( unsigned int i=0; i<=dimension; ++i)
|
||||
marks[i] = -1;
|
||||
marks[i] = MARK_ERROR;
|
||||
|
||||
Helper::template
|
||||
Foreach_enabled_attributes<Reserve_mark_functor<Self> >::
|
||||
|
|
@ -1200,7 +1207,7 @@ namespace CGAL {
|
|||
}
|
||||
|
||||
for ( unsigned int i=0; i<=dimension; ++i)
|
||||
if ( marks[i]!=-1 )
|
||||
if ( marks[i]!=MARK_ERROR )
|
||||
{
|
||||
CGAL_assertion( is_whole_map_marked(marks[i]) );
|
||||
free_mark(marks[i]);
|
||||
|
|
@ -1257,7 +1264,7 @@ namespace CGAL {
|
|||
CGAL_static_assertion( (boost::is_same<typename Ite::Basic_iterator,
|
||||
Tag_true>::value) );
|
||||
unsigned int nb = 0;
|
||||
int amark = get_new_mark();
|
||||
size_type amark = get_new_mark();
|
||||
for ( typename Dart_range::const_iterator it1(darts().begin()),
|
||||
itend(darts().end()); it1!=itend; ++it1)
|
||||
{
|
||||
|
|
@ -1843,7 +1850,7 @@ namespace CGAL {
|
|||
}
|
||||
else
|
||||
{
|
||||
int m = get_new_mark();
|
||||
size_type m = get_new_mark();
|
||||
std::deque<Dart_handle> dartv;
|
||||
for ( CGAL::CMap_dart_iterator_basic_of_cell<Self,0>
|
||||
it(*this, adart1, m); it.cont(); ++it )
|
||||
|
|
@ -1937,7 +1944,7 @@ namespace CGAL {
|
|||
return;
|
||||
}
|
||||
|
||||
int m = get_new_mark();
|
||||
size_type m = get_new_mark();
|
||||
std::deque<Dart_handle> dartv;
|
||||
for ( CGAL::CMap_dart_iterator_basic_of_cell<Self, 0>
|
||||
it(*this, adart1, m); it.cont(); ++it )
|
||||
|
|
@ -1946,8 +1953,18 @@ namespace CGAL {
|
|||
dartv.push_back(it);
|
||||
}
|
||||
|
||||
int mark = get_new_mark();
|
||||
CGAL_assertion( mark!=-1 );
|
||||
// size_type mark = get_new_mark();
|
||||
// CGAL_assertion( mark!=-1 );
|
||||
size_type mark;
|
||||
try
|
||||
{
|
||||
mark = get_new_mark();
|
||||
}
|
||||
catch (Exception_mark_is_out_of_border e)
|
||||
{
|
||||
std::cerr<<"No more free mark, exit."<<std::endl;
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
CGAL::CMap_dart_iterator_basic_of_involution<Self, 1>
|
||||
I1(*this, adart1, mark);
|
||||
|
|
@ -2009,7 +2026,7 @@ namespace CGAL {
|
|||
return;
|
||||
}
|
||||
|
||||
int m = get_new_mark();
|
||||
size_type m = get_new_mark();
|
||||
std::deque<Dart_handle> dartv;
|
||||
for ( CGAL::CMap_dart_iterator_basic_of_cell<Self, 0>
|
||||
it(*this, adart1, m); it.cont(); ++it )
|
||||
|
|
@ -2018,8 +2035,18 @@ namespace CGAL {
|
|||
dartv.push_back(it);
|
||||
}
|
||||
|
||||
int mark = get_new_mark();
|
||||
CGAL_assertion( mark!=-1 );
|
||||
// int mark = get_new_mark();
|
||||
// CGAL_assertion( mark!=-1 );
|
||||
size_type mark;
|
||||
try
|
||||
{
|
||||
mark = get_new_mark();
|
||||
}
|
||||
catch (Exception_mark_is_out_of_border e)
|
||||
{
|
||||
std::cerr<<"No more free mark, exit."<<std::endl;
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
CGAL::CMap_dart_iterator_basic_of_involution<Self, 1>
|
||||
I1(*this, adart1, mark);
|
||||
|
|
@ -2075,8 +2102,18 @@ namespace CGAL {
|
|||
CGAL_assertion( 2<=i && i<=dimension );
|
||||
CGAL_assertion( (is_sewable<i>(adart1,adart2)) );
|
||||
|
||||
int mark=get_new_mark();
|
||||
CGAL_assertion( mark!=-1 );
|
||||
// int mark=get_new_mark();
|
||||
// CGAL_assertion( mark!=-1 );
|
||||
size_type mark;
|
||||
try
|
||||
{
|
||||
mark = get_new_mark();
|
||||
}
|
||||
catch (Exception_mark_is_out_of_border e)
|
||||
{
|
||||
std::cerr<<"No more free mark, exit."<<std::endl;
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
CGAL::CMap_dart_iterator_basic_of_involution<Self, i>
|
||||
I1(*this, adart1, mark);
|
||||
|
|
@ -2150,7 +2187,7 @@ namespace CGAL {
|
|||
{
|
||||
CGAL_assertion( !this->template is_free<1>(adart) );
|
||||
|
||||
int m = get_new_mark();
|
||||
size_type m = get_new_mark();
|
||||
std::deque<Dart_handle> dartv;
|
||||
for ( CGAL::CMap_dart_iterator_basic_of_cell<Self,0> it(*this, adart, m);
|
||||
it.cont(); ++it )
|
||||
|
|
@ -2228,7 +2265,7 @@ namespace CGAL {
|
|||
{
|
||||
CGAL_assertion( !this->template is_free<0>(adart) );
|
||||
|
||||
int m=get_new_mark();
|
||||
size_type m=get_new_mark();
|
||||
std::deque<Dart_handle> dartv;
|
||||
std::deque<Dart_handle> modified_darts;
|
||||
std::deque<Dart_handle> modified_darts2;
|
||||
|
|
@ -2282,7 +2319,7 @@ namespace CGAL {
|
|||
{
|
||||
CGAL_assertion( !this->template is_free<1>(adart) );
|
||||
|
||||
int m = get_new_mark();
|
||||
size_type m = get_new_mark();
|
||||
std::deque<Dart_handle> dartv;
|
||||
std::deque<Dart_handle> modified_darts;
|
||||
std::deque<Dart_handle> modified_darts2;
|
||||
|
|
@ -2417,23 +2454,23 @@ namespace CGAL {
|
|||
* @return a vector containing the number of cells.
|
||||
*/
|
||||
std::vector<unsigned int>
|
||||
count_marked_cells(int amark, const std::vector<unsigned int>& acells) const
|
||||
count_marked_cells(size_type amark, const std::vector<unsigned int>& acells) const
|
||||
{
|
||||
std::vector<unsigned int> res(dimension+2);
|
||||
std::vector<int> marks(dimension+2);
|
||||
std::vector<size_type> marks(dimension+2);
|
||||
|
||||
// Initialization of the result
|
||||
for ( unsigned int i=0; i<dimension+2; ++i)
|
||||
{
|
||||
res[i]=0;
|
||||
marks[i]=-1;
|
||||
marks[i]=MARK_ERROR;
|
||||
}
|
||||
|
||||
// Mark reservation
|
||||
for ( unsigned int i=0; i<acells.size(); ++i)
|
||||
{
|
||||
CGAL_assertion(acells[i]<=dimension+1);
|
||||
if ( marks[acells[i]]==-1 )
|
||||
if ( marks[acells[i]]==MARK_ERROR )
|
||||
{
|
||||
marks[acells[i]] = get_new_mark();
|
||||
}
|
||||
|
|
@ -2492,7 +2529,7 @@ namespace CGAL {
|
|||
count_cells(const std::vector<unsigned int>& acells) const
|
||||
{
|
||||
std::vector<unsigned int> res;
|
||||
int m = get_new_mark();
|
||||
size_type m = get_new_mark();
|
||||
negate_mark(m); // We mark all the cells.
|
||||
|
||||
res = count_marked_cells(m, acells);
|
||||
|
|
@ -2536,10 +2573,10 @@ namespace CGAL {
|
|||
* @param amark the mark.
|
||||
* @return the mask associated to mark amark.
|
||||
*/
|
||||
bool get_mask_mark(int amark) const
|
||||
bool get_mask_mark(size_type amark) const
|
||||
{
|
||||
CGAL_assertion(amark>=0 && (size_type)amark<NB_MARKS);
|
||||
return mmask_marks[(size_type)amark];
|
||||
CGAL_assertion(amark>=0 && amark<NB_MARKS);
|
||||
return mmask_marks[amark];
|
||||
}
|
||||
|
||||
public:
|
||||
|
|
@ -2551,7 +2588,7 @@ namespace CGAL {
|
|||
* @param amark the mark of darts to erase.
|
||||
* @return the number of removed darts.
|
||||
*/
|
||||
unsigned int erase_marked_darts(int amark)
|
||||
unsigned int erase_marked_darts(size_type amark)
|
||||
{
|
||||
unsigned int res = 0, i = 0;
|
||||
Dart_handle d;
|
||||
|
|
@ -2581,7 +2618,7 @@ namespace CGAL {
|
|||
<Self, CGAL::CMap_dart_iterator_basic_of_orbit<Self,Beta...>,
|
||||
CGAL::CMap_dart_const_iterator_basic_of_orbit<Self,Beta...> > Base;
|
||||
|
||||
Dart_of_orbit_basic_range(Self &amap, Dart_handle adart, int amark=-1):
|
||||
Dart_of_orbit_basic_range(Self &amap, Dart_handle adart, size_type amark=MARK_ERROR):
|
||||
Base(amap, adart, amark)
|
||||
{}
|
||||
};
|
||||
|
|
@ -2596,7 +2633,7 @@ namespace CGAL {
|
|||
Base;
|
||||
|
||||
Dart_of_orbit_basic_const_range(const Self &amap, Dart_const_handle
|
||||
adart, int amark=-1):
|
||||
adart, size_type amark=MARK_ERROR):
|
||||
Base(amap, adart, amark)
|
||||
{}
|
||||
};
|
||||
|
|
@ -2640,12 +2677,12 @@ namespace CGAL {
|
|||
//--------------------------------------------------------------------------
|
||||
template<unsigned int ... Beta>
|
||||
Dart_of_orbit_basic_range<Beta...> darts_of_orbit_basic(Dart_handle adart,
|
||||
int amark=-1)
|
||||
size_type amark=MARK_ERROR)
|
||||
{ return Dart_of_orbit_basic_range<Beta...>(*this,adart,amark); }
|
||||
//--------------------------------------------------------------------------
|
||||
template<unsigned int ... Beta>
|
||||
Dart_of_orbit_basic_const_range<Beta...>
|
||||
darts_of_orbit_basic(Dart_const_handle adart, int amark=-1) const
|
||||
darts_of_orbit_basic(Dart_const_handle adart, size_type amark=MARK_ERROR) const
|
||||
{ return Dart_of_orbit_basic_const_range<Beta...>(*this,adart,amark); }
|
||||
//**************************************************************************
|
||||
#else
|
||||
|
|
@ -2666,7 +2703,7 @@ namespace CGAL {
|
|||
B6,B7,B8,B9> > Base;
|
||||
|
||||
Dart_of_orbit_basic_range(Self &amap, Dart_handle adart,
|
||||
int /*amark*/=-1):
|
||||
size_type /*amark*/=MARK_ERROR):
|
||||
Base(amap, adart)
|
||||
{}
|
||||
};
|
||||
|
|
@ -2684,7 +2721,7 @@ namespace CGAL {
|
|||
<Self,B1,B2,B3,B4,B5,B6,B7,B8,B9> > Base;
|
||||
|
||||
Dart_of_orbit_basic_const_range(const Self &amap,
|
||||
Dart_const_handle adart, int amark=-1):
|
||||
Dart_const_handle adart, size_type amark=MARK_ERROR):
|
||||
Base(amap, adart, amark)
|
||||
{}
|
||||
};
|
||||
|
|
@ -2830,104 +2867,104 @@ namespace CGAL {
|
|||
//--------------------------------------------------------------------------
|
||||
// Basic versions
|
||||
Dart_of_orbit_basic_range<> darts_of_orbit_basic(Dart_handle adart,
|
||||
int amark=-1)
|
||||
size_type amark=MARK_ERROR)
|
||||
{ return Dart_of_orbit_basic_range<>(*this,adart,amark); }
|
||||
//--------------------------------------------------------------------------
|
||||
Dart_of_orbit_basic_const_range<> darts_of_orbit_basic
|
||||
(Dart_const_handle adart,int amark=-1) const
|
||||
(Dart_const_handle adart,size_type amark=MARK_ERROR) const
|
||||
{ return Dart_of_orbit_basic_const_range<>(*this,adart,amark); }
|
||||
//--------------------------------------------------------------------------
|
||||
template <unsigned int B1>
|
||||
Dart_of_orbit_basic_range<B1> darts_of_orbit_basic(Dart_handle adart,
|
||||
int amark=-1)
|
||||
size_type amark=MARK_ERROR)
|
||||
{ return Dart_of_orbit_basic_range<B1>(*this,adart,amark); }
|
||||
//--------------------------------------------------------------------------
|
||||
template <unsigned int B1>
|
||||
Dart_of_orbit_basic_const_range<B1> darts_of_orbit_basic
|
||||
(Dart_const_handle adart, int amark=-1) const
|
||||
(Dart_const_handle adart, size_type amark=MARK_ERROR) const
|
||||
{ return Dart_of_orbit_basic_const_range<B1>(*this,adart,amark); }
|
||||
//--------------------------------------------------------------------------
|
||||
template <unsigned int B1,unsigned int B2>
|
||||
Dart_of_orbit_basic_range<B1,B2> darts_of_orbit_basic(Dart_handle adart,
|
||||
int amark=-1)
|
||||
size_type amark=MARK_ERROR)
|
||||
{ return Dart_of_orbit_basic_range<B1,B2>(*this,adart,amark); }
|
||||
//--------------------------------------------------------------------------
|
||||
template <unsigned int B1,unsigned int B2>
|
||||
Dart_of_orbit_basic_const_range<B1,B2> darts_of_orbit_basic
|
||||
(Dart_const_handle adart, int amark=-1) const
|
||||
(Dart_const_handle adart, size_type amark=MARK_ERROR) const
|
||||
{ return Dart_of_orbit_basic_const_range<B1,B2>(*this,adart,amark); }
|
||||
//--------------------------------------------------------------------------
|
||||
template <unsigned int B1,unsigned int B2,unsigned int B3>
|
||||
Dart_of_orbit_basic_range<B1,B2,B3> darts_of_orbit_basic(Dart_handle adart,
|
||||
int amark=-1)
|
||||
size_type amark=MARK_ERROR)
|
||||
{ return Dart_of_orbit_basic_range<B1,B2,B3>(*this,adart,amark); }
|
||||
//--------------------------------------------------------------------------
|
||||
template <unsigned int B1,unsigned int B2,unsigned int B3>
|
||||
Dart_of_orbit_basic_const_range<B1,B2,B3> darts_of_orbit_basic
|
||||
(Dart_const_handle adart, int amark=-1) const
|
||||
(Dart_const_handle adart, size_type amark=MARK_ERROR) const
|
||||
{ return Dart_of_orbit_basic_const_range<B1,B2,B3>(*this,adart,amark); }
|
||||
//--------------------------------------------------------------------------
|
||||
template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4>
|
||||
Dart_of_orbit_basic_range<B1,B2,B3,B4> darts_of_orbit_basic
|
||||
(Dart_handle adart, int amark=-1)
|
||||
(Dart_handle adart, size_type amark=MARK_ERROR)
|
||||
{ return Dart_of_orbit_basic_range<B1,B2,B3,B4>(*this,adart,amark); }
|
||||
//--------------------------------------------------------------------------
|
||||
template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4>
|
||||
Dart_of_orbit_basic_const_range<B1,B2,B3,B4>
|
||||
darts_of_orbit_basic(Dart_const_handle adart, int amark=-1) const
|
||||
darts_of_orbit_basic(Dart_const_handle adart, size_type amark=MARK_ERROR) const
|
||||
{ return Dart_of_orbit_basic_const_range<B1,B2,B3,B4>(*this,adart,amark); }
|
||||
//--------------------------------------------------------------------------
|
||||
template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
|
||||
unsigned int B5>
|
||||
Dart_of_orbit_basic_range<B1,B2,B3,B4,B5> darts_of_orbit_basic
|
||||
(Dart_handle adart, int amark=-1)
|
||||
(Dart_handle adart, size_type amark=MARK_ERROR)
|
||||
{ return Dart_of_orbit_basic_range<B1,B2,B3,B4,B5>(*this,adart,amark); }
|
||||
//--------------------------------------------------------------------------
|
||||
template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
|
||||
unsigned int B5>
|
||||
Dart_of_orbit_basic_const_range<B1,B2,B3,B4,B5>
|
||||
darts_of_orbit_basic(Dart_const_handle adart, int amark=-1) const
|
||||
darts_of_orbit_basic(Dart_const_handle adart, size_type amark=MARK_ERROR) const
|
||||
{ return Dart_of_orbit_basic_const_range<B1,B2,B3,B4,B5>
|
||||
(*this,adart,amark); }
|
||||
//--------------------------------------------------------------------------
|
||||
template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
|
||||
unsigned int B5,unsigned int B6>
|
||||
Dart_of_orbit_basic_range<B1,B2,B3,B4,B5,B6> darts_of_orbit_basic
|
||||
(Dart_handle adart, int amark=-1)
|
||||
(Dart_handle adart, size_type amark=MARK_ERROR)
|
||||
{ return Dart_of_orbit_basic_range<B1,B2,B3,B4,B5,B6>(*this,adart,amark); }
|
||||
//--------------------------------------------------------------------------
|
||||
template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
|
||||
unsigned int B5,unsigned int B6>
|
||||
Dart_of_orbit_basic_const_range<B1,B2,B3,B4,B5,B6>
|
||||
darts_of_orbit_basic(Dart_const_handle adart, int amark=-1) const
|
||||
darts_of_orbit_basic(Dart_const_handle adart, size_type amark=MARK_ERROR) const
|
||||
{ return Dart_of_orbit_basic_const_range<B1,B2,B3,B4,B5,B6>
|
||||
(*this,adart,amark); }
|
||||
//--------------------------------------------------------------------------
|
||||
template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
|
||||
unsigned int B5,unsigned int B6,unsigned int B7>
|
||||
Dart_of_orbit_basic_range<B1,B2,B3,B4,B5,B6,B7> darts_of_orbit_basic
|
||||
(Dart_handle adart, int amark=-1)
|
||||
(Dart_handle adart, size_type amark=MARK_ERROR)
|
||||
{ return Dart_of_orbit_basic_range<B1,B2,B3,B4,B5,B6,B7>
|
||||
(*this,adart,amark); }
|
||||
//--------------------------------------------------------------------------
|
||||
template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
|
||||
unsigned int B5,unsigned int B6,unsigned int B7>
|
||||
Dart_of_orbit_basic_const_range<B1,B2,B3,B4,B5,B6,B7>
|
||||
darts_of_orbit_basic(Dart_const_handle adart, int amark=-1) const
|
||||
darts_of_orbit_basic(Dart_const_handle adart, size_type amark=MARK_ERROR) const
|
||||
{ return Dart_of_orbit_basic_const_range<B1,B2,B3,B4,B5,B6,B7>
|
||||
(*this,adart,amark); }
|
||||
//--------------------------------------------------------------------------
|
||||
template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
|
||||
unsigned int B5,unsigned int B6,unsigned int B7,unsigned int B8>
|
||||
Dart_of_orbit_basic_range<B1,B2,B3,B4,B5,B6,B7,B8> darts_of_orbit
|
||||
(Dart_handle adart, int amark=-1)
|
||||
(Dart_handle adart, size_type amark=MARK_ERROR)
|
||||
{ return Dart_of_orbit_basic_range<B1,B2,B3,B4,B5,B6,B7,B8>
|
||||
(*this,adart,amark); }
|
||||
//--------------------------------------------------------------------------
|
||||
template <unsigned int B1,unsigned int B2,unsigned int B3,unsigned int B4,
|
||||
unsigned int B5,unsigned int B6,unsigned int B7,unsigned int B8>
|
||||
Dart_of_orbit_basic_const_range<B1,B2,B3,B4,B5,B6,B7,B8>
|
||||
darts_of_orbit_basic(Dart_const_handle adart, int amark=-1) const
|
||||
darts_of_orbit_basic(Dart_const_handle adart, size_type amark=MARK_ERROR) const
|
||||
{ return Dart_of_orbit_basic_const_range<B1,B2,B3,B4,B5,B6,B7,B8>
|
||||
(*this,adart,amark); }
|
||||
//--------------------------------------------------------------------------
|
||||
|
|
@ -2935,7 +2972,7 @@ namespace CGAL {
|
|||
unsigned int B5,unsigned int B6,unsigned int B7,unsigned int B8,
|
||||
unsigned int B9>
|
||||
Dart_of_orbit_basic_range<B1,B2,B3,B4,B5,B6,B7,B8,B9>
|
||||
darts_of_orbit_basic(Dart_handle adart, int amark=-1)
|
||||
darts_of_orbit_basic(Dart_handle adart, size_type amark=MARK_ERROR)
|
||||
{ return Dart_of_orbit_basic_range<B1,B2,B3,B4,B5,B6,B7,B8,B9>
|
||||
(*this,adart,amark); }
|
||||
//--------------------------------------------------------------------------
|
||||
|
|
@ -2943,7 +2980,7 @@ namespace CGAL {
|
|||
unsigned int B5,unsigned int B6,unsigned int B7,unsigned int B8,
|
||||
unsigned int B9>
|
||||
Dart_of_orbit_basic_const_range<B1,B2,B3,B4,B5,B6,B7,B8,B9>
|
||||
darts_of_orbit_basic(Dart_const_handle adart, int amark=-1) const
|
||||
darts_of_orbit_basic(Dart_const_handle adart, size_type amark=MARK_ERROR) const
|
||||
{ return Dart_of_orbit_basic_const_range<B1,B2,B3,B4,B5,B6,B7,B8,B9>
|
||||
(*this,adart,amark); }
|
||||
//**************************************************************************
|
||||
|
|
@ -2959,7 +2996,7 @@ namespace CGAL {
|
|||
<Self, CGAL::CMap_dart_iterator_basic_of_cell<Self,i,dim>,
|
||||
CGAL::CMap_dart_const_iterator_basic_of_cell<Self,i,dim> > Base;
|
||||
|
||||
Dart_of_cell_basic_range(Self &amap, Dart_handle adart, int amark=-1) :
|
||||
Dart_of_cell_basic_range(Self &amap, Dart_handle adart, size_type amark=MARK_ERROR) :
|
||||
Base(amap, adart, amark)
|
||||
{}
|
||||
};
|
||||
|
|
@ -2973,7 +3010,7 @@ namespace CGAL {
|
|||
<Self, CGAL::CMap_dart_const_iterator_basic_of_cell<Self,i,dim> > Base;
|
||||
|
||||
Dart_of_cell_basic_const_range(const Self &amap, Dart_const_handle adart,
|
||||
int amark=-1) :
|
||||
size_type amark=MARK_ERROR) :
|
||||
Base(amap, adart, amark)
|
||||
{}
|
||||
};
|
||||
|
|
@ -3009,22 +3046,22 @@ namespace CGAL {
|
|||
/// @return a range on all the darts of the given i-cell
|
||||
template<unsigned int i, int dim>
|
||||
Dart_of_cell_basic_range<i,dim> darts_of_cell_basic(Dart_handle adart,
|
||||
int amark=-1)
|
||||
size_type amark=MARK_ERROR)
|
||||
{ return Dart_of_cell_basic_range<i,dim>(*this,adart,amark); }
|
||||
//--------------------------------------------------------------------------
|
||||
template<unsigned int i, int dim>
|
||||
Dart_of_cell_basic_const_range<i,dim> darts_of_cell_basic
|
||||
(Dart_const_handle adart, int amark=-1) const
|
||||
(Dart_const_handle adart, size_type amark=MARK_ERROR) const
|
||||
{ return Dart_of_cell_basic_const_range<i,dim>(*this,adart,amark); }
|
||||
//--------------------------------------------------------------------------
|
||||
template<unsigned int i>
|
||||
Dart_of_cell_basic_range<i,Self::dimension>
|
||||
darts_of_cell_basic(Dart_handle adart, int amark=-1)
|
||||
darts_of_cell_basic(Dart_handle adart, size_type amark=MARK_ERROR)
|
||||
{ return darts_of_cell_basic<i,Self::dimension>(adart,amark); }
|
||||
//--------------------------------------------------------------------------
|
||||
template<unsigned int i>
|
||||
Dart_of_cell_basic_const_range<i,Self::dimension>
|
||||
darts_of_cell_basic(Dart_const_handle adart, int amark=-1) const
|
||||
darts_of_cell_basic(Dart_const_handle adart, size_type amark=MARK_ERROR) const
|
||||
{ return darts_of_cell_basic<i,Self::dimension>(adart,amark); }
|
||||
//--------------------------------------------------------------------------
|
||||
template<unsigned int i, int dim>
|
||||
|
|
@ -3055,7 +3092,7 @@ namespace CGAL {
|
|||
CGAL::CMap_dart_const_iterator_basic_of_involution<Self,i,dim> > Base;
|
||||
|
||||
Dart_of_involution_basic_range(Self &amap, Dart_handle adart,
|
||||
int amark=-1):
|
||||
size_type amark=MARK_ERROR):
|
||||
Base(amap, adart, amark)
|
||||
{}
|
||||
};
|
||||
|
|
@ -3071,30 +3108,30 @@ namespace CGAL {
|
|||
|
||||
Dart_of_involution_basic_const_range(const Self &amap,
|
||||
Dart_const_handle adart,
|
||||
int amark=-1) :
|
||||
size_type amark=MARK_ERROR) :
|
||||
Base(amap, adart, amark)
|
||||
{}
|
||||
};
|
||||
//**************************************************************************
|
||||
template<unsigned int i,int dim>
|
||||
Dart_of_involution_basic_range<i,dim>
|
||||
darts_of_involution_basic(Dart_handle adart, int amark=-1)
|
||||
darts_of_involution_basic(Dart_handle adart, size_type amark=MARK_ERROR)
|
||||
{ return Dart_of_involution_basic_range<i,dim>(*this,adart,amark); }
|
||||
//--------------------------------------------------------------------------
|
||||
template<unsigned int i,int dim>
|
||||
Dart_of_involution_basic_const_range<i,dim>
|
||||
darts_of_involution_basic(Dart_const_handle adart, int amark=-1) const
|
||||
darts_of_involution_basic(Dart_const_handle adart, size_type amark=MARK_ERROR) const
|
||||
{ return Dart_of_involution_basic_const_range<i,dim>(*this,adart,amark); }
|
||||
//--------------------------------------------------------------------------
|
||||
template<unsigned int i>
|
||||
Dart_of_involution_basic_range<i,Self::dimension>
|
||||
darts_of_involution_basic(Dart_handle adart, int amark=-1)
|
||||
darts_of_involution_basic(Dart_handle adart, size_type amark=MARK_ERROR)
|
||||
{ return Dart_of_involution_basic_range<i,Self::dimension>
|
||||
(*this,adart,amark); }
|
||||
//--------------------------------------------------------------------------
|
||||
template<unsigned int i>
|
||||
Dart_of_involution_basic_const_range<i,Self::dimension>
|
||||
darts_of_involution_basic(Dart_const_handle adart, int amark=-1) const
|
||||
darts_of_involution_basic(Dart_const_handle adart, size_type amark=MARK_ERROR) const
|
||||
{ return Dart_of_involution_basic_const_range<i,Self::dimension>
|
||||
(*this,adart,amark); }
|
||||
//**************************************************************************
|
||||
|
|
@ -3110,7 +3147,7 @@ namespace CGAL {
|
|||
Base;
|
||||
|
||||
Dart_of_involution_inv_basic_range(Self &amap, Dart_handle adart,
|
||||
int amark=-1):
|
||||
size_type amark=MARK_ERROR):
|
||||
Base(amap, adart, amark)
|
||||
{}
|
||||
};
|
||||
|
|
@ -3127,31 +3164,31 @@ namespace CGAL {
|
|||
|
||||
Dart_of_involution_inv_basic_const_range(const Self &amap,
|
||||
Dart_const_handle adart,
|
||||
int amark=-1) :
|
||||
size_type amark=MARK_ERROR) :
|
||||
Base(amap, adart, amark)
|
||||
{}
|
||||
};
|
||||
//**************************************************************************
|
||||
template<unsigned int i,int dim>
|
||||
Dart_of_involution_inv_basic_range<i,dim>
|
||||
darts_of_involution_inv_basic(Dart_handle adart, int amark=-1)
|
||||
darts_of_involution_inv_basic(Dart_handle adart, size_type amark=MARK_ERROR)
|
||||
{ return Dart_of_involution_inv_basic_range<i,dim>(*this,adart,amark); }
|
||||
//--------------------------------------------------------------------------
|
||||
template<unsigned int i,int dim>
|
||||
Dart_of_involution_inv_basic_const_range<i,dim>
|
||||
darts_of_involution_inv_basic(Dart_const_handle adart, int amark=-1) const
|
||||
darts_of_involution_inv_basic(Dart_const_handle adart, size_type amark=MARK_ERROR) const
|
||||
{ return Dart_of_involution_inv_basic_const_range<i,dim>
|
||||
(*this,adart,amark); }
|
||||
//--------------------------------------------------------------------------
|
||||
template<unsigned int i>
|
||||
Dart_of_involution_inv_basic_range<i,Self::dimension>
|
||||
darts_of_involution_inv_basic(Dart_handle adart, int amark=-1)
|
||||
darts_of_involution_inv_basic(Dart_handle adart, size_type amark=MARK_ERROR)
|
||||
{ return Dart_of_involution_inv_basic_range<i,Self::dimension>
|
||||
(*this,adart,amark); }
|
||||
//--------------------------------------------------------------------------
|
||||
template<unsigned int i>
|
||||
Dart_of_involution_inv_basic_const_range<i,Self::dimension>
|
||||
darts_of_involution_inv_basic(Dart_const_handle adart, int amark=-1) const
|
||||
darts_of_involution_inv_basic(Dart_const_handle adart, size_type amark=MARK_ERROR) const
|
||||
{ return Dart_of_involution_inv_basic_const_range<i,Self::dimension>
|
||||
(*this,adart,amark); }
|
||||
//**************************************************************************
|
||||
|
|
@ -3510,8 +3547,8 @@ namespace CGAL {
|
|||
std::deque< Dart_const_handle > toTreat1;
|
||||
std::deque< typename Map2::Dart_const_handle > toTreat2;
|
||||
|
||||
int m1 = get_new_mark();
|
||||
int m2 = map2.get_new_mark();
|
||||
size_type m1 = get_new_mark();
|
||||
size_type m2 = map2.get_new_mark();
|
||||
|
||||
toTreat1.push_back(dh1);
|
||||
toTreat2.push_back(dh2);
|
||||
|
|
@ -3727,10 +3764,10 @@ namespace CGAL {
|
|||
mutable size_type mindex_marks[NB_MARKS];
|
||||
|
||||
/// "Stack" of free marks.
|
||||
mutable int mfree_marks_stack[NB_MARKS];
|
||||
mutable size_type mfree_marks_stack[NB_MARKS];
|
||||
|
||||
/// "Stack" of used marks.
|
||||
mutable int mused_marks_stack[NB_MARKS];
|
||||
mutable size_type mused_marks_stack[NB_MARKS];
|
||||
|
||||
/// Number of marked darts for each used marks.
|
||||
mutable size_type mnb_marked_darts[NB_MARKS];
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ namespace CGAL
|
|||
template < class Map, class Iterator >
|
||||
bool is_whole_orbit_marked(const Map & amap,
|
||||
typename Map::Dart_const_handle adart,
|
||||
int amark)
|
||||
typename Map::size_type amark)
|
||||
{
|
||||
CGAL_static_assertion( (boost::is_same<typename Iterator::Basic_iterator,
|
||||
Tag_false>::value) );
|
||||
|
|
@ -84,7 +84,7 @@ namespace CGAL
|
|||
template < class Map, class Iterator >
|
||||
bool is_whole_orbit_unmarked(const Map & amap,
|
||||
typename Map::Dart_const_handle adart,
|
||||
int amark)
|
||||
typename Map::size_type amark)
|
||||
{
|
||||
amap.negate_mark(amark);
|
||||
bool res=CGAL::is_whole_orbit_marked<Map,Iterator>(amap, adart, amark);
|
||||
|
|
@ -102,7 +102,7 @@ namespace CGAL
|
|||
template < class Map, class Iterator >
|
||||
typename Map::size_type mark_orbit(const Map & amap,
|
||||
typename Map::Dart_const_handle adart,
|
||||
int amark)
|
||||
typename Map::size_type amark)
|
||||
{
|
||||
CGAL_static_assertion( (boost::is_same<typename Iterator::Basic_iterator,
|
||||
Tag_true>::value) );
|
||||
|
|
@ -130,7 +130,7 @@ namespace CGAL
|
|||
template < class Map, class Iterator >
|
||||
typename Map::size_type unmark_orbit(const Map & amap,
|
||||
typename Map::Dart_const_handle adart,
|
||||
int amark)
|
||||
typename Map::size_type amark)
|
||||
{
|
||||
amap.negate_mark(amark);
|
||||
typename Map::size_type
|
||||
|
|
@ -173,7 +173,7 @@ namespace CGAL
|
|||
template < class Map, unsigned int i, unsigned int d>
|
||||
bool is_whole_cell_marked(const Map & amap,
|
||||
typename Map::Dart_const_handle adart,
|
||||
int amark)
|
||||
typename Map::size_type amark)
|
||||
{
|
||||
return CGAL::is_whole_orbit_marked<Map,
|
||||
typename Map::template Dart_of_cell_range<i,d>::const_iterator>
|
||||
|
|
@ -183,7 +183,7 @@ namespace CGAL
|
|||
template < class Map, unsigned int i>
|
||||
bool is_whole_cell_marked(const Map & amap,
|
||||
typename Map::Dart_const_handle adart,
|
||||
int amark)
|
||||
typename Map::size_type amark)
|
||||
{
|
||||
return CGAL::is_whole_cell_marked<Map,i,Map::dimension>(amap,adart,amark);
|
||||
}
|
||||
|
|
@ -197,7 +197,7 @@ namespace CGAL
|
|||
template < class Map, unsigned int i, unsigned int d >
|
||||
bool is_whole_cell_unmarked(const Map & amap,
|
||||
typename Map::Dart_const_handle adart,
|
||||
int amark)
|
||||
typename Map::size_type amark)
|
||||
{
|
||||
return CGAL::is_whole_orbit_unmarked<Map,
|
||||
typename Map::template Dart_of_cell_range<i,d>::iterator>
|
||||
|
|
@ -207,7 +207,7 @@ namespace CGAL
|
|||
template < class Map, unsigned int i>
|
||||
bool is_whole_cell_unmarked(const Map & amap,
|
||||
typename Map::Dart_const_handle adart,
|
||||
int amark)
|
||||
typename Map::size_type amark)
|
||||
{
|
||||
return CGAL::is_whole_cell_unmarked<Map,i,Map::dimension>
|
||||
(amap,adart,amark);
|
||||
|
|
@ -223,7 +223,7 @@ namespace CGAL
|
|||
template < class Map, unsigned int i, unsigned int d >
|
||||
typename Map::size_type mark_cell(const Map & amap,
|
||||
typename Map::Dart_const_handle adart,
|
||||
int amark)
|
||||
typename Map::size_type amark)
|
||||
{ return CGAL::mark_orbit<Map,
|
||||
typename Map::template Dart_of_cell_basic_range<i,d>::const_iterator>
|
||||
(amap, adart, amark); }
|
||||
|
|
@ -231,7 +231,7 @@ namespace CGAL
|
|||
template < class Map, unsigned int i>
|
||||
typename Map::size_type mark_cell(const Map & amap,
|
||||
typename Map::Dart_const_handle adart,
|
||||
int amark)
|
||||
typename Map::size_type amark)
|
||||
{ return CGAL::mark_cell<Map,i,Map::dimension>(amap, adart, amark);}
|
||||
|
||||
/** Unmark a given orbit with a given mark.
|
||||
|
|
@ -244,7 +244,7 @@ namespace CGAL
|
|||
template < class Map, unsigned int i, unsigned int d >
|
||||
typename Map::size_type unmark_cell(const Map & amap,
|
||||
typename Map::Dart_handle adart,
|
||||
int amark)
|
||||
typename Map::size_type amark)
|
||||
{ return CGAL::unmark_orbit<Map,
|
||||
typename Map::template Dart_of_cell_basic_range<i,d>::const_iterator>
|
||||
(amap, adart, amark);}
|
||||
|
|
@ -252,7 +252,7 @@ namespace CGAL
|
|||
template < class Map, unsigned int i >
|
||||
typename Map::size_type unmark_cell(const Map & amap,
|
||||
typename Map::Dart_handle adart,
|
||||
int amark)
|
||||
typename Map::size_type amark)
|
||||
{ return CGAL::unmark_cell<Map,i,Map::dimension>(amap, adart, amark); }
|
||||
|
||||
/** Compute the degree of a given i-cell c.
|
||||
|
|
@ -268,9 +268,27 @@ namespace CGAL
|
|||
CGAL_assertion(adart != NULL);
|
||||
|
||||
typename Map::size_type nbIncident = 0;
|
||||
int mark = amap.get_new_mark();
|
||||
int treated = amap.get_new_mark();
|
||||
CGAL_assume(mark != -1); CGAL_assume( treated != -1);
|
||||
typename Map::size_type mark;
|
||||
typename Map::size_type treated;
|
||||
// CGAL_assume(mark != -1); CGAL_assume( treated != -1);
|
||||
try
|
||||
{
|
||||
mark = amap.get_new_mark();
|
||||
}
|
||||
catch (typename Map::Exception_mark_is_out_of_border e)
|
||||
{
|
||||
std::cerr<<"No more free mark, exit."<<std::endl;
|
||||
exit(-1);
|
||||
}
|
||||
try
|
||||
{
|
||||
treated = amap.get_new_mark();
|
||||
}
|
||||
catch (typename Map::Exception_mark_is_out_of_border e)
|
||||
{
|
||||
std::cerr<<"No more free mark, exit."<<std::endl;
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
typename Map::template
|
||||
Dart_of_cell_basic_range<i>::const_iterator it(amap, adart, mark);
|
||||
|
|
@ -316,9 +334,27 @@ namespace CGAL
|
|||
CGAL_assertion(adart != NULL);
|
||||
|
||||
typename Map::size_type nbIncident = 0;
|
||||
int mark = amap.get_new_mark();
|
||||
int treated = amap.get_new_mark();
|
||||
CGAL_assume(mark != -1); CGAL_assume( treated != -1);
|
||||
typename Map::size_type mark;
|
||||
typename Map::size_type treated;
|
||||
// CGAL_assume(mark != -1); CGAL_assume( treated != -1);
|
||||
try
|
||||
{
|
||||
mark = amap.get_new_mark();
|
||||
}
|
||||
catch (typename Map::Exception_mark_is_out_of_border e)
|
||||
{
|
||||
std::cerr<<"No more free mark, exit."<<std::endl;
|
||||
exit(-1);
|
||||
}
|
||||
try
|
||||
{
|
||||
treated = amap.get_new_mark();
|
||||
}
|
||||
catch (typename Map::Exception_mark_is_out_of_border e)
|
||||
{
|
||||
std::cerr<<"No more free mark, exit."<<std::endl;
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
typename Map::template
|
||||
Dart_of_cell_basic_range<i>::const_iterator it(amap, adart, mark);
|
||||
|
|
|
|||
|
|
@ -57,8 +57,10 @@ namespace CGAL
|
|||
template<typename CMap>
|
||||
struct Reserve_mark_functor
|
||||
{
|
||||
typedef typename CMap::size_type size_type;
|
||||
|
||||
template <unsigned int i>
|
||||
static void run(const CMap* amap, std::vector<int>* marks)
|
||||
static void run(const CMap* amap, std::vector<size_type>* marks)
|
||||
{ (*marks)[i] = amap->get_new_mark(); }
|
||||
};
|
||||
// ****************************************************************************
|
||||
|
|
@ -86,7 +88,9 @@ struct Test_is_valid_attribute_functor
|
|||
static bool run(const CMap* amap,
|
||||
typename CMap::Dart_const_handle adart)
|
||||
{
|
||||
int mark=amap->get_new_mark();
|
||||
typedef typename CMap::size_type size_type;
|
||||
|
||||
size_type mark=amap->get_new_mark();
|
||||
bool res = true;
|
||||
CGAL::internal::Test_is_valid_attribute_functor<CMap>::
|
||||
run<i>(amap, adart, mark, &res);
|
||||
|
|
|
|||
|
|
@ -43,11 +43,11 @@ insert_cell_0_in_cell_1( CMap& amap, typename CMap::Dart_handle adart,
|
|||
bool update_attributes=true )
|
||||
{
|
||||
typename CMap::Dart_handle d1, d2;
|
||||
int mark=amap.get_new_mark();
|
||||
typename CMap::size_type mark=amap.get_new_mark();
|
||||
|
||||
// 1) We store all the darts of the edge.
|
||||
std::deque<typename CMap::Dart_handle> vect;
|
||||
int m=amap.get_new_mark();
|
||||
typename CMap::size_type m=amap.get_new_mark();
|
||||
{
|
||||
for ( typename CMap::template Dart_of_cell_basic_range<1>::iterator
|
||||
it=amap.template darts_of_cell_basic<1>(adart, m).begin();
|
||||
|
|
@ -144,7 +144,7 @@ insert_cell_0_in_cell_2( CMap& amap, typename CMap::Dart_handle adart,
|
|||
first = amap.template beta<0>(first);
|
||||
|
||||
// Mark used to mark darts already treated.
|
||||
int treated = amap.get_new_mark();
|
||||
typename CMap::size_type treated = amap.get_new_mark();
|
||||
|
||||
// Stack of marked darts
|
||||
std::deque<typename CMap::Dart_handle> tounmark;
|
||||
|
|
@ -296,7 +296,7 @@ insert_dangling_cell_1_in_cell_2( CMap& amap,
|
|||
Attribute_handle<0>::type ah=CMap::null_handle,
|
||||
bool update_attributes=true )
|
||||
{
|
||||
int mark1 = amap.get_new_mark();
|
||||
typename CMap::size_type mark1 = amap.get_new_mark();
|
||||
std::deque<typename CMap::Dart_handle> to_unmark;
|
||||
{
|
||||
for ( CMap_dart_iterator_basic_of_cell<CMap,0> it(amap,adart1,mark1);
|
||||
|
|
@ -311,7 +311,7 @@ insert_dangling_cell_1_in_cell_2( CMap& amap,
|
|||
typename CMap::Dart_handle d2 = amap.null_handle;
|
||||
unsigned int s1 = 0;
|
||||
|
||||
int treated=amap.get_new_mark();
|
||||
typename CMap::size_type treated=amap.get_new_mark();
|
||||
|
||||
CGAL::CMap_dart_iterator_basic_of_involution<CMap,1>
|
||||
it1(amap, adart1, treated);
|
||||
|
|
@ -426,13 +426,13 @@ insert_cell_1_in_cell_2(CMap& amap,
|
|||
|
||||
CGAL_assertion(is_insertable_cell_1_in_cell_2<CMap>(amap, adart1, adart2));
|
||||
|
||||
int m1=amap.get_new_mark();
|
||||
typename CMap::size_type m1=amap.get_new_mark();
|
||||
CGAL::CMap_dart_iterator_basic_of_involution<CMap,1> it1(amap, adart1, m1);
|
||||
|
||||
int m2=amap.get_new_mark();
|
||||
typename CMap::size_type m2=amap.get_new_mark();
|
||||
CGAL::CMap_dart_iterator_basic_of_involution<CMap,1> it2(amap, adart2, m2);
|
||||
|
||||
int mark1=amap.get_new_mark();
|
||||
typename CMap::size_type mark1=amap.get_new_mark();
|
||||
std::deque<typename CMap::Dart_handle> to_unmark;
|
||||
{
|
||||
for ( CGAL::CMap_dart_iterator_basic_of_cell<CMap,0> it(amap,adart1,mark1);
|
||||
|
|
@ -447,7 +447,7 @@ insert_cell_1_in_cell_2(CMap& amap,
|
|||
typename CMap::Dart_handle d2=amap.null_handle;
|
||||
unsigned int s1=0;
|
||||
|
||||
int treated=amap.get_new_mark();
|
||||
typename CMap::size_type treated=amap.get_new_mark();
|
||||
|
||||
for ( ; it1.cont(); ++it1, ++it2)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -96,6 +96,8 @@ namespace CGAL {
|
|||
/// true iff this iterator is basic
|
||||
typedef Tag_true Basic_iterator;
|
||||
|
||||
typedef typename Map::size_type size_type;
|
||||
|
||||
public:
|
||||
/// Main constructor.
|
||||
CMap_dart_iterator(Map& amap, Dart_handle adart):
|
||||
|
|
@ -150,7 +152,7 @@ namespace CGAL {
|
|||
|
||||
protected:
|
||||
/// test if adart->beta(ai) exists and is not marked for amark
|
||||
bool is_unmarked(Dart_handle adart, unsigned int ai, unsigned amark) const
|
||||
bool is_unmarked(Dart_handle adart, unsigned int ai, size_type amark) const
|
||||
{ return
|
||||
#ifdef CGAL_CMAP_DEPRECATED
|
||||
!mmap->is_free(adart,ai) && // Pb with static null_dart_handle for windows
|
||||
|
|
@ -164,7 +166,7 @@ namespace CGAL {
|
|||
|
||||
/// test if adart->beta(ai)->beta(aj) exists and is not marked for amark
|
||||
bool is_unmarked2(Dart_handle adart, unsigned int ai, unsigned int aj,
|
||||
unsigned amark) const
|
||||
typename Map::size_type amark) const
|
||||
{ return
|
||||
#ifdef CGAL_CMAP_DEPRECATED
|
||||
exist_betaij(adart, ai, aj) && // Pb with static null_dart_handle for windows
|
||||
|
|
@ -200,12 +202,14 @@ namespace CGAL {
|
|||
|
||||
typedef Tag_true Use_mark;
|
||||
|
||||
typedef typename Map::size_type size_type;
|
||||
|
||||
CGAL_static_assertion( (Bi<=Map::dimension &&
|
||||
boost::is_same<Ite_has_stack,Tag_false>::value) );
|
||||
|
||||
public:
|
||||
/// Main constructor.
|
||||
CMap_extend_iterator(Map& amap, Dart_handle adart, int amark):
|
||||
CMap_extend_iterator(Map& amap, Dart_handle adart, size_type amark):
|
||||
Base(amap, adart),
|
||||
mmark_number(amark),
|
||||
minitial_dart(adart)
|
||||
|
|
@ -226,7 +230,7 @@ namespace CGAL {
|
|||
/// Rewind of the iterator to its beginning.
|
||||
void rewind()
|
||||
{
|
||||
CGAL_assertion(mmark_number != -1);
|
||||
CGAL_assertion(mmark_number != Map::MARK_ERROR);
|
||||
Base::operator= ( Base(*this->mmap,minitial_dart) );
|
||||
mto_treat = std::queue<Dart_handle>();
|
||||
this->mmap->mark(minitial_dart, mmark_number);
|
||||
|
|
@ -242,7 +246,7 @@ namespace CGAL {
|
|||
/// Prefix ++ operator.
|
||||
Self& operator++()
|
||||
{
|
||||
CGAL_assertion(mmark_number != -1);
|
||||
CGAL_assertion(mmark_number != Map::MARK_ERROR);
|
||||
CGAL_assertion(this->cont());
|
||||
|
||||
do
|
||||
|
|
@ -298,7 +302,7 @@ namespace CGAL {
|
|||
std::queue<Dart_handle> mto_treat;
|
||||
|
||||
/// Index of the used mark.
|
||||
int mmark_number;
|
||||
size_type mmark_number;
|
||||
|
||||
/// Initial dart
|
||||
Dart_handle minitial_dart;
|
||||
|
|
@ -320,8 +324,10 @@ namespace CGAL {
|
|||
|
||||
typedef Tag_true Use_mark;
|
||||
|
||||
typedef typename Map::size_type size_type;
|
||||
|
||||
/// Main constructor.
|
||||
CMap_extend_iterator(Map& amap, Dart_handle adart, int amark):
|
||||
CMap_extend_iterator(Map& amap, Dart_handle adart, size_type amark):
|
||||
Base(amap, adart, amark)
|
||||
{
|
||||
if ( this->minitial_dart!=amap.null_handle &&
|
||||
|
|
@ -336,7 +342,7 @@ namespace CGAL {
|
|||
/// Rewind of the iterator to its beginning.
|
||||
void rewind()
|
||||
{
|
||||
CGAL_assertion(this->mmark_number != -1);
|
||||
CGAL_assertion(this->mmark_number != Map::MARK_ERROR);
|
||||
Base::rewind();
|
||||
if ( !this->mmap->is_free(this->minitial_dart, Bi) &&
|
||||
this->mmap->beta(this->minitial_dart, Bi)!=this->minitial_dart )
|
||||
|
|
@ -393,6 +399,8 @@ namespace CGAL {
|
|||
/// True iff this iterator is basic
|
||||
typedef Tag_false Basic_iterator;
|
||||
|
||||
typedef typename Map::size_type size_type;
|
||||
|
||||
CGAL_static_assertion( (boost::is_same<typename Base::Basic_iterator,
|
||||
Tag_true>::value) );
|
||||
|
||||
|
|
@ -404,12 +412,12 @@ namespace CGAL {
|
|||
/// Destructor.
|
||||
~CMap_non_basic_iterator()
|
||||
{
|
||||
CGAL_assertion( this->mmark_number!=-1 );
|
||||
CGAL_assertion( this->mmark_number!=Map::MARK_ERROR );
|
||||
if (this->mmap->get_number_of_times_mark_reserved
|
||||
(this->mmark_number)==1)
|
||||
unmark_treated_darts();
|
||||
this->mmap->free_mark(this->mmark_number);
|
||||
this->mmark_number = -1; // To avoid basic class to try to unmark darts.
|
||||
this->mmark_number = Map::MARK_ERROR; // To avoid basic class to try to unmark darts.
|
||||
}
|
||||
|
||||
/// Copy constructor.
|
||||
|
|
@ -426,7 +434,7 @@ namespace CGAL {
|
|||
(this->mmark_number)==1)
|
||||
unmark_treated_darts();
|
||||
this->mmap->free_mark(this->mmark_number);
|
||||
this->mmark_number = -1;
|
||||
this->mmark_number = Map::MARK_ERROR;
|
||||
|
||||
Base::operator=(aiterator);
|
||||
this->mmap->share_a_mark(this->mmark_number);
|
||||
|
|
@ -522,7 +530,10 @@ namespace CGAL {
|
|||
typedef CMap_range<Map_,It,Const_it,Tag_true> Base_cmap_range;
|
||||
typedef It iterator;
|
||||
typedef Const_it const_iterator;
|
||||
CMap_range(Map_ &amap, typename Map_::Dart_handle adart, int amark=-1):
|
||||
|
||||
typedef typename Map_::size_type size_type;
|
||||
|
||||
CMap_range(Map_ &amap, typename Map_::Dart_handle adart, size_type amark=Map_::MARK_ERROR):
|
||||
mmap(amap), mdart(adart), msize(0), mmark(amark)
|
||||
{}
|
||||
iterator begin() { return iterator(mmap,mdart,mmark); }
|
||||
|
|
@ -543,7 +554,7 @@ namespace CGAL {
|
|||
Map_ & mmap;
|
||||
typename Map_::Dart_handle mdart;
|
||||
mutable typename Map_::size_type msize;
|
||||
int mmark;
|
||||
size_type mmark;
|
||||
};
|
||||
//****************************************************************************
|
||||
template <typename Map_, typename Const_it,
|
||||
|
|
@ -575,8 +586,9 @@ namespace CGAL {
|
|||
struct CMap_const_range<Map_,Const_it,Tag_true>
|
||||
{
|
||||
typedef Const_it const_iterator;
|
||||
typedef typename Map_::size_type size_type;
|
||||
CMap_const_range(const Map_ &amap, typename Map_::Dart_const_handle adart,
|
||||
int amark=-1):
|
||||
size_type amark=Map_::MARK_ERROR):
|
||||
mmap(amap), mdart(adart), msize(0), mmark(amark)
|
||||
{}
|
||||
const_iterator begin() const { return const_iterator(mmap,mdart,mmark); }
|
||||
|
|
|
|||
|
|
@ -99,8 +99,8 @@ namespace CGAL
|
|||
typename CMap::Dart_handle d1, d2;
|
||||
typename CMap::Dart_handle dg1=amap.null_handle, dg2=amap.null_handle;
|
||||
|
||||
int mark = amap.get_new_mark();
|
||||
int mark_modified_darts = amap.get_new_mark();
|
||||
typename CMap::size_type mark = amap.get_new_mark();
|
||||
typename CMap::size_type mark_modified_darts = amap.get_new_mark();
|
||||
|
||||
std::deque<typename CMap::Dart_handle> to_erase;
|
||||
|
||||
|
|
@ -280,7 +280,7 @@ namespace CGAL
|
|||
{
|
||||
static size_t run(CMap& amap, typename CMap::Dart_handle adart, bool update_attributes)
|
||||
{
|
||||
int mark = amap.get_new_mark();
|
||||
typename CMap::size_type mark = amap.get_new_mark();
|
||||
std::deque<typename CMap::Dart_handle> to_erase;
|
||||
size_t res = 0;
|
||||
|
||||
|
|
@ -355,7 +355,7 @@ namespace CGAL
|
|||
typename CMap::Dart_handle d1, d2;
|
||||
typename CMap::Dart_handle dg1=amap.null_handle, dg2=amap.null_handle;
|
||||
|
||||
int mark = amap.get_new_mark();
|
||||
typename CMap::size_type mark = amap.get_new_mark();
|
||||
// int mark_modified_darts = amap.get_new_mark();
|
||||
|
||||
// First we store and mark all the darts of the 0-cell to remove.
|
||||
|
|
@ -544,8 +544,8 @@ namespace CGAL
|
|||
typename CMap::Dart_handle d1, d2;
|
||||
typename CMap::Dart_handle dg1=amap.null_handle, dg2=amap.null_handle;
|
||||
|
||||
int mark = amap.get_new_mark();
|
||||
int mark_modified_darts = amap.get_new_mark();
|
||||
typename CMap::size_type mark = amap.get_new_mark();
|
||||
typename CMap::size_type mark_modified_darts = amap.get_new_mark();
|
||||
|
||||
const int imuinv = CGAL_BETAINV(i-1);
|
||||
|
||||
|
|
@ -699,7 +699,7 @@ namespace CGAL
|
|||
typename CMap::Dart_handle d1, d2;
|
||||
typename CMap::Dart_handle dg1=amap.null_handle, dg2=amap.null_handle;
|
||||
|
||||
int mark = amap.get_new_mark();
|
||||
typename CMap::size_type mark = amap.get_new_mark();
|
||||
// int mark_modified_darts = amap.get_new_mark();
|
||||
|
||||
// First we store and mark all the darts of the 1-cell to contract.
|
||||
|
|
|
|||
|
|
@ -144,21 +144,21 @@ namespace CGAL {
|
|||
return ADart->get_marks();
|
||||
}
|
||||
/// Return the mark value of dart a given mark number.
|
||||
bool get_dart_mark(Dart_const_handle ADart, int amark) const
|
||||
bool get_dart_mark(Dart_const_handle ADart, size_type amark) const
|
||||
{
|
||||
CGAL_assertion( ADart!=NULL );
|
||||
return ADart->get_mark(amark);
|
||||
}
|
||||
|
||||
/// Set the mark of a given mark number to a given value.
|
||||
void set_dart_mark(Dart_const_handle ADart, int amark, bool avalue) const
|
||||
void set_dart_mark(Dart_const_handle ADart, size_type amark, bool avalue) const
|
||||
{
|
||||
CGAL_assertion( ADart!=NULL );
|
||||
ADart->set_mark(amark, avalue);
|
||||
}
|
||||
|
||||
/// Flip the mark of a given mark number to a given value.
|
||||
void flip_dart_mark(Dart_const_handle ADart, int amark) const
|
||||
void flip_dart_mark(Dart_const_handle ADart, size_type amark) const
|
||||
{
|
||||
CGAL_assertion( ADart!=NULL );
|
||||
ADart->flip_mark(amark);
|
||||
|
|
|
|||
|
|
@ -267,28 +267,28 @@ namespace CGAL {
|
|||
* @param amark the mark number.
|
||||
* @return the value for this number.
|
||||
*/
|
||||
bool get_mark(int amark) const
|
||||
bool get_mark(size_type amark) const
|
||||
{
|
||||
CGAL_assertion(amark>=0 && (size_type)amark<NB_MARKS);
|
||||
return mmarks[(size_type)amark];
|
||||
CGAL_assertion(amark>=0 && amark<NB_MARKS);
|
||||
return mmarks[amark];
|
||||
}
|
||||
|
||||
/** Set the mark of a given mark number to a given value.
|
||||
* @param amark the mark number.
|
||||
* @param AValue the value.
|
||||
*/
|
||||
void set_mark(int amark, bool avalue) const
|
||||
void set_mark(size_type amark, bool avalue) const
|
||||
{
|
||||
CGAL_assertion(amark>=0 && (size_type)amark<NB_MARKS);
|
||||
mmarks.set((size_type)amark, avalue);
|
||||
CGAL_assertion(amark>=0 && amark<NB_MARKS);
|
||||
mmarks.set(amark, avalue);
|
||||
}
|
||||
/** Flip the mark of a given mark number.
|
||||
* @param amark the mark number.
|
||||
*/
|
||||
void flip_mark(int amark) const
|
||||
void flip_mark(size_type amark) const
|
||||
{
|
||||
CGAL_assertion(amark>=0 && (size_type)amark<NB_MARKS);
|
||||
mmarks.flip((size_type)amark);
|
||||
CGAL_assertion(amark>=0 && amark<NB_MARKS);
|
||||
mmarks.flip(amark);
|
||||
}
|
||||
|
||||
/** Return all the marks of this dart.
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ namespace CGAL {
|
|||
typedef CMap_dart_iterator_basic_of_orbit_generic<Map_,true,Beta...> Base;
|
||||
|
||||
typedef typename Map_::Dart_const_handle Dart_const_handle;
|
||||
typedef typename Map_::size_type size_type;
|
||||
|
||||
/// Main constructor.
|
||||
CMap_dart_const_iterator_basic_of_orbit(const Map_& amap,
|
||||
|
|
@ -56,7 +57,7 @@ namespace CGAL {
|
|||
/// Main constructor.
|
||||
CMap_dart_const_iterator_basic_of_orbit(const Map_& amap,
|
||||
Dart_const_handle adart,
|
||||
int amark):
|
||||
size_type amark):
|
||||
Base(amap,adart,amark)
|
||||
{}
|
||||
/// Constructor from non const version.
|
||||
|
|
@ -105,6 +106,7 @@ namespace CGAL {
|
|||
B5,B6,B7,B8,B9> Base;
|
||||
|
||||
typedef typename Map_::Dart_const_handle Dart_const_handle;
|
||||
typedef typename Map_::size_type size_type;
|
||||
|
||||
/// Main constructor.
|
||||
CMap_dart_const_iterator_basic_of_orbit(const Map_& amap,
|
||||
|
|
@ -114,7 +116,7 @@ namespace CGAL {
|
|||
/// Main constructor.
|
||||
CMap_dart_const_iterator_basic_of_orbit(const Map_& amap,
|
||||
Dart_const_handle adart,
|
||||
int amark):
|
||||
size_type amark):
|
||||
Base(amap,adart,amark)
|
||||
{}
|
||||
/// Constructor from non const version.
|
||||
|
|
@ -162,6 +164,7 @@ namespace CGAL {
|
|||
public:
|
||||
typedef CMap_dart_iterator_basic_of_all<Map_,true> Base;
|
||||
typedef typename Map_::Dart_const_handle Dart_const_handle;
|
||||
typedef typename Map_::size_type size_type;
|
||||
|
||||
/* Main constructor. */
|
||||
CMap_dart_const_iterator_basic_of_all(const Map_& amap,
|
||||
|
|
@ -171,7 +174,7 @@ namespace CGAL {
|
|||
/* Main constructor. */
|
||||
CMap_dart_const_iterator_basic_of_all(const Map_& amap,
|
||||
Dart_const_handle adart,
|
||||
int /*amark*/):
|
||||
size_type /*amark*/):
|
||||
Base(amap,adart)
|
||||
{}
|
||||
/// Constructor from non const version.
|
||||
|
|
@ -189,6 +192,7 @@ namespace CGAL {
|
|||
public:
|
||||
typedef CMap_dart_iterator_basic_of_cell<Map_,i,d,true> Base;
|
||||
typedef typename Map_::Dart_const_handle Dart_const_handle;
|
||||
typedef typename Map_::size_type size_type;
|
||||
|
||||
/* Main constructor. */
|
||||
CMap_dart_const_iterator_basic_of_cell(const Map_& amap,
|
||||
|
|
@ -197,7 +201,8 @@ namespace CGAL {
|
|||
{}
|
||||
/* Main constructor. */
|
||||
CMap_dart_const_iterator_basic_of_cell(const Map_& amap,
|
||||
Dart_const_handle adart, int amark):
|
||||
Dart_const_handle adart,
|
||||
size_type amark):
|
||||
Base(amap,adart,amark)
|
||||
{}
|
||||
/// Constructor from non const version.
|
||||
|
|
@ -236,6 +241,7 @@ namespace CGAL {
|
|||
public:
|
||||
typedef CMap_dart_iterator_basic_of_involution<Map_,i,d,true> Base;
|
||||
typedef typename Map_::Dart_const_handle Dart_const_handle;
|
||||
typedef typename Map_::size_type size_type;
|
||||
|
||||
/* Main constructor. */
|
||||
CMap_dart_const_iterator_basic_of_involution(const Map_& amap,
|
||||
|
|
@ -245,7 +251,7 @@ namespace CGAL {
|
|||
/* Main constructor. */
|
||||
CMap_dart_const_iterator_basic_of_involution(const Map_& amap,
|
||||
Dart_const_handle adart,
|
||||
int amark):
|
||||
size_type amark):
|
||||
Base(amap,adart,amark)
|
||||
{}
|
||||
/// Constructor from non const version.
|
||||
|
|
@ -284,6 +290,7 @@ namespace CGAL {
|
|||
public:
|
||||
typedef CMap_dart_iterator_basic_of_involution_inv<Map_,i,d,true> Base;
|
||||
typedef typename Map_::Dart_const_handle Dart_const_handle;
|
||||
typedef typename Map_::size_type size_type;
|
||||
|
||||
/* Main constructor. */
|
||||
CMap_dart_const_iterator_basic_of_involution_inv(const Map_& amap,
|
||||
|
|
@ -293,7 +300,7 @@ namespace CGAL {
|
|||
/* Main constructor. */
|
||||
CMap_dart_const_iterator_basic_of_involution_inv(const Map_& amap,
|
||||
Dart_const_handle adart,
|
||||
int amark):
|
||||
size_type amark):
|
||||
Base(amap,adart,amark)
|
||||
{}
|
||||
/// Constructor from non const version.
|
||||
|
|
|
|||
|
|
@ -147,6 +147,7 @@ namespace CGAL {
|
|||
|
||||
typedef typename Base::Dart_handle Dart_handle;
|
||||
typedef typename Base::Map Map;
|
||||
typedef typename Map::size_type size_type;
|
||||
|
||||
typedef Tag_false Use_mark;
|
||||
|
||||
|
|
@ -158,7 +159,7 @@ namespace CGAL {
|
|||
|
||||
/// Main constructor.
|
||||
CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart,
|
||||
int /*amark*/):
|
||||
size_type /*amark*/):
|
||||
Base(amap, adart)
|
||||
{}
|
||||
|
||||
|
|
@ -190,6 +191,7 @@ namespace CGAL {
|
|||
|
||||
typedef typename Base::Dart_handle Dart_handle;
|
||||
typedef typename Base::Map Map;
|
||||
typedef typename Map::size_type size_type;
|
||||
|
||||
typedef Tag_false Use_mark;
|
||||
|
||||
|
|
@ -202,7 +204,7 @@ namespace CGAL {
|
|||
|
||||
/// Main constructor.
|
||||
CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart,
|
||||
int /*amark*/):
|
||||
size_type /*amark*/):
|
||||
Base(amap, adart),
|
||||
mfirst_dir(true)
|
||||
{}
|
||||
|
|
@ -291,6 +293,7 @@ namespace CGAL {
|
|||
|
||||
typedef typename Base::Dart_handle Dart_handle;
|
||||
typedef typename Base::Map Map;
|
||||
typedef typename Map::size_type size_type;
|
||||
|
||||
typedef Tag_false Use_mark;
|
||||
|
||||
|
|
@ -303,7 +306,7 @@ namespace CGAL {
|
|||
|
||||
/// Main constructor.
|
||||
CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart,
|
||||
int /*amark*/):
|
||||
size_type /*amark*/):
|
||||
Base(amap, adart),
|
||||
mfirst_dir(true)
|
||||
{}
|
||||
|
|
@ -381,6 +384,7 @@ namespace CGAL {
|
|||
|
||||
typedef typename Base::Dart_handle Dart_handle;
|
||||
typedef typename Base::Map Map;
|
||||
typedef typename Map::size_type size_type;
|
||||
|
||||
typedef Tag_false Use_mark;
|
||||
|
||||
|
|
@ -392,7 +396,7 @@ namespace CGAL {
|
|||
|
||||
/// Main constructor.
|
||||
CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart,
|
||||
int /*amark*/):
|
||||
size_type /*amark*/):
|
||||
Base(amap, adart)
|
||||
{ CGAL_static_assertion( Bi>=2 && Bi<=Map::dimension ); }
|
||||
|
||||
|
|
@ -435,6 +439,7 @@ namespace CGAL {
|
|||
|
||||
typedef typename Base::Dart_handle Dart_handle;
|
||||
typedef typename Base::Map Map;
|
||||
typedef typename Map::size_type size_type;
|
||||
|
||||
typedef Tag_false Use_mark;
|
||||
|
||||
|
|
@ -449,7 +454,7 @@ namespace CGAL {
|
|||
|
||||
/// Main constructor.
|
||||
CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_handle adart,
|
||||
int /*amark*/):
|
||||
size_type /*amark*/):
|
||||
Base(amap, adart),
|
||||
mcurdart(0)
|
||||
{}
|
||||
|
|
@ -548,6 +553,7 @@ namespace CGAL {
|
|||
|
||||
typedef typename Base::Dart_handle Dart_handle;
|
||||
typedef typename Base::Map Map;
|
||||
typedef typename Map::size_type size_type;
|
||||
|
||||
typedef Tag_true Use_mark;
|
||||
|
||||
|
|
@ -556,7 +562,7 @@ namespace CGAL {
|
|||
public:
|
||||
/// Main constructor.
|
||||
CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_handle adart,
|
||||
int amark):
|
||||
size_type amark):
|
||||
Base(amap, adart, amark)
|
||||
{}
|
||||
};
|
||||
|
|
@ -580,6 +586,7 @@ namespace CGAL {
|
|||
|
||||
typedef typename Base::Dart_handle Dart_handle;
|
||||
typedef typename Base::Map Map;
|
||||
typedef typename Map::size_type size_type;
|
||||
|
||||
typedef Tag_true Use_mark;
|
||||
|
||||
|
|
@ -588,7 +595,7 @@ namespace CGAL {
|
|||
public:
|
||||
/// Main constructor.
|
||||
CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_handle adart,
|
||||
int amark):
|
||||
size_type amark):
|
||||
Base(amap, adart, amark)
|
||||
{}
|
||||
};
|
||||
|
|
@ -610,6 +617,7 @@ namespace CGAL {
|
|||
|
||||
typedef typename Base::Dart_handle Dart_handle;
|
||||
typedef typename Base::Map Map;
|
||||
typedef typename Map::size_type size_type;
|
||||
|
||||
typedef Tag_false Use_mark;
|
||||
|
||||
|
|
@ -628,7 +636,7 @@ namespace CGAL {
|
|||
|
||||
/// Main constructor.
|
||||
CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_handle adart,
|
||||
int /*amark*/):
|
||||
size_type /*amark*/):
|
||||
Base(amap, adart),
|
||||
mit(amap, adart),
|
||||
mexist_betaj(false),
|
||||
|
|
@ -710,6 +718,7 @@ namespace CGAL {
|
|||
|
||||
typedef typename Base::Dart_handle Dart_handle;
|
||||
typedef typename Base::Map Map;
|
||||
typedef typename Map::size_type size_type;
|
||||
|
||||
typedef Tag_false Use_mark;
|
||||
|
||||
|
|
@ -728,7 +737,7 @@ namespace CGAL {
|
|||
|
||||
/// Main constructor.
|
||||
CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_handle adart,
|
||||
int /*amark*/):
|
||||
size_type /*amark*/):
|
||||
Base(amap, adart),
|
||||
mit(amap, adart),
|
||||
mexist_betaj(false),
|
||||
|
|
@ -810,6 +819,7 @@ namespace CGAL {
|
|||
|
||||
typedef typename Base::Dart_handle Dart_handle;
|
||||
typedef typename Base::Map Map;
|
||||
typedef typename Map::size_type size_type;
|
||||
|
||||
typedef Tag_false Use_mark;
|
||||
|
||||
|
|
@ -825,7 +835,7 @@ namespace CGAL {
|
|||
|
||||
/// Main constructor.
|
||||
CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_handle adart,
|
||||
int /*amark*/):
|
||||
size_type /*amark*/):
|
||||
Base(amap, adart),
|
||||
mfirst_dir(true),
|
||||
mnext_try_betai(true)
|
||||
|
|
@ -964,6 +974,7 @@ namespace CGAL {
|
|||
|
||||
typedef typename Base::Dart_handle Dart_handle;
|
||||
typedef typename Base::Map Map;
|
||||
typedef typename Map::size_type size_type;
|
||||
|
||||
typedef typename Base::Use_mark Use_mark;
|
||||
|
||||
|
|
@ -975,7 +986,7 @@ namespace CGAL {
|
|||
|
||||
/// Main constructor.
|
||||
CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart,
|
||||
int amark):
|
||||
size_type amark):
|
||||
Base(amap, adart, amark)
|
||||
{}
|
||||
};
|
||||
|
|
@ -1000,6 +1011,7 @@ namespace CGAL {
|
|||
|
||||
typedef typename Base::Dart_handle Dart_handle;
|
||||
typedef typename Base::Map Map;
|
||||
typedef typename Map::size_type size_type;
|
||||
|
||||
/// True iff this iterator is basic
|
||||
typedef Tag_true Basic_iterator;
|
||||
|
|
@ -1007,7 +1019,7 @@ namespace CGAL {
|
|||
public:
|
||||
/// Main constructor.
|
||||
CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart,
|
||||
int amark):
|
||||
size_type amark):
|
||||
Base(amap, adart, amark)
|
||||
{}
|
||||
};
|
||||
|
|
@ -1029,6 +1041,7 @@ namespace CGAL {
|
|||
|
||||
typedef typename Base::Dart_handle Dart_handle;
|
||||
typedef typename Base::Map Map;
|
||||
typedef typename Map::size_type size_type;
|
||||
|
||||
/// True iff this iterator is basic
|
||||
typedef Tag_true Basic_iterator;
|
||||
|
|
@ -1036,7 +1049,7 @@ namespace CGAL {
|
|||
public:
|
||||
/// Main constructor.
|
||||
CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart,
|
||||
int amark):
|
||||
size_type amark):
|
||||
Base(amap, adart, amark)
|
||||
{}
|
||||
};
|
||||
|
|
@ -1055,13 +1068,14 @@ namespace CGAL {
|
|||
typedef CMap_dart_iterator_basic_of_orbit_generic<Map,false,Beta...> Base;
|
||||
|
||||
typedef typename Map::Dart_handle Dart_handle;
|
||||
typedef typename Map::size_type size_type;
|
||||
|
||||
/// Main constructor.
|
||||
CMap_dart_iterator_basic_of_orbit(Map& amap,Dart_handle adart):
|
||||
Base(amap,adart)
|
||||
{}
|
||||
/// Main constructor.
|
||||
CMap_dart_iterator_basic_of_orbit(Map& amap,Dart_handle adart,int amark):
|
||||
CMap_dart_iterator_basic_of_orbit(Map& amap,Dart_handle adart,size_type amark):
|
||||
Base(amap,adart,amark)
|
||||
{}
|
||||
};
|
||||
|
|
@ -1080,13 +1094,14 @@ namespace CGAL {
|
|||
<Map,false,B1,B2,B3,B4,B5,B6,B7,B8,B9>::type Base;
|
||||
|
||||
typedef typename Map::Dart_handle Dart_handle;
|
||||
typedef typename Map::size_type size_type;
|
||||
|
||||
/// Main constructor.
|
||||
CMap_dart_iterator_basic_of_orbit(Map& amap,Dart_handle adart):
|
||||
Base(amap,adart)
|
||||
{}
|
||||
/// Main constructor.
|
||||
CMap_dart_iterator_basic_of_orbit(Map& amap,Dart_handle adart,int amark):
|
||||
CMap_dart_iterator_basic_of_orbit(Map& amap,Dart_handle adart,size_type amark):
|
||||
Base(amap,adart,amark)
|
||||
{}
|
||||
};
|
||||
|
|
@ -1104,6 +1119,7 @@ namespace CGAL {
|
|||
|
||||
typedef typename Base::Dart_handle Dart_handle;
|
||||
typedef typename Base::Map Map;
|
||||
typedef typename Map::size_type size_type;
|
||||
|
||||
typedef Tag_false Use_mark;
|
||||
|
||||
|
|
@ -1113,7 +1129,7 @@ namespace CGAL {
|
|||
Base(amap, amap.darts().begin())
|
||||
{}
|
||||
/// Main constructor.
|
||||
CMap_dart_iterator_basic_of_all(Map& amap, int /*amark*/):
|
||||
CMap_dart_iterator_basic_of_all(Map& amap, size_type /*amark*/):
|
||||
Base(amap, amap.darts().begin())
|
||||
{}
|
||||
|
||||
|
|
@ -1123,7 +1139,7 @@ namespace CGAL {
|
|||
{}
|
||||
/// Constructor with a dart in parameter (for end iterator).
|
||||
CMap_dart_iterator_basic_of_all(Map& amap, Dart_handle adart,
|
||||
int /*amark*/):
|
||||
size_type /*amark*/):
|
||||
Base(amap, adart)
|
||||
{}
|
||||
|
||||
|
|
@ -1163,6 +1179,7 @@ namespace CGAL {
|
|||
|
||||
typedef typename Base::Dart_handle Dart_handle;
|
||||
typedef typename Base::Map Map;
|
||||
typedef typename Map::size_type size_type;
|
||||
|
||||
typedef Tag_true Use_mark;
|
||||
|
||||
|
|
@ -1172,7 +1189,7 @@ namespace CGAL {
|
|||
/// Main constructor.
|
||||
CMap_dart_iterator_basic_of_cell(Map& amap,
|
||||
Dart_handle adart,
|
||||
int amark):
|
||||
size_type amark):
|
||||
Base(amap, adart),
|
||||
mmark_number(amark)
|
||||
{
|
||||
|
|
@ -1186,7 +1203,7 @@ namespace CGAL {
|
|||
/// Rewind of the iterator to its beginning.
|
||||
void rewind()
|
||||
{
|
||||
CGAL_assertion(mmark_number != -1);
|
||||
CGAL_assertion(mmark_number != Map::MARK_ERROR);
|
||||
Base::rewind();
|
||||
mto_treat = std::queue<Dart_handle>();
|
||||
this->mmap->mark(*this, mmark_number);
|
||||
|
|
@ -1196,7 +1213,7 @@ namespace CGAL {
|
|||
/// Prefix ++ operator.
|
||||
Self& operator++()
|
||||
{
|
||||
CGAL_assertion(mmark_number != -1);
|
||||
CGAL_assertion(mmark_number != Map::MARK_ERROR);
|
||||
CGAL_assertion(this->cont());
|
||||
Dart_handle nd = this->mmap->null_handle;
|
||||
|
||||
|
|
@ -1262,7 +1279,7 @@ namespace CGAL {
|
|||
std::queue<Dart_handle> mto_treat;
|
||||
|
||||
/// Index of the used mark.
|
||||
int mmark_number;
|
||||
size_type mmark_number;
|
||||
};
|
||||
//****************************************************************************
|
||||
// i-Cell iterator in combinatorial map of dimension d, i==1.
|
||||
|
|
@ -1276,6 +1293,7 @@ namespace CGAL {
|
|||
|
||||
typedef typename Base::Dart_handle Dart_handle;
|
||||
typedef typename Base::Map Map;
|
||||
typedef typename Map::size_type size_type;
|
||||
|
||||
typedef Tag_true Use_mark;
|
||||
|
||||
|
|
@ -1283,7 +1301,7 @@ namespace CGAL {
|
|||
/// Main constructor.
|
||||
CMap_dart_iterator_basic_of_cell(Map& amap,
|
||||
Dart_handle adart,
|
||||
int amark):
|
||||
size_type amark):
|
||||
Base(amap, adart),
|
||||
mmark_number(amark)
|
||||
{
|
||||
|
|
@ -1297,7 +1315,7 @@ namespace CGAL {
|
|||
/// Rewind of the iterator to its beginning.
|
||||
void rewind()
|
||||
{
|
||||
CGAL_assertion(mmark_number != -1);
|
||||
CGAL_assertion(mmark_number != Map::MARK_ERROR);
|
||||
Base::rewind();
|
||||
mto_treat = std::queue<Dart_handle>();
|
||||
this->mmap->mark((*this), mmark_number);
|
||||
|
|
@ -1307,7 +1325,7 @@ namespace CGAL {
|
|||
/// Prefix ++ operator.
|
||||
Self& operator++()
|
||||
{
|
||||
CGAL_assertion(mmark_number != -1);
|
||||
CGAL_assertion(mmark_number != Map::MARK_ERROR);
|
||||
CGAL_assertion(this->cont());
|
||||
|
||||
Dart_handle nd = this->mmap->null_handle;
|
||||
|
|
@ -1358,7 +1376,7 @@ namespace CGAL {
|
|||
std::queue<Dart_handle> mto_treat;
|
||||
|
||||
/// Index of the used mark.
|
||||
int mmark_number;
|
||||
size_type mmark_number;
|
||||
};
|
||||
//****************************************************************************
|
||||
// 0-Cell iterator in combinatorial map of dimension d
|
||||
|
|
@ -1372,6 +1390,7 @@ namespace CGAL {
|
|||
|
||||
typedef typename Base::Dart_handle Dart_handle;
|
||||
typedef typename Base::Map Map;
|
||||
typedef typename Map::size_type size_type;
|
||||
|
||||
typedef Tag_true Use_mark;
|
||||
|
||||
|
|
@ -1379,7 +1398,7 @@ namespace CGAL {
|
|||
/// Main constructor.
|
||||
CMap_dart_iterator_basic_of_cell(Map& amap,
|
||||
Dart_handle adart,
|
||||
int amark):
|
||||
size_type amark):
|
||||
Base(amap, adart),
|
||||
mmark_number(amark)
|
||||
{ if (adart!=this->mmap->null_handle)
|
||||
|
|
@ -1392,7 +1411,7 @@ namespace CGAL {
|
|||
/// Rewind of the iterator to its beginning.
|
||||
void rewind()
|
||||
{
|
||||
CGAL_assertion(mmark_number != -1);
|
||||
CGAL_assertion(mmark_number != Map::MARK_ERROR);
|
||||
Base::rewind();
|
||||
mto_treat = std::queue<Dart_handle>();
|
||||
this->mmap->mark((*this), mmark_number);
|
||||
|
|
@ -1402,7 +1421,7 @@ namespace CGAL {
|
|||
/// Prefix ++ operator.
|
||||
Self& operator++()
|
||||
{
|
||||
CGAL_assertion(mmark_number != -1);
|
||||
CGAL_assertion(mmark_number != Map::MARK_ERROR);
|
||||
CGAL_assertion(this->cont());
|
||||
|
||||
Dart_handle nd = this->mmap->null_handle;
|
||||
|
|
@ -1498,7 +1517,7 @@ namespace CGAL {
|
|||
std::queue<Dart_handle> mto_treat;
|
||||
|
||||
/// Index of the used mark.
|
||||
int mmark_number;
|
||||
size_type mmark_number;
|
||||
};
|
||||
//****************************************************************************
|
||||
// Specialization for edge in 2D
|
||||
|
|
@ -1512,6 +1531,7 @@ namespace CGAL {
|
|||
|
||||
typedef typename Base::Dart_handle Dart_handle;
|
||||
typedef typename Base::Map Map;
|
||||
typedef typename Map::size_type size_type;
|
||||
|
||||
/// Main constructor.
|
||||
CMap_dart_iterator_basic_of_cell(Map& amap,
|
||||
|
|
@ -1522,7 +1542,7 @@ namespace CGAL {
|
|||
/// Main constructor.
|
||||
CMap_dart_iterator_basic_of_cell(Map& amap,
|
||||
Dart_handle adart,
|
||||
int /*amark*/):
|
||||
size_type /*amark*/):
|
||||
Base(amap, adart)
|
||||
{}
|
||||
};
|
||||
|
|
@ -1538,6 +1558,7 @@ namespace CGAL {
|
|||
|
||||
typedef typename Base::Dart_handle Dart_handle;
|
||||
typedef typename Base::Map Map;
|
||||
typedef typename Map::size_type size_type;
|
||||
|
||||
/// Main constructor.
|
||||
CMap_dart_iterator_basic_of_cell(Map& amap,
|
||||
|
|
@ -1548,7 +1569,7 @@ namespace CGAL {
|
|||
/// Main constructor.
|
||||
CMap_dart_iterator_basic_of_cell(Map& amap,
|
||||
Dart_handle adart,
|
||||
int /*amark*/):
|
||||
size_type /*amark*/):
|
||||
Base(amap, adart)
|
||||
{}
|
||||
};
|
||||
|
|
@ -1564,11 +1585,12 @@ namespace CGAL {
|
|||
|
||||
typedef typename Base::Dart_handle Dart_handle;
|
||||
typedef typename Base::Map Map;
|
||||
typedef typename Map::size_type size_type;
|
||||
|
||||
/// Main constructor.
|
||||
CMap_dart_iterator_basic_of_cell(Map& amap,
|
||||
Dart_handle adart,
|
||||
int amark):
|
||||
size_type amark):
|
||||
Base(amap, adart, amark)
|
||||
{}
|
||||
};
|
||||
|
|
@ -1584,6 +1606,7 @@ namespace CGAL {
|
|||
|
||||
typedef typename Base::Dart_handle Dart_handle;
|
||||
typedef typename Base::Map Map;
|
||||
typedef typename Map::size_type size_type;
|
||||
|
||||
/// Main constructor.
|
||||
CMap_dart_iterator_basic_of_cell(Map& amap,
|
||||
|
|
@ -1594,7 +1617,7 @@ namespace CGAL {
|
|||
/// Main constructor.
|
||||
CMap_dart_iterator_basic_of_cell(Map& amap,
|
||||
Dart_handle adart,
|
||||
int /*amark*/): Base(amap, adart)
|
||||
size_type /*amark*/): Base(amap, adart)
|
||||
{}
|
||||
};
|
||||
//****************************************************************************
|
||||
|
|
@ -1609,6 +1632,7 @@ namespace CGAL {
|
|||
|
||||
typedef typename Base::Dart_handle Dart_handle;
|
||||
typedef typename Base::Map Map;
|
||||
typedef typename Map::size_type size_type;
|
||||
|
||||
/// Main constructor.
|
||||
CMap_dart_iterator_basic_of_cell(Map& amap,
|
||||
|
|
@ -1619,7 +1643,7 @@ namespace CGAL {
|
|||
/// Main constructor.
|
||||
CMap_dart_iterator_basic_of_cell(Map& amap,
|
||||
Dart_handle adart,
|
||||
int /*amark*/): Base(amap, adart)
|
||||
size_type /*amark*/): Base(amap, adart)
|
||||
{}
|
||||
};
|
||||
//****************************************************************************
|
||||
|
|
@ -1634,11 +1658,12 @@ namespace CGAL {
|
|||
|
||||
typedef typename Base::Dart_handle Dart_handle;
|
||||
typedef typename Base::Map Map;
|
||||
typedef typename Map::size_type size_type;
|
||||
|
||||
/// Main constructor.
|
||||
CMap_dart_iterator_basic_of_cell(Map& amap,
|
||||
Dart_handle adart,
|
||||
int amark):
|
||||
size_type amark):
|
||||
Base(amap, adart, amark)
|
||||
{}
|
||||
};
|
||||
|
|
@ -1654,11 +1679,12 @@ namespace CGAL {
|
|||
|
||||
typedef typename Base::Dart_handle Dart_handle;
|
||||
typedef typename Base::Map Map;
|
||||
typedef typename Map::size_type size_type;
|
||||
|
||||
/// Main constructor.
|
||||
CMap_dart_iterator_basic_of_cell(Map& amap,
|
||||
Dart_handle adart,
|
||||
int amark):
|
||||
size_type amark):
|
||||
Base(amap, adart, amark)
|
||||
{}
|
||||
};
|
||||
|
|
@ -1676,6 +1702,7 @@ namespace CGAL {
|
|||
|
||||
typedef typename Base::Dart_handle Dart_handle;
|
||||
typedef typename Base::Map Map;
|
||||
typedef typename Map::size_type size_type;
|
||||
|
||||
typedef Tag_false Use_mark;
|
||||
|
||||
|
|
@ -1690,7 +1717,7 @@ namespace CGAL {
|
|||
/// Main constructor.
|
||||
CMap_dart_iterator_basic_of_cell(Map& amap,
|
||||
Dart_handle adart,
|
||||
int /*amark*/):
|
||||
size_type /*amark*/):
|
||||
Base(amap, adart),
|
||||
mfirst_dir(true)
|
||||
{}
|
||||
|
|
@ -1885,6 +1912,7 @@ namespace CGAL {
|
|||
|
||||
typedef typename Base::Dart_handle Dart_handle;
|
||||
typedef typename Base::Map Map;
|
||||
typedef typename Map::size_type size_type;
|
||||
|
||||
typedef Tag_true Use_mark;
|
||||
|
||||
|
|
@ -1895,7 +1923,7 @@ namespace CGAL {
|
|||
/// Main constructor.
|
||||
CMap_dart_iterator_basic_of_involution(Map& amap,
|
||||
Dart_handle adart,
|
||||
int amark):
|
||||
size_type amark):
|
||||
Base(amap, adart),
|
||||
mmark_number(amark)
|
||||
{
|
||||
|
|
@ -1911,7 +1939,7 @@ namespace CGAL {
|
|||
/// Rewind of the iterator to its beginning.
|
||||
void rewind()
|
||||
{
|
||||
CGAL_assertion(mmark_number != -1);
|
||||
CGAL_assertion(mmark_number != Map::MARK_ERROR);
|
||||
Base::rewind();
|
||||
mto_treat = std::queue<Dart_handle>();
|
||||
this->mmap->mark((*this), mmark_number);
|
||||
|
|
@ -1921,7 +1949,7 @@ namespace CGAL {
|
|||
/// Prefix ++ operator.
|
||||
Self& operator++()
|
||||
{
|
||||
CGAL_assertion(mmark_number != -1);
|
||||
CGAL_assertion(mmark_number != Map::MARK_ERROR);
|
||||
CGAL_assertion(this->cont());
|
||||
|
||||
Dart_handle nd = this->mmap->null_handle;
|
||||
|
|
@ -1990,7 +2018,7 @@ namespace CGAL {
|
|||
std::queue<Dart_handle> mto_treat;
|
||||
|
||||
/// Index of the used mark.
|
||||
int mmark_number;
|
||||
size_type mmark_number;
|
||||
};
|
||||
//****************************************************************************
|
||||
// i-involution iterator in combinatorial map of dimension d,
|
||||
|
|
@ -2007,6 +2035,7 @@ namespace CGAL {
|
|||
|
||||
typedef typename Base::Dart_handle Dart_handle;
|
||||
typedef typename Base::Map Map;
|
||||
typedef typename Map::size_type size_type;
|
||||
|
||||
typedef Tag_true Use_mark;
|
||||
|
||||
|
|
@ -2017,7 +2046,7 @@ namespace CGAL {
|
|||
/// Main constructor.
|
||||
CMap_dart_iterator_basic_of_involution_inv(Map& amap,
|
||||
Dart_handle adart,
|
||||
int amark):
|
||||
size_type amark):
|
||||
Base(amap, adart),
|
||||
mmark_number(amark)
|
||||
{
|
||||
|
|
@ -2032,7 +2061,7 @@ namespace CGAL {
|
|||
/// Rewind of the iterator to its beginning.
|
||||
void rewind()
|
||||
{
|
||||
CGAL_assertion(mmark_number != -1);
|
||||
CGAL_assertion(mmark_number != Map::MARK_ERROR);
|
||||
Base::rewind();
|
||||
mto_treat = std::queue<Dart_handle>();
|
||||
this->mmap->mark((*this), mmark_number);
|
||||
|
|
@ -2042,7 +2071,7 @@ namespace CGAL {
|
|||
/// Prefix ++ operator.
|
||||
Self& operator++()
|
||||
{
|
||||
CGAL_assertion(mmark_number != -1);
|
||||
CGAL_assertion(mmark_number != Map::MARK_ERROR);
|
||||
CGAL_assertion(this->cont());
|
||||
|
||||
Dart_handle nd = this->mmap->null_handle;
|
||||
|
|
@ -2110,7 +2139,7 @@ namespace CGAL {
|
|||
std::queue<Dart_handle> mto_treat;
|
||||
|
||||
/// Index of the used mark.
|
||||
int mmark_number;
|
||||
size_type mmark_number;
|
||||
};
|
||||
//****************************************************************************
|
||||
// 1-involution iterator in combinatorial map of dimension d.
|
||||
|
|
@ -2125,6 +2154,7 @@ namespace CGAL {
|
|||
|
||||
typedef typename Base::Dart_handle Dart_handle;
|
||||
typedef typename Base::Map Map;
|
||||
typedef typename Map::size_type size_type;
|
||||
|
||||
typedef Tag_true Use_mark;
|
||||
|
||||
|
|
@ -2135,7 +2165,7 @@ namespace CGAL {
|
|||
/// Main constructor.
|
||||
CMap_dart_iterator_basic_of_involution(Map& amap,
|
||||
Dart_handle adart,
|
||||
int amark):
|
||||
size_type amark):
|
||||
Base(amap, adart),
|
||||
mmark_number(amark)
|
||||
{ if (adart!=this->mmap->null_handle)
|
||||
|
|
@ -2148,7 +2178,7 @@ namespace CGAL {
|
|||
/// Rewind of the iterator to its beginning.
|
||||
void rewind()
|
||||
{
|
||||
CGAL_assertion(mmark_number != -1);
|
||||
CGAL_assertion(mmark_number != Map::MARK_ERROR);
|
||||
Base::rewind();
|
||||
mto_treat = std::queue<Dart_handle>();
|
||||
this->mmap->mark_null_dart(mmark_number);
|
||||
|
|
@ -2158,7 +2188,7 @@ namespace CGAL {
|
|||
/// Prefix ++ operator.
|
||||
Self& operator++()
|
||||
{
|
||||
CGAL_assertion(mmark_number != -1);
|
||||
CGAL_assertion(mmark_number != Map::MARK_ERROR);
|
||||
CGAL_assertion(this->cont());
|
||||
|
||||
Dart_handle nd = this->mmap->null_handle;
|
||||
|
|
@ -2208,7 +2238,7 @@ namespace CGAL {
|
|||
std::queue<Dart_handle> mto_treat;
|
||||
|
||||
/// Index of the used mark.
|
||||
int mmark_number;
|
||||
size_type mmark_number;
|
||||
};
|
||||
//****************************************************************************
|
||||
// 1-involution iterator in combinatorial map of dimension d.
|
||||
|
|
@ -2223,6 +2253,7 @@ namespace CGAL {
|
|||
|
||||
typedef typename Base::Dart_handle Dart_handle;
|
||||
typedef typename Base::Map Map;
|
||||
typedef typename Map::size_type size_type;
|
||||
|
||||
typedef Tag_true Use_mark;
|
||||
|
||||
|
|
@ -2233,7 +2264,7 @@ namespace CGAL {
|
|||
/// Main constructor.
|
||||
CMap_dart_iterator_basic_of_involution_inv(Map& amap,
|
||||
Dart_handle adart,
|
||||
int amark):
|
||||
size_type amark):
|
||||
Base(amap, adart,amark)
|
||||
{}
|
||||
};
|
||||
|
|
@ -2250,6 +2281,7 @@ namespace CGAL {
|
|||
|
||||
typedef typename Base::Dart_handle Dart_handle;
|
||||
typedef typename Base::Map Map;
|
||||
typedef typename Map::size_type size_type;
|
||||
|
||||
typedef Tag_true Use_mark;
|
||||
|
||||
|
|
@ -2260,7 +2292,7 @@ namespace CGAL {
|
|||
/// Main constructor.
|
||||
CMap_dart_iterator_basic_of_involution(Map& amap,
|
||||
Dart_handle adart,
|
||||
int amark):
|
||||
size_type amark):
|
||||
Base(amap, adart),
|
||||
mmark_number(amark)
|
||||
{ if ( adart!=this->mmap->null_handle)
|
||||
|
|
@ -2273,7 +2305,7 @@ namespace CGAL {
|
|||
/// Rewind of the iterator to its beginning.
|
||||
void rewind()
|
||||
{
|
||||
CGAL_assertion(mmark_number != -1);
|
||||
CGAL_assertion(mmark_number != Map::MARK_ERROR);
|
||||
Base::rewind();
|
||||
mto_treat = std::queue<Dart_handle>();
|
||||
this->mmap->mark((*this), mmark_number);
|
||||
|
|
@ -2283,7 +2315,7 @@ namespace CGAL {
|
|||
/// Prefix ++ operator.
|
||||
Self& operator++()
|
||||
{
|
||||
CGAL_assertion(mmark_number != -1);
|
||||
CGAL_assertion(mmark_number != Map::MARK_ERROR);
|
||||
CGAL_assertion(this->cont());
|
||||
|
||||
Dart_handle nd = this->mmap->null_handle;
|
||||
|
|
@ -2333,7 +2365,7 @@ namespace CGAL {
|
|||
std::queue<Dart_handle> mto_treat;
|
||||
|
||||
/// Index of the used mark.
|
||||
int mmark_number;
|
||||
size_type mmark_number;
|
||||
};
|
||||
//****************************************************************************
|
||||
// 2-involution iterator in combinatorial map of dimension d.
|
||||
|
|
@ -2348,6 +2380,7 @@ namespace CGAL {
|
|||
|
||||
typedef typename Base::Dart_handle Dart_handle;
|
||||
typedef typename Base::Map Map;
|
||||
typedef typename Map::size_type size_type;
|
||||
|
||||
typedef Tag_true Use_mark;
|
||||
|
||||
|
|
@ -2358,7 +2391,7 @@ namespace CGAL {
|
|||
/// Main constructor.
|
||||
CMap_dart_iterator_basic_of_involution_inv(Map& amap,
|
||||
Dart_handle adart,
|
||||
int amark):
|
||||
size_type amark):
|
||||
Base(amap, adart,amark)
|
||||
{}
|
||||
};
|
||||
|
|
@ -2375,6 +2408,7 @@ namespace CGAL {
|
|||
|
||||
typedef typename Base::Dart_handle Dart_handle;
|
||||
typedef typename Base::Map Map;
|
||||
typedef typename Map::size_type size_type;
|
||||
|
||||
typedef Tag_false Use_mark;
|
||||
|
||||
|
|
@ -2385,7 +2419,7 @@ namespace CGAL {
|
|||
/// Main constructor.
|
||||
CMap_dart_iterator_basic_of_involution(Map& amap,
|
||||
Dart_handle adart,
|
||||
int /*amark*/):
|
||||
size_type /*amark*/):
|
||||
Base(amap, adart)
|
||||
{}
|
||||
/// Main constructor.
|
||||
|
|
@ -2407,6 +2441,7 @@ namespace CGAL {
|
|||
|
||||
typedef typename Base::Dart_handle Dart_handle;
|
||||
typedef typename Base::Map Map;
|
||||
typedef typename Map::size_type size_type;
|
||||
|
||||
typedef Tag_false Use_mark;
|
||||
|
||||
|
|
@ -2417,7 +2452,7 @@ namespace CGAL {
|
|||
/// Main constructor.
|
||||
CMap_dart_iterator_basic_of_involution_inv(Map& amap,
|
||||
Dart_handle adart,
|
||||
int /*amark*/):
|
||||
size_type /*amark*/):
|
||||
Base(amap, adart)
|
||||
{}
|
||||
/// Main constructor.
|
||||
|
|
@ -2439,6 +2474,7 @@ namespace CGAL {
|
|||
|
||||
typedef typename Base::Dart_handle Dart_handle;
|
||||
typedef typename Base::Map Map;
|
||||
typedef typename Map::size_type size_type;
|
||||
|
||||
typedef Tag_false Use_mark;
|
||||
|
||||
|
|
@ -2449,7 +2485,7 @@ namespace CGAL {
|
|||
/// Main constructor.
|
||||
CMap_dart_iterator_basic_of_involution(Map& amap,
|
||||
Dart_handle adart,
|
||||
int /*amark*/):
|
||||
size_type /*amark*/):
|
||||
Base(amap, adart)
|
||||
{}
|
||||
/// Main constructor.
|
||||
|
|
@ -2471,6 +2507,7 @@ namespace CGAL {
|
|||
|
||||
typedef typename Base::Dart_handle Dart_handle;
|
||||
typedef typename Base::Map Map;
|
||||
typedef typename Map::size_type size_type;
|
||||
|
||||
typedef Tag_false Use_mark;
|
||||
|
||||
|
|
@ -2481,7 +2518,7 @@ namespace CGAL {
|
|||
/// Main constructor.
|
||||
CMap_dart_iterator_basic_of_involution_inv(Map& amap,
|
||||
Dart_handle adart,
|
||||
int /*amark*/):
|
||||
size_type /*amark*/):
|
||||
Base(amap, adart)
|
||||
{}
|
||||
/// Main constructor.
|
||||
|
|
@ -2503,6 +2540,7 @@ namespace CGAL {
|
|||
|
||||
typedef typename Base::Dart_handle Dart_handle;
|
||||
typedef typename Base::Map Map;
|
||||
typedef typename Map::size_type size_type;
|
||||
|
||||
typedef Tag_false Use_mark;
|
||||
|
||||
|
|
@ -2513,7 +2551,7 @@ namespace CGAL {
|
|||
/// Main constructor.
|
||||
CMap_dart_iterator_basic_of_involution(Map& amap,
|
||||
Dart_handle adart,
|
||||
int /*amark*/):
|
||||
size_type /*amark*/):
|
||||
Base(amap, adart)
|
||||
{}
|
||||
/// Main constructor.
|
||||
|
|
@ -2535,6 +2573,7 @@ namespace CGAL {
|
|||
|
||||
typedef typename Base::Dart_handle Dart_handle;
|
||||
typedef typename Base::Map Map;
|
||||
typedef typename Map::size_type size_type;
|
||||
|
||||
typedef Tag_false Use_mark;
|
||||
|
||||
|
|
@ -2545,7 +2584,7 @@ namespace CGAL {
|
|||
/// Main constructor.
|
||||
CMap_dart_iterator_basic_of_involution_inv(Map& amap,
|
||||
Dart_handle adart,
|
||||
int /*amark*/):
|
||||
size_type /*amark*/):
|
||||
Base(amap, adart)
|
||||
{}
|
||||
/// Main constructor.
|
||||
|
|
@ -2567,6 +2606,7 @@ namespace CGAL {
|
|||
|
||||
typedef typename Base::Dart_handle Dart_handle;
|
||||
typedef typename Base::Map Map;
|
||||
typedef typename Map::size_type size_type;
|
||||
|
||||
typedef Tag_false Use_mark;
|
||||
|
||||
|
|
@ -2577,7 +2617,7 @@ namespace CGAL {
|
|||
/// Main constructor.
|
||||
CMap_dart_iterator_basic_of_involution(Map& amap,
|
||||
Dart_handle adart,
|
||||
int /* amark*/):
|
||||
size_type /* amark*/):
|
||||
Base(amap, adart)
|
||||
{}
|
||||
/// Main constructor.
|
||||
|
|
@ -2599,6 +2639,7 @@ namespace CGAL {
|
|||
|
||||
typedef typename Base::Dart_handle Dart_handle;
|
||||
typedef typename Base::Map Map;
|
||||
typedef typename Map::size_type size_type;
|
||||
|
||||
typedef Tag_false Use_mark;
|
||||
|
||||
|
|
@ -2609,7 +2650,7 @@ namespace CGAL {
|
|||
/// Main constructor.
|
||||
CMap_dart_iterator_basic_of_involution_inv(Map& amap,
|
||||
Dart_handle adart,
|
||||
int /*amark*/):
|
||||
size_type /*amark*/):
|
||||
Base(amap, adart)
|
||||
{}
|
||||
/// Main constructor.
|
||||
|
|
@ -2631,6 +2672,7 @@ namespace CGAL {
|
|||
|
||||
typedef typename Base::Dart_handle Dart_handle;
|
||||
typedef typename Base::Map Map;
|
||||
typedef typename Map::size_type size_type;
|
||||
|
||||
typedef Tag_false Use_mark;
|
||||
|
||||
|
|
@ -2641,7 +2683,7 @@ namespace CGAL {
|
|||
/// Main constructor.
|
||||
CMap_dart_iterator_basic_of_involution(Map& amap,
|
||||
Dart_handle adart,
|
||||
int /*amark*/):
|
||||
size_type /*amark*/):
|
||||
Base(amap, adart)
|
||||
{}
|
||||
/// Main constructor.
|
||||
|
|
@ -2663,6 +2705,7 @@ namespace CGAL {
|
|||
|
||||
typedef typename Base::Dart_handle Dart_handle;
|
||||
typedef typename Base::Map Map;
|
||||
typedef typename Map::size_type size_type;
|
||||
|
||||
typedef Tag_false Use_mark;
|
||||
|
||||
|
|
@ -2673,7 +2716,7 @@ namespace CGAL {
|
|||
/// Main constructor.
|
||||
CMap_dart_iterator_basic_of_involution_inv(Map& amap,
|
||||
Dart_handle adart,
|
||||
int /*amark*/):
|
||||
size_type /*amark*/):
|
||||
Base(amap, adart)
|
||||
{}
|
||||
/// Main constructor.
|
||||
|
|
|
|||
|
|
@ -522,7 +522,7 @@ void test_split_attribute_functor_one_dart
|
|||
( CMap* amap, typename CMap::Dart_handle adart,
|
||||
CGAL::Unique_hash_map<typename CMap::template Attribute_handle<i>::type,
|
||||
unsigned int, typename CMap::Hash_function> &
|
||||
found_attributes, int mark )
|
||||
found_attributes, typename CMap::size_type mark )
|
||||
{
|
||||
CGAL_assertion( amap!=NULL );
|
||||
CGAL_static_assertion_msg(CMap::Helper::template
|
||||
|
|
@ -580,7 +580,7 @@ struct Test_split_attribute_functor_run
|
|||
static void run( CMap* amap,
|
||||
const std::deque<typename CMap::Dart_handle>
|
||||
&modified_darts,
|
||||
int mark_modified_darts=-1)
|
||||
typename CMap::size_type mark_modified_darts=CMap::MARK_ERROR)
|
||||
{
|
||||
CGAL_static_assertion( 1<=i && i<=CMap::dimension );
|
||||
CGAL_assertion( i!=j );
|
||||
|
|
@ -596,7 +596,7 @@ struct Test_split_attribute_functor_run
|
|||
CGAL::Unique_hash_map<Attribute_handle_i, unsigned int,
|
||||
typename CMap::Hash_function> found_attributes;
|
||||
|
||||
int mark = amap->get_new_mark(); // to mark incident cells.
|
||||
typename CMap::size_type mark = amap->get_new_mark(); // to mark incident cells.
|
||||
typename std::deque<typename CMap::Dart_handle>::const_iterator
|
||||
it=modified_darts.begin();
|
||||
for ( ; it!=modified_darts.end(); ++it )
|
||||
|
|
@ -609,7 +609,7 @@ struct Test_split_attribute_functor_run
|
|||
amap->negate_mark(mark);
|
||||
for ( it=modified_darts.begin(); it!=modified_darts.end(); ++it )
|
||||
{
|
||||
if ( mark_modified_darts!=-1 )
|
||||
if ( mark_modified_darts!=CMap::MARK_ERROR )
|
||||
amap->unmark(*it, mark_modified_darts);
|
||||
|
||||
if ( !amap->is_marked(*it, mark) )
|
||||
|
|
@ -624,7 +624,7 @@ struct Test_split_attribute_functor_run
|
|||
&modified_darts,
|
||||
const std::deque<typename CMap::Dart_handle>
|
||||
&modified_darts2,
|
||||
int mark_modified_darts=-1)
|
||||
typename CMap::size_type mark_modified_darts=CMap::MARK_ERROR)
|
||||
{
|
||||
CGAL_static_assertion( 1<=i && i<=CMap::dimension );
|
||||
CGAL_assertion( i!=j );
|
||||
|
|
@ -640,7 +640,7 @@ struct Test_split_attribute_functor_run
|
|||
CGAL::Unique_hash_map<Attribute_handle_i, unsigned int,
|
||||
typename CMap::Hash_function> found_attributes;
|
||||
|
||||
int mark = amap->get_new_mark(); // to mark incident cells.
|
||||
typename CMap::size_type mark = amap->get_new_mark(); // to mark incident cells.
|
||||
typename std::deque<typename CMap::Dart_handle>::const_iterator
|
||||
it=modified_darts.begin();
|
||||
for ( ; it!=modified_darts.end(); ++it )
|
||||
|
|
@ -660,7 +660,7 @@ struct Test_split_attribute_functor_run
|
|||
amap->negate_mark(mark);
|
||||
for ( it=modified_darts.begin(); it!=modified_darts.end(); ++it )
|
||||
{
|
||||
if ( mark_modified_darts!=-1 )
|
||||
if ( mark_modified_darts!=CMap::MARK_ERROR )
|
||||
amap->unmark(*it, mark_modified_darts);
|
||||
|
||||
if ( !amap->is_marked(*it, mark) )
|
||||
|
|
@ -668,7 +668,7 @@ struct Test_split_attribute_functor_run
|
|||
}
|
||||
for ( it2=modified_darts2.begin(); it2!=modified_darts2.end(); ++it2 )
|
||||
{
|
||||
if ( mark_modified_darts!=-1 )
|
||||
if ( mark_modified_darts!=CMap::MARK_ERROR )
|
||||
amap->unmark(*it2, mark_modified_darts);
|
||||
|
||||
if ( !amap->is_marked(*it2, mark) )
|
||||
|
|
@ -686,7 +686,7 @@ struct Test_split_attribute_functor_run<CMap, 0, j, T>
|
|||
static void run( CMap* amap,
|
||||
const std::deque<typename CMap::Dart_handle>
|
||||
&modified_darts,
|
||||
int mark_modified_darts=-1)
|
||||
typename CMap::size_type mark_modified_darts=CMap::MARK_ERROR)
|
||||
{
|
||||
CGAL_assertion( j!=0 && j!=1 );
|
||||
CGAL_assertion( amap!=NULL );
|
||||
|
|
@ -702,7 +702,7 @@ struct Test_split_attribute_functor_run<CMap, 0, j, T>
|
|||
typename CMap::Hash_function> found_attributes;
|
||||
typename CMap::Dart_handle od=amap->null_handle;
|
||||
|
||||
int mark = amap->get_new_mark(); // to mark incident cells.
|
||||
typename CMap::size_type mark = amap->get_new_mark(); // to mark incident cells.
|
||||
typename std::deque<typename CMap::Dart_handle>::const_iterator
|
||||
it=modified_darts.begin();
|
||||
for ( ; it!=modified_darts.end(); ++it )
|
||||
|
|
@ -720,7 +720,7 @@ struct Test_split_attribute_functor_run<CMap, 0, j, T>
|
|||
amap->negate_mark(mark);
|
||||
for ( it=modified_darts.begin(); it!=modified_darts.end(); ++it )
|
||||
{
|
||||
if ( mark_modified_darts!=-1 )
|
||||
if ( mark_modified_darts!=CMap::MARK_ERROR )
|
||||
amap->unmark(*it, mark_modified_darts);
|
||||
|
||||
if ( !amap->is_marked(*it, mark) )
|
||||
|
|
@ -739,7 +739,7 @@ struct Test_split_attribute_functor_run<CMap, 0, j, T>
|
|||
&modified_darts,
|
||||
const std::deque<typename CMap::Dart_handle>
|
||||
&modified_darts2,
|
||||
int mark_modified_darts=-1)
|
||||
typename CMap::size_type mark_modified_darts=CMap::MARK_ERROR)
|
||||
{
|
||||
CGAL_assertion( j!=0 && j!=1 );
|
||||
CGAL_assertion( amap!=NULL );
|
||||
|
|
@ -755,7 +755,7 @@ struct Test_split_attribute_functor_run<CMap, 0, j, T>
|
|||
typename CMap::Hash_function> found_attributes;
|
||||
typename CMap::Dart_handle od=amap->null_handle;
|
||||
|
||||
int mark = amap->get_new_mark(); // to mark incident cells.
|
||||
typename CMap::size_type mark = amap->get_new_mark(); // to mark incident cells.
|
||||
typename std::deque<typename CMap::Dart_handle>::const_iterator
|
||||
it=modified_darts.begin();
|
||||
for ( ; it!=modified_darts.end(); ++it )
|
||||
|
|
@ -785,7 +785,7 @@ struct Test_split_attribute_functor_run<CMap, 0, j, T>
|
|||
amap->negate_mark(mark);
|
||||
for ( it=modified_darts.begin(); it!=modified_darts.end(); ++it )
|
||||
{
|
||||
if ( mark_modified_darts!=-1 )
|
||||
if ( mark_modified_darts!=CMap::MARK_ERROR )
|
||||
amap->unmark(*it, mark_modified_darts);
|
||||
|
||||
if ( !amap->is_marked(*it, mark) )
|
||||
|
|
@ -797,7 +797,7 @@ struct Test_split_attribute_functor_run<CMap, 0, j, T>
|
|||
}
|
||||
for ( it2=modified_darts2.begin(); it2!=modified_darts2.end(); ++it2 )
|
||||
{
|
||||
if ( mark_modified_darts!=-1 )
|
||||
if ( mark_modified_darts!=CMap::MARK_ERROR )
|
||||
amap->unmark(*it2, mark_modified_darts);
|
||||
|
||||
if ( !amap->is_marked(*it2, mark) )
|
||||
|
|
@ -820,14 +820,14 @@ template<typename CMap, typename T>
|
|||
struct Test_split_attribute_functor_run<CMap, 0, 0, T>
|
||||
{
|
||||
static void run( CMap*, const std::deque<typename CMap::Dart_handle>&,
|
||||
int =-1)
|
||||
typename CMap::size_type =CMap::MARK_ERROR)
|
||||
{ CGAL_assertion(false); }
|
||||
static void run( CMap* amap,
|
||||
const std::deque<typename CMap::Dart_handle>
|
||||
&modified_darts,
|
||||
const std::deque<typename CMap::Dart_handle>
|
||||
&modified_darts2,
|
||||
int mark_modified_darts=-1)
|
||||
typename CMap::size_type mark_modified_darts=CMap::MARK_ERROR)
|
||||
{
|
||||
CGAL_assertion( amap!=NULL );
|
||||
CGAL_static_assertion_msg(CMap::Helper::template
|
||||
|
|
@ -842,7 +842,7 @@ struct Test_split_attribute_functor_run<CMap, 0, 0, T>
|
|||
typename CMap::Hash_function> found_attributes;
|
||||
typename CMap::Dart_handle od=amap->null_handle;
|
||||
|
||||
int mark = amap->get_new_mark(); // to mark incident cells.
|
||||
typename CMap::size_type mark = amap->get_new_mark(); // to mark incident cells.
|
||||
typename std::deque<typename CMap::Dart_handle>::const_iterator
|
||||
it=modified_darts.begin();
|
||||
for ( ; it!=modified_darts.end(); ++it )
|
||||
|
|
@ -864,7 +864,7 @@ struct Test_split_attribute_functor_run<CMap, 0, 0, T>
|
|||
amap->negate_mark(mark);
|
||||
for ( it=modified_darts.begin(); it!=modified_darts.end(); ++it )
|
||||
{
|
||||
if ( mark_modified_darts!=-1 )
|
||||
if ( mark_modified_darts!=CMap::MARK_ERROR )
|
||||
amap->unmark(*it, mark_modified_darts);
|
||||
|
||||
if ( !amap->is_marked(*it, mark) )
|
||||
|
|
@ -872,7 +872,7 @@ struct Test_split_attribute_functor_run<CMap, 0, 0, T>
|
|||
}
|
||||
for ( it2=modified_darts2.begin(); it2!=modified_darts2.end(); ++it2 )
|
||||
{
|
||||
if ( mark_modified_darts!=-1 )
|
||||
if ( mark_modified_darts!=CMap::MARK_ERROR )
|
||||
amap->unmark(*it2, mark_modified_darts);
|
||||
|
||||
od=amap->other_extremity(*it2);
|
||||
|
|
@ -890,12 +890,12 @@ template<typename CMap, typename T>
|
|||
struct Test_split_attribute_functor_run<CMap, 0, 1, T>
|
||||
{
|
||||
static void run( CMap*, const std::deque<typename CMap::Dart_handle>&,
|
||||
int =-1)
|
||||
typename CMap::size_type =CMap::MARK_ERROR)
|
||||
{ CGAL_assertion(false); }
|
||||
static void run( CMap* amap, const std::deque<typename CMap::Dart_handle>&
|
||||
modified_darts,
|
||||
const std::deque<typename CMap::Dart_handle>&
|
||||
modified_darts2, int mark_modified_darts=-1)
|
||||
modified_darts2, typename CMap::size_type mark_modified_darts=CMap::MARK_ERROR)
|
||||
{ CGAL::internal::Test_split_attribute_functor_run<CMap, 0, 0, T>::
|
||||
run(amap, modified_darts, modified_darts2, mark_modified_darts); }
|
||||
};
|
||||
|
|
@ -904,10 +904,10 @@ template<typename CMap, unsigned int i, unsigned int j>
|
|||
struct Test_split_attribute_functor_run<CMap, i, j, CGAL::Void>
|
||||
{
|
||||
static void run( CMap*, const std::deque<typename CMap::Dart_handle>&,
|
||||
int=-1)
|
||||
typename CMap::size_type=CMap::MARK_ERROR)
|
||||
{}
|
||||
static void run( CMap*, const std::deque<typename CMap::Dart_handle>&,
|
||||
const std::deque<typename CMap::Dart_handle>&, int=-1)
|
||||
const std::deque<typename CMap::Dart_handle>&, typename CMap::size_type=CMap::MARK_ERROR)
|
||||
{}
|
||||
};
|
||||
// Specialization for i=j.
|
||||
|
|
@ -915,10 +915,10 @@ template<typename CMap, unsigned int i, typename T>
|
|||
struct Test_split_attribute_functor_run<CMap, i, i, T>
|
||||
{
|
||||
static void run( CMap*, const std::deque<typename CMap::Dart_handle>&,
|
||||
int=-1)
|
||||
typename CMap::size_type=CMap::MARK_ERROR)
|
||||
{}
|
||||
static void run( CMap*, const std::deque<typename CMap::Dart_handle>&,
|
||||
const std::deque<typename CMap::Dart_handle>&, int=-1)
|
||||
const std::deque<typename CMap::Dart_handle>&, typename CMap::size_type=CMap::MARK_ERROR)
|
||||
{}
|
||||
};
|
||||
// Specialization for i=1 and j=0 (edge attributes are not modified
|
||||
|
|
@ -927,10 +927,10 @@ template<typename CMap, typename T>
|
|||
struct Test_split_attribute_functor_run<CMap, 1, 0, T>
|
||||
{
|
||||
static void run( CMap*, const std::deque<typename CMap::Dart_handle>&,
|
||||
int=-1)
|
||||
typename CMap::size_type=CMap::MARK_ERROR)
|
||||
{}
|
||||
static void run( CMap*, const std::deque<typename CMap::Dart_handle>&,
|
||||
const std::deque<typename CMap::Dart_handle>&, int=-1)
|
||||
const std::deque<typename CMap::Dart_handle>&, typename CMap::size_type=CMap::MARK_ERROR)
|
||||
{}
|
||||
};
|
||||
// ************************************************************************
|
||||
|
|
@ -949,7 +949,7 @@ struct Test_split_attribute_functor
|
|||
static void run( CMap* amap,
|
||||
const std::deque<typename CMap::Dart_handle>
|
||||
&modified_darts,
|
||||
int mark_modified_darts=-1)
|
||||
typename CMap::size_type mark_modified_darts=CMap::MARK_ERROR)
|
||||
{
|
||||
CGAL::internal::Test_split_attribute_functor_run<CMap, i, j>::
|
||||
run(amap, modified_darts, mark_modified_darts);
|
||||
|
|
@ -960,7 +960,7 @@ struct Test_split_attribute_functor
|
|||
&modified_darts,
|
||||
const std::deque<typename CMap::Dart_handle>
|
||||
&modified_darts2,
|
||||
int mark_modified_darts=-1)
|
||||
typename CMap::size_type mark_modified_darts=CMap::MARK_ERROR)
|
||||
{
|
||||
CGAL::internal::Test_split_attribute_functor_run<CMap, i, j>::
|
||||
run(amap, modified_darts, modified_darts2, mark_modified_darts);
|
||||
|
|
|
|||
|
|
@ -188,17 +188,19 @@ struct Test_is_valid_attribute_functor
|
|||
* @param amark a mark used to mark darts of the i-cell.
|
||||
* @return true iff all the darts of the i-cell link to the same attribute.
|
||||
*/
|
||||
typedef typename CMap::size_type size_type;
|
||||
|
||||
template <unsigned int i>
|
||||
static void run(const CMap* amap,
|
||||
typename CMap::Dart_const_handle adart,
|
||||
std::vector<int>* marks, bool *ares)
|
||||
std::vector<size_type>* marks, bool *ares)
|
||||
{
|
||||
CGAL_static_assertion_msg(CMap::Helper::template
|
||||
Dimension_index<i>::value>=0,
|
||||
"Test_is_valid_attribute_functor<i> but "
|
||||
" i-attributes are disabled");
|
||||
|
||||
int amark = (*marks)[i];
|
||||
size_type amark = (*marks)[i];
|
||||
if ( amap->is_marked(adart, amark) ) return; // dart already test.
|
||||
|
||||
bool valid = true;
|
||||
|
|
@ -268,10 +270,12 @@ struct Test_is_valid_attribute_functor
|
|||
template<typename CMap>
|
||||
struct Correct_invalid_attributes_functor
|
||||
{
|
||||
typedef typename CMap::size_type size_type;
|
||||
|
||||
template <unsigned int i>
|
||||
static void run(CMap* amap,
|
||||
typename CMap::Dart_handle adart,
|
||||
std::vector<int>* marks)
|
||||
std::vector<size_type>* marks)
|
||||
{
|
||||
// std::cout << "Correct_invalid_attributes_functor for " << i << "-cell" << std::endl;
|
||||
CGAL_static_assertion_msg(CMap::Helper::template
|
||||
|
|
@ -279,7 +283,7 @@ struct Correct_invalid_attributes_functor
|
|||
"Correct_invalid_attributes_functor<i> but "
|
||||
" i-attributes are disabled");
|
||||
|
||||
int amark = (*marks)[i];
|
||||
size_type amark = (*marks)[i];
|
||||
typename CMap::template Attribute_handle<i>::type
|
||||
a=amap->template attribute<i>(adart);
|
||||
|
||||
|
|
@ -329,13 +333,15 @@ struct Correct_invalid_attributes_functor
|
|||
template<typename CMap>
|
||||
struct Count_cell_functor
|
||||
{
|
||||
typedef typename CMap::size_type size_type;
|
||||
|
||||
template <unsigned int i>
|
||||
static void run( const CMap* amap,
|
||||
typename CMap::Dart_const_handle adart,
|
||||
std::vector<int>* amarks,
|
||||
std::vector<size_type>* amarks,
|
||||
std::vector<unsigned int>* ares )
|
||||
{
|
||||
if ( (*amarks)[i]!=-1 && !amap->is_marked(adart, (*amarks)[i]) )
|
||||
if ( (*amarks)[i]!=CMap::MARK_ERROR && !amap->is_marked(adart, (*amarks)[i]) )
|
||||
{
|
||||
++ (*ares)[i];
|
||||
CGAL::mark_cell<CMap,i>(*amap, adart, (*amarks)[i]);
|
||||
|
|
@ -705,7 +711,7 @@ struct Reverse_orientation_of_map_functor
|
|||
{
|
||||
static void run(CMap *amap)
|
||||
{
|
||||
int mark = amap->get_new_mark();
|
||||
typename CMap::size_type mark = amap->get_new_mark();
|
||||
CGAL_precondition(amap->is_whole_map_unmarked(mark));
|
||||
CGAL_precondition(amap->is_valid());
|
||||
for (typename CMap::Dart_range::iterator current_dart=amap->darts().begin(),
|
||||
|
|
@ -759,7 +765,7 @@ struct Reverse_orientation_of_map_functor<CMap, CGAL::Void>
|
|||
{
|
||||
static void run(CMap *amap)
|
||||
{
|
||||
int mark = amap->get_new_mark();
|
||||
typename CMap::size_type mark = amap->get_new_mark();
|
||||
CGAL_precondition(amap->is_whole_map_unmarked(mark));
|
||||
CGAL_precondition(amap->is_valid());
|
||||
for (typename CMap::Dart_range::iterator current_dart=amap->darts().begin(),
|
||||
|
|
@ -796,7 +802,7 @@ struct Reverse_orientation_of_connected_component_functor
|
|||
{
|
||||
static void run(CMap *amap, typename CMap::Dart_handle adart)
|
||||
{
|
||||
int mark = amap->get_new_mark();
|
||||
typename CMap::size_type mark = amap->get_new_mark();
|
||||
CGAL_precondition(amap->is_whole_map_unmarked(mark));
|
||||
for (typename CMap::template Dart_of_cell_range<CMap::dimension+1>::iterator
|
||||
current_dart=amap->template darts_of_cell<CMap::dimension+1>(adart).
|
||||
|
|
@ -855,7 +861,7 @@ struct Reverse_orientation_of_connected_component_functor<CMap, CGAL::Void>
|
|||
{
|
||||
static void run(CMap *amap, typename CMap::Dart_handle adart)
|
||||
{
|
||||
int mark = amap->get_new_mark();
|
||||
typename CMap::size_type mark = amap->get_new_mark();
|
||||
CGAL_precondition(amap->is_whole_map_unmarked(mark));
|
||||
for (typename CMap::template Dart_of_cell_range<CMap::dimension+1>::iterator
|
||||
current_dart=amap->template darts_of_cell<CMap::dimension+1>(adart).
|
||||
|
|
|
|||
|
|
@ -56,14 +56,14 @@ struct Is_sewable_functor
|
|||
typename CMap::Dart_const_handle,
|
||||
typename CMap::Hash_function> bijection;
|
||||
|
||||
int m1 = amap->get_new_mark();
|
||||
int m2 = amap->get_new_mark();
|
||||
typename CMap::size_type m1 = amap->get_new_mark();
|
||||
typename CMap::size_type m2 = amap->get_new_mark();
|
||||
CGAL::CMap_dart_const_iterator_basic_of_involution<CMap,i>
|
||||
I1(*amap, adart1, m1);
|
||||
CGAL::CMap_dart_const_iterator_basic_of_involution_inv<CMap,i>
|
||||
I2(*amap, adart2, m2);
|
||||
bool res = true;
|
||||
int mbijection = amap->get_new_mark();
|
||||
typename CMap::size_type mbijection = amap->get_new_mark();
|
||||
|
||||
while ( res && I1.cont() && I2.cont() )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ bool test2D()
|
|||
|
||||
Map map;
|
||||
Dart_handle dh, dh2, d1, d2, d3;
|
||||
int mark;
|
||||
typename Map::size_type mark;
|
||||
unsigned int nbc, nb2;
|
||||
|
||||
cout<<"Size of dart:"<<sizeof(typename Map::Dart)<<std::endl;
|
||||
|
|
|
|||
|
|
@ -338,7 +338,7 @@ bool test3D()
|
|||
{
|
||||
typedef typename Map::Dart_handle Dart_handle;
|
||||
Dart_handle d,dh,dh2,d1,d2,d3,d4;
|
||||
int mark;
|
||||
typename Map::size_type mark;
|
||||
unsigned int nbc,nb2;
|
||||
Map map;
|
||||
cout << "***************************** TEST BASIC CREATION 3D:"
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ public:
|
|||
* @param amark is a mark designing old darts (i.e. darts not created during
|
||||
* the triangulation step)
|
||||
*/
|
||||
Smooth_old_vertex (LCC & alcc, unsigned int /* TODO amark*/):mlcc (alcc)
|
||||
Smooth_old_vertex (LCC & alcc, LCC::size_type /* TODO amark*/):mlcc (alcc)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -128,8 +128,8 @@ subdivide_lcc_3 (LCC & m)
|
|||
if (m.number_of_darts () == 0)
|
||||
return;
|
||||
|
||||
unsigned int mark = m.get_new_mark ();
|
||||
unsigned int treated = m.get_new_mark ();
|
||||
LCC::size_type mark = m.get_new_mark ();
|
||||
LCC::size_type treated = m.get_new_mark ();
|
||||
m.negate_mark (mark); // All the old darts are marked in O(1).
|
||||
|
||||
// 1) We smoth the old vertices.
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ public:
|
|||
* @param amark is a mark designing old darts (i.e. darts not created during
|
||||
* the subdivision step)
|
||||
*/
|
||||
Smooth_edge_pqq (LCC & alcc, unsigned int o):mlcc (alcc), old(o)
|
||||
Smooth_edge_pqq (LCC & alcc, LCC::size_type o):mlcc (alcc), old(o)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -99,7 +99,7 @@ public:
|
|||
}
|
||||
private:
|
||||
LCC & mlcc;
|
||||
unsigned int old;
|
||||
LCC::size_type old;
|
||||
};
|
||||
|
||||
// Smooth an old vertex depending on the vertices of its incident facet and edge.
|
||||
|
|
@ -111,7 +111,7 @@ public:
|
|||
* @param amark is a mark designing old darts (i.e. darts not created during
|
||||
* the triangulation step)
|
||||
*/
|
||||
Smooth_vertex_pqq (LCC & alcc, unsigned int o):mlcc (alcc), old(o)
|
||||
Smooth_vertex_pqq (LCC & alcc, LCC::size_type o):mlcc (alcc), old(o)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -214,7 +214,7 @@ public:
|
|||
}
|
||||
private:
|
||||
LCC & mlcc;
|
||||
unsigned int old;
|
||||
LCC::size_type old;
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -225,8 +225,8 @@ subdivide_lcc_pqq (LCC & m)
|
|||
if (m.number_of_darts () == 0)
|
||||
return;
|
||||
|
||||
unsigned int old = m.get_new_mark ();
|
||||
unsigned int treated = m.get_new_mark ();
|
||||
LCC::size_type old = m.get_new_mark ();
|
||||
LCC::size_type treated = m.get_new_mark ();
|
||||
m.negate_mark (old); // All the old darts are marked in O(1).
|
||||
|
||||
// 1) We subdivide each edge.
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ void MainWindow::onSceneChanged ()
|
|||
{
|
||||
QApplication::setOverrideCursor( Qt::WaitCursor );
|
||||
|
||||
int mark = scene.lcc->get_new_mark ();
|
||||
LCC::size_type mark = scene.lcc->get_new_mark ();
|
||||
scene.lcc->negate_mark (mark);
|
||||
|
||||
std::vector<unsigned int> cells;
|
||||
|
|
@ -571,7 +571,7 @@ void MainWindow::on_actionCompute_Voronoi_3D_triggered ()
|
|||
// We remove the infinite volume and all its adjacent volumes.
|
||||
{
|
||||
std::stack<Dart_handle> toremove;
|
||||
int mark_toremove=scene.lcc->get_new_mark();
|
||||
LCC::size_type mark_toremove=scene.lcc->get_new_mark();
|
||||
toremove.push(ddh);
|
||||
CGAL::mark_cell<LCC,3>(*scene.lcc, ddh, mark_toremove);
|
||||
for (LCC::Dart_of_cell_range<3>::iterator
|
||||
|
|
@ -676,7 +676,7 @@ void MainWindow::on_actionClose_volume_triggered()
|
|||
|
||||
void MainWindow::on_actionSew3_same_facets_triggered()
|
||||
{
|
||||
int mymark = scene.lcc->get_new_mark();
|
||||
LCC::size_type mymark = scene.lcc->get_new_mark();
|
||||
mark_all_filled_and_visible_volumes(mymark);
|
||||
|
||||
QApplication::setOverrideCursor (Qt::WaitCursor);
|
||||
|
|
@ -1060,7 +1060,7 @@ void MainWindow::onHeaderClicked(int col)
|
|||
}
|
||||
}
|
||||
|
||||
void MainWindow::mark_all_filled_and_visible_volumes(int amark)
|
||||
void MainWindow::mark_all_filled_and_visible_volumes(LCC::size_type amark)
|
||||
{
|
||||
for (LCC::Attribute_range<3>::type::iterator
|
||||
it=scene.lcc->attributes<3>().begin(),
|
||||
|
|
@ -1079,7 +1079,7 @@ void MainWindow::on_actionExtend_filled_volumes_triggered()
|
|||
|
||||
std::vector<LCC::Attribute_handle<3>::type> tofill;
|
||||
|
||||
int mark_volume = scene.lcc->get_new_mark();
|
||||
LCC::size_type mark_volume = scene.lcc->get_new_mark();
|
||||
bool already_tofill;
|
||||
|
||||
for (LCC::Attribute_range<3>::type::iterator
|
||||
|
|
@ -1134,7 +1134,7 @@ void MainWindow::on_actionExtend_hidden_volumes_triggered()
|
|||
|
||||
std::vector<LCC::Attribute_handle<3>::type> tohide;
|
||||
|
||||
int mark_volume = scene.lcc->get_new_mark();
|
||||
LCC::size_type mark_volume = scene.lcc->get_new_mark();
|
||||
bool already_tohide;
|
||||
|
||||
for (LCC::Attribute_range<3>::type::iterator
|
||||
|
|
@ -1254,9 +1254,9 @@ void MainWindow::onMengerInc()
|
|||
std::vector<Dart_handle> faces;
|
||||
std::size_t nbvolinit = mengerVolumes.size();
|
||||
|
||||
int markEdges = (scene.lcc)->get_new_mark();
|
||||
int markFaces = (scene.lcc)->get_new_mark();
|
||||
int markVols = (scene.lcc)->get_new_mark();
|
||||
LCC::size_type markEdges = (scene.lcc)->get_new_mark();
|
||||
LCC::size_type markFaces = (scene.lcc)->get_new_mark();
|
||||
LCC::size_type markVols = (scene.lcc)->get_new_mark();
|
||||
|
||||
for(std::vector<Dart_handle>::iterator itvol=mengerVolumes.begin();
|
||||
itvol!=mengerVolumes.end(); ++itvol)
|
||||
|
|
@ -1569,7 +1569,7 @@ void MainWindow::split_vol_in_twentyseven(Dart_handle dh)
|
|||
|
||||
void MainWindow::process_full_slice(Dart_handle init,
|
||||
std::vector<Dart_handle>& faces,
|
||||
int markVols)
|
||||
LCC::size_type markVols)
|
||||
{
|
||||
Dart_handle d[12];
|
||||
d[0]=scene.lcc->beta(init,1,2);
|
||||
|
|
@ -1600,7 +1600,7 @@ void MainWindow::process_full_slice(Dart_handle init,
|
|||
|
||||
void MainWindow::process_inter_slice(Dart_handle init,
|
||||
std::vector<Dart_handle>& faces,
|
||||
int markVols)
|
||||
LCC::size_type markVols)
|
||||
{
|
||||
Dart_handle d[24];
|
||||
d[0]=init;
|
||||
|
|
@ -1660,8 +1660,8 @@ void MainWindow::onMengerDec()
|
|||
// thus we can directly "cut" the std::vector to the correct size.
|
||||
mengerVolumes.resize(CGAL::ipower(20,mengerLevel));
|
||||
|
||||
int markVols = (scene.lcc)->get_new_mark();
|
||||
int markVertices = (scene.lcc)->get_new_mark();
|
||||
LCC::size_type markVols = (scene.lcc)->get_new_mark();
|
||||
LCC::size_type markVertices = (scene.lcc)->get_new_mark();
|
||||
|
||||
std::vector<Dart_handle> faces;
|
||||
std::vector<Dart_handle> edges;
|
||||
|
|
@ -1955,8 +1955,8 @@ void MainWindow::onSierpinskiCarpetInc()
|
|||
std::vector<Dart_handle> edges;
|
||||
nbfacesinit = sierpinskiCarpetSurfaces.size();
|
||||
|
||||
int markEdges = (scene.lcc)->get_new_mark();
|
||||
int markFaces = (scene.lcc)->get_new_mark();
|
||||
LCC::size_type markEdges = (scene.lcc)->get_new_mark();
|
||||
LCC::size_type markFaces = (scene.lcc)->get_new_mark();
|
||||
|
||||
for(std::vector<Dart_handle>::iterator itfaces=sierpinskiCarpetSurfaces.begin();
|
||||
itfaces!=sierpinskiCarpetSurfaces.end(); ++itfaces)
|
||||
|
|
@ -2079,7 +2079,7 @@ void MainWindow::sierpinski_carpet_update_geometry()
|
|||
|
||||
if (updateAttributesMethodTraversal)*/
|
||||
{
|
||||
int markVertices = (scene.lcc)->get_new_mark();
|
||||
LCC::size_type markVertices = (scene.lcc)->get_new_mark();
|
||||
|
||||
for(std::size_t i = 0; i < nbfacesinit; i++)
|
||||
{
|
||||
|
|
@ -2179,7 +2179,7 @@ void MainWindow::sierpinski_carpet_update_geometry()
|
|||
|
||||
void MainWindow::sierpinski_carpet_compute_geometry()
|
||||
{
|
||||
int markVertices = (scene.lcc)->get_new_mark();
|
||||
LCC::size_type markVertices = (scene.lcc)->get_new_mark();
|
||||
|
||||
for(std::size_t i = 0; i < nbfacesinit; i++)
|
||||
{
|
||||
|
|
@ -2493,8 +2493,8 @@ void MainWindow::onSierpinskiCarpetDec()
|
|||
// thus we can directly "cut" the std::vector to the correct size.
|
||||
sierpinskiCarpetSurfaces.resize(CGAL::ipower(8,sierpinskiCarpetLevel));
|
||||
|
||||
int markSurfaces = (scene.lcc)->get_new_mark();
|
||||
int markVertices = (scene.lcc)->get_new_mark();
|
||||
LCC::size_type markSurfaces = (scene.lcc)->get_new_mark();
|
||||
LCC::size_type markVertices = (scene.lcc)->get_new_mark();
|
||||
|
||||
std::vector<Dart_handle> edges;
|
||||
std::vector<Dart_handle> vertices;
|
||||
|
|
@ -2693,8 +2693,8 @@ void MainWindow::onSierpinskiTriangleInc()
|
|||
std::vector<Dart_handle> edges;
|
||||
nbfacesinit = sierpinskiTriangleSurfaces.size();
|
||||
|
||||
int markEdges = (scene.lcc)->get_new_mark();
|
||||
int markFaces = (scene.lcc)->get_new_mark();
|
||||
LCC::size_type markEdges = (scene.lcc)->get_new_mark();
|
||||
LCC::size_type markFaces = (scene.lcc)->get_new_mark();
|
||||
|
||||
for(std::vector<Dart_handle>::iterator itfaces=sierpinskiTriangleSurfaces.begin();
|
||||
itfaces!=sierpinskiTriangleSurfaces.end(); ++itfaces)
|
||||
|
|
@ -2880,8 +2880,8 @@ void MainWindow::onSierpinskiTriangleDec()
|
|||
// thus we can directly "cut" the std::vector to the correct size.
|
||||
sierpinskiTriangleSurfaces.resize(CGAL::ipower(3,sierpinskiTriangleLevel));
|
||||
|
||||
int markSurfaces = (scene.lcc)->get_new_mark();
|
||||
int markVertices = (scene.lcc)->get_new_mark();
|
||||
LCC::size_type markSurfaces = (scene.lcc)->get_new_mark();
|
||||
LCC::size_type markVertices = (scene.lcc)->get_new_mark();
|
||||
|
||||
std::vector<Dart_handle> edges;
|
||||
std::vector<Dart_handle> vertices;
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ protected:
|
|||
void on_new_volume(Dart_handle adart);
|
||||
void on_delete_volume(Dart_handle adart);
|
||||
void init_all_new_volumes();
|
||||
void mark_all_filled_and_visible_volumes(int amark);
|
||||
void mark_all_filled_and_visible_volumes(LCC::size_type amark);
|
||||
|
||||
Dart_handle make_iso_cuboid(const Point_3 basepoint, LCC::FT lg);
|
||||
|
||||
|
|
@ -209,10 +209,10 @@ protected:
|
|||
void split_vol_in_twentyseven(Dart_handle dh);
|
||||
void process_full_slice(Dart_handle init,
|
||||
std::vector<Dart_handle>& faces,
|
||||
int markVols);
|
||||
LCC::size_type markVols);
|
||||
void process_inter_slice(Dart_handle init,
|
||||
std::vector<Dart_handle>& faces,
|
||||
int markVols);
|
||||
LCC::size_type markVols);
|
||||
|
||||
void sierpinski_carpet_copy_attributes_and_embed_vertex(Dart_handle dh,
|
||||
LCC::Point& p);
|
||||
|
|
|
|||
|
|
@ -151,8 +151,8 @@ public:
|
|||
|
||||
vtkPolyData *polydata = vtkPolyData::New();
|
||||
|
||||
int facettreated = lcc.get_new_mark();
|
||||
int vertextreated = lcc.get_new_mark();
|
||||
typename LCC::size_type facettreated = lcc.get_new_mark();
|
||||
typename LCC::size_type vertextreated = lcc.get_new_mark();
|
||||
|
||||
vtkCellArray* polygons = vtkCellArray::New();
|
||||
vtkCellArray* vertices = vtkCellArray::New();
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ void display_voronoi(LCC_2& alcc, Dart_handle adart)
|
|||
// Indeed, we cannot view these faces since they do not have
|
||||
// a "correct geometry".
|
||||
std::stack<Dart_handle> toremove;
|
||||
int mark_toremove=alcc.get_new_mark();
|
||||
LCC_2::size_type mark_toremove=alcc.get_new_mark();
|
||||
|
||||
// adart belongs to the infinite face.
|
||||
toremove.push(adart);
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ void display_voronoi(LCC_3& alcc, Dart_handle adart)
|
|||
// Indeed, we cannot view these volumes since they do not have
|
||||
// a "correct geometry".
|
||||
std::stack<Dart_handle> toremove;
|
||||
int mark_toremove=alcc.get_new_mark();
|
||||
LCC_3::size_type mark_toremove=alcc.get_new_mark();
|
||||
|
||||
// adart belongs to the infinite volume.
|
||||
toremove.push(adart);
|
||||
|
|
|
|||
|
|
@ -361,9 +361,9 @@ namespace CGAL {
|
|||
// Copy of the code in CMap::correct_invalid_attributes() to avoid
|
||||
// 2 iterations through the darts of the map.
|
||||
|
||||
std::vector<int> marks(dimension+1);
|
||||
std::vector<size_type> marks(dimension+1);
|
||||
for ( unsigned int i=0; i<=dimension; ++i)
|
||||
marks[i] = -1;
|
||||
marks[i] = Base::MARK_ERROR;
|
||||
|
||||
Helper::template
|
||||
Foreach_enabled_attributes<Reserve_mark_functor<Self> >::
|
||||
|
|
@ -384,7 +384,7 @@ namespace CGAL {
|
|||
}
|
||||
|
||||
for ( unsigned int i=0; i<=dimension; ++i)
|
||||
if ( marks[i]!=-1 )
|
||||
if ( marks[i]!=Base::MARK_ERROR )
|
||||
{
|
||||
CGAL_assertion( this->is_whole_map_marked(marks[i]) );
|
||||
free_mark(marks[i]);
|
||||
|
|
@ -414,13 +414,22 @@ namespace CGAL {
|
|||
|
||||
/// Sew3 the marked facets having same geometry
|
||||
/// (a facet is considered marked if one of its dart is marked).
|
||||
unsigned int sew3_same_facets(int AMark)
|
||||
unsigned int sew3_same_facets(size_type AMark)
|
||||
{
|
||||
unsigned int res = 0;
|
||||
|
||||
std::map<Point, std::vector<Dart_handle> > one_dart_per_facet;
|
||||
int mymark = this->get_new_mark();
|
||||
CGAL_assertion( mymark!=-1 );
|
||||
size_type mymark;
|
||||
// CGAL_assertion( mymark!=-1 );
|
||||
try
|
||||
{
|
||||
mymark = this->get_new_mark();
|
||||
}
|
||||
catch (typename Base::Exception_mark_is_out_of_border e)
|
||||
{
|
||||
std::cerr<<"No more free mark, exit."<<std::endl;
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
// First we fill the std::map by one dart per facet, and by using
|
||||
// the minimal point as index.
|
||||
|
|
@ -486,7 +495,7 @@ namespace CGAL {
|
|||
/// (all the facets of the map are considered)
|
||||
unsigned int sew3_same_facets()
|
||||
{
|
||||
int mark = this->get_new_mark();
|
||||
size_type mark = this->get_new_mark();
|
||||
this->negate_mark(mark);
|
||||
unsigned int res=sew3_same_facets(mark);
|
||||
this->free_mark(mark);
|
||||
|
|
|
|||
|
|
@ -577,7 +577,7 @@ namespace CGAL {
|
|||
alcc.vertex_attributes().end());
|
||||
writer.write_facet_header();
|
||||
|
||||
int m = alcc.get_new_mark();
|
||||
typename LCC::size_type m = alcc.get_new_mark();
|
||||
|
||||
for ( typename LCC::Dart_range::iterator itall = alcc.darts().begin(),
|
||||
itallend = alcc.darts().end(); itall!=itallend; ++itall )
|
||||
|
|
|
|||
|
|
@ -153,21 +153,21 @@ namespace CGAL {
|
|||
return ADart->get_marks();
|
||||
}
|
||||
/// Return the mark value of dart a given mark number.
|
||||
bool get_dart_mark(Dart_const_handle ADart, int amark) const
|
||||
bool get_dart_mark(Dart_const_handle ADart, size_type amark) const
|
||||
{
|
||||
CGAL_assertion( ADart!=NULL );
|
||||
return ADart->get_mark(amark);
|
||||
}
|
||||
|
||||
/// Set the mark of a given mark number to a given value.
|
||||
void set_dart_mark(Dart_const_handle ADart, int amark, bool avalue) const
|
||||
void set_dart_mark(Dart_const_handle ADart, size_type amark, bool avalue) const
|
||||
{
|
||||
CGAL_assertion( ADart!=NULL );
|
||||
ADart->set_mark(amark, avalue);
|
||||
}
|
||||
|
||||
/// Flip the mark of a given mark number to a given value.
|
||||
void flip_dart_mark(Dart_const_handle ADart, int amark) const
|
||||
void flip_dart_mark(Dart_const_handle ADart, size_type amark) const
|
||||
{
|
||||
CGAL_assertion( ADart!=NULL );
|
||||
ADart->flip_mark(amark);
|
||||
|
|
|
|||
Loading…
Reference in New Issue