diff --git a/Combinatorial_map/include/CGAL/Cell_attribute.h b/Combinatorial_map/include/CGAL/Cell_attribute.h index 5bc4f045a45..02f2169e081 100644 --- a/Combinatorial_map/include/CGAL/Cell_attribute.h +++ b/Combinatorial_map/include/CGAL/Cell_attribute.h @@ -428,9 +428,6 @@ namespace CGAL { template < unsigned int, class, class, class, class > friend class Combinatorial_map_base; - template - friend struct Index::Dart; - template < unsigned int, class, class, class, class > friend class Generalized_map_base; @@ -439,23 +436,10 @@ namespace CGAL { template friend class GMap_linear_cell_complex_storage_1; ->>>>>>> master - - template < unsigned int, typename> - friend struct GMap_dart; template friend class Compact_container_with_index; - template - friend struct internal::Decrease_attribute_functor_run; - - template - friend struct internal::Reverse_orientation_of_map_functor; - - template - friend struct internal::Reverse_orientation_of_connected_component_functor; - public: typedef Tag_false Supports_cell_dart; @@ -544,27 +528,12 @@ namespace CGAL { template < unsigned int, class, class, class, class > friend class Combinatorial_map_base; - template - friend struct Index::Dart; - template < unsigned int, class, class, class, class > friend class Generalized_map_base; - template - friend struct GMap_dart; - template friend class Compact_container_with_index; - template - friend struct internal::Decrease_attribute_functor_run; - - template - friend struct internal::Reverse_orientation_of_map_functor; - - template - friend struct internal::Reverse_orientation_of_connected_component_functor; - public: typedef Tag_true Supports_cell_dart; diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_utility.h b/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_utility.h index db5d567551f..a460ecd9867 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_utility.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_utility.h @@ -435,9 +435,10 @@ namespace CGAL iterator_type; // TODO case when there is no Use_index typedef in CMap - typedef typename boost::mpl::if_ + /* TODO ask sebastien ? + typedef typename boost::mpl::if_ < typename boost::is_same::type, - typename CMap::Dart_handle, iterator_type >::type type; + typename CMap::Dart_handle, iterator_type >::type type;*/ typedef typename GetIndexOrHandle >::type type; @@ -451,10 +452,11 @@ namespace CGAL typedef typename CMap::template Container_for_attributes:: const_iterator iterator_type; + /* TODO ask sebastien ? typedef typename boost::mpl::if_ < typename boost::is_same::type, typename CMap::Dart_handle, iterator_type >::type type; - + */ typedef typename GetConstIndexOrConstHandle >::type type; }; diff --git a/Combinatorial_map/include/CGAL/Dart.h b/Combinatorial_map/include/CGAL/Dart.h index 4855f70795e..0ff820763d3 100644 --- a/Combinatorial_map/include/CGAL/Dart.h +++ b/Combinatorial_map/include/CGAL/Dart.h @@ -29,12 +29,18 @@ namespace CGAL { template class Combinatorial_map_storage_1; + template + class Combinatorial_map_storage_2; + template class Generalized_map_storage_1; template class CMap_linear_cell_complex_storage_1; + template + class CMap_linear_cell_complex_storage_2; + template class GMap_linear_cell_complex_storage_1; @@ -264,14 +270,12 @@ namespace CGAL { public: typedef CGAL::Void Info; }; + namespace Index { template struct Dart { - template < unsigned int, class, class, class, class > - friend class Combinatorial_map_base; - template friend class Combinatorial_map_storage_1; @@ -287,27 +291,15 @@ namespace CGAL { template friend class Compact_container; + template + friend class Concurrent_compact_container; + template friend class Compact_container_with_index; template friend class Compact_container_with_index_2; - template - friend struct Remove_cell_functor; - - template - friend struct Contract_cell_functor; - - template - friend struct internal::link_beta_functor; - - template - friend struct internal::Reverse_orientation_of_map_functor; - - template - friend struct internal::Reverse_orientation_of_connected_component_functor; - public: typedef Dart Self; typedef typename Refs::Dart_handle Dart_handle; @@ -329,47 +321,11 @@ namespace CGAL { /// The dimension of the combinatorial map. static const unsigned int dimension = d; - /** Return the beta of this dart for a given dimension. - * @param i the dimension. - * @return beta(\em i). - */ - template - Dart_handle beta() + Dart_handle get_f(unsigned int i) const { - CGAL_assertion(i <= dimension); - return mbeta[i]; + assert(i<=dimension); + return mf[i]; } - Dart_handle beta(unsigned int i) - { - CGAL_assertion(i <= dimension); - return mbeta[i]; - } - template - Dart_const_handle beta() const - { - CGAL_assertion(i <= dimension); - return mbeta[i]; - } - Dart_const_handle beta(unsigned int i) const - { - CGAL_assertion(i <= dimension); - return mbeta[i]; - } - - /** Return the beta inverse of this dart for a given dimension. - * @param i the dimension. - * @return beta^{-1}(\em i). - */ - template - Dart_handle beta_inv() - { return beta(); } - Dart_handle beta_inv(unsigned int i) - { return beta(CGAL_BETAINV(i)); } - template - Dart_const_handle beta_inv() const - { return beta(); } - Dart_const_handle beta_inv(unsigned int i) const - { return beta(CGAL_BETAINV(i)); } /// @return a handle on the i-attribute template @@ -455,18 +411,18 @@ namespace CGAL { mattribute_handles(adart.mattribute_handles) { for (unsigned int i = 0; i <= dimension; ++i) - mbeta[i] = adart.mbeta[i]; + mf[i] = adart.mf[i]; } public: size_type for_compact_container_with_index() const - { return mbeta[0].for_compact_container_with_index(); } + { return mf[0].for_compact_container_with_index(); } size_type& for_compact_container_with_index() - { return mbeta[0].for_compact_container_with_index(); } + { return mf[0].for_compact_container_with_index(); } protected: - /// Beta for each dimension +1 (from 0 to dimension). - Dart_handle mbeta[dimension+1]; + /// Neighboors for each dimension +1 (from 0 to dimension). + Dart_handle mf[dimension+1]; /// Values of Boolean marks. mutable std::bitset mmarks; diff --git a/Linear_cell_complex/include/CGAL/Linear_cell_complex_fwd.h b/Linear_cell_complex/include/CGAL/Linear_cell_complex_fwd.h index 9ee33103833..b130f582a65 100644 --- a/Linear_cell_complex/include/CGAL/Linear_cell_complex_fwd.h +++ b/Linear_cell_complex/include/CGAL/Linear_cell_complex_fwd.h @@ -26,6 +26,14 @@ template class GMap_linear_cell_complex_storage_1; +template // TODO add Concurrent_tag +class CMap_linear_cell_complex_storage_2; + +template // TODO add Concurrent_tag class Concurrent_tag=CGAL::Tag_false > +class GMap_linear_cell_complex_storage_2; + template struct LCC_default_kernel; @@ -67,6 +75,33 @@ template < unsigned int d_, unsigned int ambient_dim = d_, Alloc_, CGAL::Tag_false> > class Linear_cell_complex_for_generalized_map; + namespace Index + { + template < unsigned int d_, unsigned int ambient_dim = d_, + class Traits_ = Linear_cell_complex_traits, + class Items_ = Linear_cell_complex_min_items, + class Alloc_ = CGAL_ALLOCATOR(int), + template + class CMap = Combinatorial_map_base, + class Storage_ = CMap_linear_cell_complex_storage_2> + // TODO READD CGAL::Tag_false> > + class Linear_cell_complex_for_combinatorial_map; + + /* TODO GMap_linear_cell_complex_storage_2 + template < unsigned int d_, unsigned int ambient_dim = d_, + class Traits_ = Linear_cell_complex_traits, + class Items_ = Linear_cell_complex_min_items, + class Alloc_ = CGAL_ALLOCATOR(int), + template + class CMap = Generalized_map_base, + class Storage_ = GMap_linear_cell_complex_storage_2> + // TODO READD CGAL::Tag_false> > + class Linear_cell_complex_for_generalized_map; */ + } // namespace Index + } // CGAL #endif // LINEAR_CELL_COMPLEX_FWD_H diff --git a/Linear_cell_complex/include/CGAL/Linear_cell_complex_min_items.h b/Linear_cell_complex/include/CGAL/Linear_cell_complex_min_items.h index 37320ac326a..247556e37f6 100644 --- a/Linear_cell_complex/include/CGAL/Linear_cell_complex_min_items.h +++ b/Linear_cell_complex/include/CGAL/Linear_cell_complex_min_items.h @@ -40,7 +40,6 @@ namespace CGAL { namespace Index { - template struct Linear_cell_complex_min_items { /// Dart_wrapper defines the type of darts used.