From 09f82093a3eebb0dce91c080e1a7ed56307e1876 Mon Sep 17 00:00:00 2001 From: Guillaume Damiand Date: Wed, 10 May 2017 10:06:17 -0400 Subject: [PATCH] Update doc of BGL for LCC, following Sebastien comments. --- .../CGAL/Linear_cell_complex_bgl_min_items.h | 5 +-- ...complex_for_bgl_combinatorial_map_helper.h | 32 +++++++++++++++++++ BGL/doc/BGL/PackageDescription.txt | 3 ++ BGL/doc/BGL/dependencies | 2 ++ BGL/doc/BGL/graph_traits.txt | 20 +++++++----- ...omplex_for_bgl_combinatorial_map_helper.h} | 0 6 files changed, 52 insertions(+), 10 deletions(-) create mode 100644 BGL/doc/BGL/CGAL/Linear_cell_complex_for_bgl_combinatorial_map_helper.h rename Linear_cell_complex/include/CGAL/{Linear_cell_complex_for_bgl_combinatorial_map.h => Linear_cell_complex_for_bgl_combinatorial_map_helper.h} (100%) diff --git a/BGL/doc/BGL/CGAL/Linear_cell_complex_bgl_min_items.h b/BGL/doc/BGL/CGAL/Linear_cell_complex_bgl_min_items.h index 33487a94b90..5d5ef57680c 100644 --- a/BGL/doc/BGL/CGAL/Linear_cell_complex_bgl_min_items.h +++ b/BGL/doc/BGL/CGAL/Linear_cell_complex_bgl_min_items.h @@ -6,7 +6,7 @@ namespace CGAL { \cgalModifBegin -The class `Linear_cell_complex_bgl_min_items` defines `void` as the information associated with darts, and the attributes used. In this class, 0- and 2-attributes are enabled and have ids. +The class `Linear_cell_complex_bgl_min_items` defines `void` as the information associated with darts, darts have ids and 0- and 2-attributes are enabled and have ids. \cgalModels `LinearCellComplexItems` @@ -21,6 +21,7 @@ struct Linear_cell_complex_bgl_min_items template struct Dart_wrapper { + typedef CGAL::Tag_true Darts_with_id; typedef CGAL::Cell_attribute_with_point_and_id Vertex_attrib; typedef CGAL::Cell_attribute_with_id Face_attrib; typedef CGAL::cpp11::tuple Attributes; @@ -29,7 +30,7 @@ struct Linear_cell_complex_bgl_min_items \endcode -\sa `CGAL::Linear_cell_complex_for_generalized_map` +\sa `CGAL::Linear_cell_complex_min_item` \cgalModifEnd diff --git a/BGL/doc/BGL/CGAL/Linear_cell_complex_for_bgl_combinatorial_map_helper.h b/BGL/doc/BGL/CGAL/Linear_cell_complex_for_bgl_combinatorial_map_helper.h new file mode 100644 index 00000000000..93ebbb4d456 --- /dev/null +++ b/BGL/doc/BGL/CGAL/Linear_cell_complex_for_bgl_combinatorial_map_helper.h @@ -0,0 +1,32 @@ + +namespace CGAL { + +/*! +\ingroup PkgBGLHelper + +\cgalModifBegin + +The class `Linear_cell_complex_for_bgl_combinatorial_map_helper` defines a `CGAL::Linear_cell_complex_for_combinatorial_map` as inner type, named `type`, having 'CGAL::Linear_cell_complex_bgl_min_items` as items class. With this item class, no information are associated with darts, darts have ids and 0- and 2-attributes are enabled and have ids. + +\tparam d the dimension of the combinatorial map. +\tparam d2 the dimension of the ambient space. Equal to `d` by default. +\tparam LCCTraits be a model of the `LinearCellComplexTraits` concept, satisfying \link LinearCellComplexTraits::ambient_dimension `LCCTraits::ambient_dimension`\endlink`==d2`. Equal to `CGAL::Linear_cell_complex_traits` by default. +\tparam Alloc has to match the standard allocator requirements. Equal to `CGAL_ALLOCATOR(int)` by default. + +\sa `CGAL::Linear_cell_complex_bgl_min_item` +\sa `CGAL::Linear_cell_complex_for_combinatorial_map` + +\cgalModifEnd + +*/ +template< typename d, typename d2, typename LCCTraits, typename Alloc > +class Linear_cell_complex_for_bgl_combinatorial_map_helper { +public: + /// Type of the Linear_cell_complex_for_combinatorial_map. + typedef CGAL::Linear_cell_complex_for_combinatorial_map + type; + +}; /* end Linear_cell_complex_for_bgl_combinatorial_map_helper */ + +} /* end namespace CGAL */ diff --git a/BGL/doc/BGL/PackageDescription.txt b/BGL/doc/BGL/PackageDescription.txt index 61c319cac63..14a89eb4242 100644 --- a/BGL/doc/BGL/PackageDescription.txt +++ b/BGL/doc/BGL/PackageDescription.txt @@ -114,6 +114,7 @@ user might encounter. - \link BGLSMGT `boost::graph_traits< CGAL::Surface_mesh

>` \endlink - \link BGLPolyGT `boost::graph_traits< CGAL::Polyhedron_3 >` \endlink +- \link BGLLCCGT `boost::graph_traits< CGAL::Linear_cell_complex_for_combinatorial_map<...> >` \endlink - \link BGLT2GT `boost::graph_traits< CGAL::Triangulation_2 >` \endlink - \link BGLArgtGT `boost::graph_traits< CGAL::Arrangement_2 >` \endlink - \link BGLOMPAK `boost::graph_traits >` \endlink @@ -131,6 +132,8 @@ user might encounter. - `CGAL::Dual` - `CGAL::Graph_with_descriptor_with_graph` - `CGAL::Graph_with_descriptor_with_graph_property_map` +- `CGAL::Linear_cell_complex_bgl_min_items` +- `CGAL::Linear_cell_complex_for_bgl_combinatorial_map_helper` ## Helper Functions ## - `CGAL::is_border()` diff --git a/BGL/doc/BGL/dependencies b/BGL/doc/BGL/dependencies index 37c52a2a585..0946580e919 100644 --- a/BGL/doc/BGL/dependencies +++ b/BGL/doc/BGL/dependencies @@ -16,3 +16,5 @@ Property_map Nef_3 Miscellany Polygon_mesh_processing +Combinatorial_map +Linear_cell_complex \ No newline at end of file diff --git a/BGL/doc/BGL/graph_traits.txt b/BGL/doc/BGL/graph_traits.txt index 8c0b5db2a95..cac27830e37 100644 --- a/BGL/doc/BGL/graph_traits.txt +++ b/BGL/doc/BGL/graph_traits.txt @@ -86,7 +86,7 @@ that is the default hash functor of `CGAL::Unique_hash_map`. \cgalModifBegin -\section BGLLCCGT Specialization for the Linear Cell Complex Class +\section BGLLCCGT Specialization for the Linear_cell_complex_for_combinatorial_map Class Defined in `` @@ -125,19 +125,23 @@ For convenience, the type `edge_descriptor` is hashable using the functor `CGAL: \subsection Requirements

    -
  • The item class used by`CGAL::Linear_cell_complex_for_combinatorial_map` must have both 0-attributes and 2-attributes enabled; moreover the corresponding type of attributes must store an id and must define the two fonctions: -\code -int id() const; // Returns the index. -int& id(); // Returns a reference to the index stored in the attribute. -\endcode -
  • +
  • The item class used by `CGAL::Linear_cell_complex_for_combinatorial_map` must have both 0-attributes and 2-attributes enabled.
  • No dart is 1-free, nor 2-free. Holes in a mesh are represented by using the same convention than for `CGAL::Polyhedron_3` and `CGAL::Surface_mesh`: a dart d belongs to a border if the 2-attribute of beta<2>(d) is NULL.
  • All darts of the linear cell complexes must be associated with a 2-attribute, except darts that represent holes.
  • + +
  • In order to use property maps, darts and types associated with of 0- and 2-attributes must define the two fonctions: +\code +int id() const; // Returns the index. +int& id(); // Returns a reference to the index stored in the attribute. +\endcode
-Note that it is possible to use `CGAL::Cell_attribute_with_id` and `CGAL::Cell_attribute_with_point_and_id` classes to define your item class using attributes with id. Note also that there is a template alias, `CGAL::Linear_cell_complex_for_bgl_combinatorial_map` that defines the default template parameter for the item class that satisfies all the constraints given above. +For darts, this can is done by defining `Darts_with_id` as `CGAL::Tag_true` in the `Dart_wrapper` struct of the item class.
+For attributes, it is possible to use `CGAL::Cell_attribute_with_id` and `CGAL::Cell_attribute_with_point_and_id` classes to define your item class using attributes with id. + +You can also use the `CGAL::Linear_cell_complex_bgl_min_items` item class, or you can use directly the `CGAL::Linear_cell_complex_for_bgl_combinatorial_map_helper` class. \cgalModifEnd diff --git a/Linear_cell_complex/include/CGAL/Linear_cell_complex_for_bgl_combinatorial_map.h b/Linear_cell_complex/include/CGAL/Linear_cell_complex_for_bgl_combinatorial_map_helper.h similarity index 100% rename from Linear_cell_complex/include/CGAL/Linear_cell_complex_for_bgl_combinatorial_map.h rename to Linear_cell_complex/include/CGAL/Linear_cell_complex_for_bgl_combinatorial_map_helper.h