From bc1524f6abebe9fc14b63f2e31ad4df8eb737a22 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 30 Oct 2012 13:04:40 +0000 Subject: [PATCH] linking unlinking --- .../CGAL/HalfedgeDS_const_decorator.h | 11 +++-- .../HalfedgeDS/CGAL/HalfedgeDS_decorator.h | 2 +- .../CGAL/HalfedgeDS_items_decorator.h | 20 +++++----- .../HalfedgeDS/CGAL/HalfedgeDS_vertex_base.h | 40 +++++++++---------- .../CGAL/HalfedgeDS_vertex_min_base.h | 2 +- .../doc/HalfedgeDS/Concepts/HalfedgeDS.h | 34 ++++++++-------- .../doc/HalfedgeDS/Concepts/HalfedgeDSFace.h | 2 +- .../HalfedgeDS/Concepts/HalfedgeDSHalfedge.h | 13 +++--- .../doc/HalfedgeDS/Concepts/HalfedgeDSItems.h | 5 +-- .../HalfedgeDS/Concepts/HalfedgeDSVertex.h | 2 +- HalfedgeDS/doc/HalfedgeDS/HalfedgeDS.txt | 26 ++++++------ .../doc/Matrix_search/CGAL/Dynamic_matrix.h | 12 +++--- .../Sorted_matrix_search_traits_adaptor.h | 12 +++--- .../doc/Matrix_search/Matrix_search.txt | 6 +-- Miscellany/doc/Miscellany/Miscellany.txt | 8 ++-- .../doc/Modular_arithmetic/CGAL/Residue.h | 31 +++++++------- .../Concepts/ModularTraits--ModularImage.h | 2 +- .../Concepts/Modularizable.h | 4 +- .../Modular_arithmetic/Modular_arithmetic.txt | 18 ++++----- .../Concepts/SnapRoundingTraits_2.h | 6 +-- 20 files changed, 128 insertions(+), 128 deletions(-) diff --git a/HalfedgeDS/doc/HalfedgeDS/CGAL/HalfedgeDS_const_decorator.h b/HalfedgeDS/doc/HalfedgeDS/CGAL/HalfedgeDS_const_decorator.h index c23a9e65df1..671ff9a8e2d 100644 --- a/HalfedgeDS/doc/HalfedgeDS/CGAL/HalfedgeDS_const_decorator.h +++ b/HalfedgeDS/doc/HalfedgeDS/CGAL/HalfedgeDS_const_decorator.h @@ -24,6 +24,9 @@ actions. If a particular feature is not supported nothing is done. Note that for example the creation of new halfedges is mandatory for all halfedge data structures and will not appear here again. +\tparam HDS must be a model of `HalfedgeDS` + + ### Example ### The following program fragment illustrates the implementation of a @@ -83,8 +86,8 @@ unequal to their respective default construction value. For all halfedges `h`: The opposite halfedge is different from `h` and the opposite of the opposite is equal to `h`. The next of the previous halfedge is equal to `h`. For all vertices `v`: the incident vertex -of the incident halfedge of`v` is equal to`v`. The halfedges -around`v` starting with the incident halfedge of`v` form a cycle. +of the incident halfedge of `v` is equal to `v`. The halfedges +around `v` starting with the incident halfedge of `v` form a cycle. For all faces `f`: the incident face of the incident halfedge of `f` is equal to `f`. The halfedges around `f` starting with the incident halfedge of `f` form a cycle. Redundancies among internal variables @@ -106,7 +109,7 @@ be reached through the faces must be equal to the number of all halfedges, i.e., all halfedges surrounding a face must form a single cycle (no holes in faces).
Level 4
-All tests of level 3 and `normalized_border_is_valid`. +All tests of level 3 and `normalized_border_is_valid()`. */ /// @{ @@ -124,7 +127,7 @@ representation, which is when enumerating all halfedges with the halfedge iterator the following holds: The non-border edges precede the border edges. For border edges, the second halfedge is a border halfedge. (The first halfedge may or may not be a border halfedge.) The halfedge -iterator `border_halfedges_begin()` denotes the first border +iterator `HalfedgeDS::border_halfedges_begin()` denotes the first border edge. If `verbose` is `true`, statistics are written to `cerr`. */ diff --git a/HalfedgeDS/doc/HalfedgeDS/CGAL/HalfedgeDS_decorator.h b/HalfedgeDS/doc/HalfedgeDS/CGAL/HalfedgeDS_decorator.h index 38df8ce7f4d..57938dee4c2 100644 --- a/HalfedgeDS/doc/HalfedgeDS/CGAL/HalfedgeDS_decorator.h +++ b/HalfedgeDS/doc/HalfedgeDS/CGAL/HalfedgeDS_decorator.h @@ -178,7 +178,7 @@ face incident to `h` from `hds` and changes all halfedges incident to the face into border edges or removes them from the halfedge data structure if they were already border edges. If this creates isolated vertices they get removed as well. See -`make_hole(h)` for a more specialized variant. +`make_hole()` for a more specialized variant. \pre `h->is_border() == false`. \requires If faces are supported, `Supports_removal` \f$ \equiv\f$ `CGAL::Tag_true`. diff --git a/HalfedgeDS/doc/HalfedgeDS/CGAL/HalfedgeDS_items_decorator.h b/HalfedgeDS/doc/HalfedgeDS/CGAL/HalfedgeDS_items_decorator.h index 7b75e33cada..8d0c850f4c2 100644 --- a/HalfedgeDS/doc/HalfedgeDS/CGAL/HalfedgeDS_items_decorator.h +++ b/HalfedgeDS/doc/HalfedgeDS/CGAL/HalfedgeDS_items_decorator.h @@ -37,7 +37,7 @@ the implementation given here runs in time proportional to the size of the incident face. For const-correctness a second implementation with signature `Halfedge_const_handle prev() const;` is needed. -Note also the use of the static member function `halfedge_handle()` +Note also the use of the static member function `HalfedgeDS::halfedge_handle()` of the halfedge data structure. It converts a pointer to the halfedge into a halfedge handle. This conversion encapsulates possible adjustments for hidden data members in the true halfedge type, such as @@ -229,42 +229,42 @@ Halfedge_handle get_face_halfedge( Face_handle f); /// @{ /*! -makes `h->opposite()` the successor of `h`. +makes `h->%opposite()` the successor of `h`. */ void close_tip( Halfedge_handle h) const; /*! -makes `h->opposite()` the successor of `h` and sets the +makes `h->%opposite()` the successor of `h` and sets the incident vertex of `h` to `v`. */ void close_tip( Halfedge_handle h, Vertex_handle v) const; /*! inserts the tip of the edge `h` into the halfedges around the vertex -pointed to by `v`. Halfedge `h->opposite()` is the new successor of -`v` and `h->next()` will be set to `v->next()`. The vertex of `h` +pointed to by `v`. Halfedge `h->%opposite()` is the new successor of +`v` and `h->%next()` will be set to `v->next()`. The vertex of `h` will be set to the vertex `v` refers to if vertices are supported. */ void insert_tip( Halfedge_handle h, Halfedge_handle v) const; /*! -removes the edge `h->next()->opposite()` from the halfedge +removes the edge `h->%next()->%opposite()` from the halfedge circle around the vertex referred to by `h`. The new successor -halfedge of `h` will be `h->next()->opposite()->next()`. +halfedge of `h` will be `h->%next()->%opposite()->%next()`. */ void remove_tip( Halfedge_handle h) const; /*! -inserts the halfedge `h` between `f` and `f->next()`. +inserts the halfedge `h` between `f` and `f->%next()`. The face of `h` will be the one `f` refers to if faces are supported. */ void insert_halfedge( Halfedge_handle h, Halfedge_handle f) const; /*! -removes edge `h->next()` from the halfedge circle around +removes edge `h->%next()` from the halfedge circle around the face referred to by `h`. The new successor of `h` will be -`h->next()->next()`. +`h->%next()->%next()`. */ void remove_halfedge( Halfedge_handle h) const; diff --git a/HalfedgeDS/doc/HalfedgeDS/CGAL/HalfedgeDS_vertex_base.h b/HalfedgeDS/doc/HalfedgeDS/CGAL/HalfedgeDS_vertex_base.h index e3dfa4790d1..c8fa07ce542 100644 --- a/HalfedgeDS/doc/HalfedgeDS/CGAL/HalfedgeDS_vertex_base.h +++ b/HalfedgeDS/doc/HalfedgeDS/CGAL/HalfedgeDS_vertex_base.h @@ -10,30 +10,28 @@ defaults that allow to select various flavors of vertices. The declaration is best explained with the two following declarations, essentially hiding an implementation dependent default setting: -`template ` - - `class HalfedgeDS_vertex_base;` +`template ` +
+`class HalfedgeDS_vertex_base;` `template ` +
+`class HalfedgeDS_vertex_base;` - `class HalfedgeDS_vertex_base;` - -`HalfedgeDS_vertex_base` defines a vertex including a reference to an incident halfedge. - -`CGAL::HalfedgeDS_vertex_base` is a vertex -without a reference to an incident halfedge. It is empty besides the -required type definitions. It can be used for deriving own vertex -implementations. See also `CGAL::HalfedgeDS_vertex_min_base`. - -`CGAL::HalfedgeDS_vertex_base` is a vertex -with a reference to an incident halfedge and it stores a point of type -`Point`. It can be used as a vertex for a model of the -`PolyhedronItems_3` concept. - -`CGAL::HalfedgeDS_vertex_base` is a vertex -without a reference to an incident halfedge and it stores a point of -type `Point`. It can be used as a vertex for a model of the -`PolyhedronItems_3` concept. +Let us look at some instantiations +- `HalfedgeDS_vertex_base` defines a vertex including a reference to an incident halfedge. +- `HalfedgeDS_vertex_base` is a vertex + without a reference to an incident halfedge. It is empty besides the + required type definitions. It can be used for deriving own vertex + implementations. See also `CGAL::HalfedgeDS_vertex_min_base`. +- `HalfedgeDS_vertex_base` is a vertex + with a reference to an incident halfedge and it stores a point of type + `Point`. It can be used as a vertex for a model of the + `PolyhedronItems_3` concept. +- `HalfedgeDS_vertex_base` is a vertex + without a reference to an incident halfedge and it stores a point of + type `Point`. It can be used as a vertex for a model of the + `PolyhedronItems_3` concept. \models ::HalfedgeDSVertex diff --git a/HalfedgeDS/doc/HalfedgeDS/CGAL/HalfedgeDS_vertex_min_base.h b/HalfedgeDS/doc/HalfedgeDS/CGAL/HalfedgeDS_vertex_min_base.h index 3df1df6c644..54bf6adbfc0 100644 --- a/HalfedgeDS/doc/HalfedgeDS/CGAL/HalfedgeDS_vertex_min_base.h +++ b/HalfedgeDS/doc/HalfedgeDS/CGAL/HalfedgeDS_vertex_min_base.h @@ -5,7 +5,7 @@ namespace CGAL { The class `HalfedgeDS_vertex_min_base` is a model of the `HalfedgeDSVertex` concept. `Refs` is an instantiation of a `HalfedgeDS`. It is -equivalent to `CGAL::HalfedgeDS_vertex_base< Refs, CGAL::Tag_false>`. +equivalent to `HalfedgeDS_vertex_base< Refs, CGAL::Tag_false>`. It is empty besides the required type definitions. It can be used for deriving own vertices. diff --git a/HalfedgeDS/doc/HalfedgeDS/Concepts/HalfedgeDS.h b/HalfedgeDS/doc/HalfedgeDS/Concepts/HalfedgeDS.h index a41773dcb3d..6e90e09f47c 100644 --- a/HalfedgeDS/doc/HalfedgeDS/Concepts/HalfedgeDS.h +++ b/HalfedgeDS/doc/HalfedgeDS/Concepts/HalfedgeDS.h @@ -33,7 +33,7 @@ for the incidences, the mandatory and optional member functions possible for vertices, halfedges, and faces. \anchor figureOptionalMethods -\image html hds_optional_small.gif "The three classes `Vertex`, `Halfedge`, and `Face` of the halfedge data structure. Member functions with shaded background are mandatory. The others are optionally supported." +\image html hds_optional_small.gif "The three classes Vertex, Halfedge, and Face of the halfedge data structure. Member functions with shaded background are mandatory. The others are optionally supported." A `HalfedgeDS` organizes the internal storage of its items. Examples are a list-based or a vector-based storage. The `HalfedgeDS` exhibits @@ -325,8 +325,10 @@ operator=( const HalfedgeDS& hds2); /*! reserves storage for `v` vertices, `h` halfedges, and `f` faces. If all capacities are already greater or equal than the requested sizes -nothing happens. Otherwise, `hds` will be resized and all handles, -iterators and circulators invalidate. \pre If resizing is necessary `hds` contains no dangling handles. +nothing happens. Otherwise, the halfedge data structure will be resized and all handles, +iterators and circulators are invalid. + +\pre If resizing is necessary the halfedge data structure contains no dangling handles. */ void reserve( size_type v, size_type h, size_type f); @@ -366,12 +368,12 @@ space reserved for faces. Size capacity_of_faces() const; /*! -bytes used for `hds`. +bytes used for the halfedge data structure. */ size_t bytes() const; /*! -bytes reserved for `hds`. +bytes reserved for the halfedge data structure. */ size_t bytes_reserved() const; @@ -420,26 +422,26 @@ faces respectively. /// @{ /*! -appends a copy of `v` to `hds`. Returns a handle of the new vertex. +appends a copy of `v` to the halfedge data structure. Returns a handle of the new vertex. */ Vertex_handle vertices_push_back( const Vertex& v); /*! -appends a copy of `h` and a copy of `g` to `hds` and makes them +appends a copy of `h` and a copy of `g` to the halfedge data structure and makes them opposite to each other. Returns a handle of the copy of `h`. */ Halfedge_handle edges_push_back( const Halfedge& h, const Halfedge& g); /*! -appends a copy of `h` and a copy of `h->opposite()` to `hds` and -makes them opposite to each other. Returns a handle of the copy of `h`. -\pre `h->opposite()` denotes a halfedge. +appends a copy of `h` and a copy of \link HalfedgeDSHalfedge::opposite() `h->opposite()`\endlink +to the halfedge data structure and makes them opposite to each other. Returns a handle of the copy of `h`. +\pre \link HalfedgeDSHalfedge::opposite() `h->opposite()`\endlink denotes a halfedge. */ Halfedge_handle edges_push_back( const Halfedge& h); /*! -appends a copy of `f` to `hds`. Returns a handle of the new face. +appends a copy of `f` to the halfedge data structure. Returns a handle of the new face. */ Face_handle faces_push_back( const Face& f); @@ -447,9 +449,9 @@ Face_handle faces_push_back( const Face& f); /*! \name Removal Erasing single elements is optional and indicated with the type tag -`Supports_removal`. The `pop_back` and the `clear` member +`Supports_removal`. The three `pop_back()` and the `clear()` member functions are mandatory. If vertices or faces are not supported -for a `HalfedgeDS` the `pop_back` and the `clear` member +for a `HalfedgeDS` the three `pop_back()` and the `clear()` member functions must be provided as null operations. */ /// @{ @@ -496,7 +498,7 @@ void edges_pop_back(); /*! -removes the pair of halfedges `h` and `h->opposite()` +removes the pair of halfedges `h` and \link HalfedgeDSHalfedge::opposite() `h->opposite()`\endlink if `Supports_removal` \f$ \equiv\f$ `CGAL::Tag_true`. */ void edges_erase( Halfedge_handle h); @@ -565,11 +567,11 @@ incident to an open region are called border halfedges. A halfedge is a border edge if the halfedge itself or its opposite halfedge is a border halfedge. The only requirement to work with border halfedges is that the -`Halfedge` class provides a member function `is_border()` +`Halfedge` class provides a member function `HalfedgeDSHalfedge::is_border()` returning a `bool`. Usually, the halfedge data structure supports faces and the value of the default constructor of the face handle will indicate a border halfedge, but this may not be the only -possibility. The `is_border()` predicate divides the edges into +possibility. The `HalfedgeDSHalfedge::is_border()` predicate divides the edges into two classes, the border edges and the non-border edges. The following normalization reorganizes the sequential storage of the edges such that the non-border edges precede the border edges, and diff --git a/HalfedgeDS/doc/HalfedgeDS/Concepts/HalfedgeDSFace.h b/HalfedgeDS/doc/HalfedgeDS/Concepts/HalfedgeDSFace.h index 08e41d063c5..74f6bd15e54 100644 --- a/HalfedgeDS/doc/HalfedgeDS/Concepts/HalfedgeDSFace.h +++ b/HalfedgeDS/doc/HalfedgeDS/Concepts/HalfedgeDSFace.h @@ -115,7 +115,7 @@ Halfedge_handle halfedge(); /*! -incident halfedge that points to `f`. +incident halfedge that points to the face. */ Halfedge_const_handle halfedge() const; diff --git a/HalfedgeDS/doc/HalfedgeDS/Concepts/HalfedgeDSHalfedge.h b/HalfedgeDS/doc/HalfedgeDS/Concepts/HalfedgeDSHalfedge.h index c1253817fef..aadaf69a399 100644 --- a/HalfedgeDS/doc/HalfedgeDS/Concepts/HalfedgeDSHalfedge.h +++ b/HalfedgeDS/doc/HalfedgeDS/Concepts/HalfedgeDSHalfedge.h @@ -21,7 +21,7 @@ depicts the relationship between a halfedge and its incident halfedges, vertices, and faces. \anchor figureHalfedgeDSOptionalMethods -\image html hds_optional.gif "The three classes `Vertex`, `Halfedge`, and `Face` of the halfedge data structure. Member functions with shaded background are mandatory. The others are optionally supported." +\image html hds_optional.gif "The three classes Vertex, Halfedge, and Face of the halfedge data structure. Member functions with shaded background are mandatory. The others are optionally supported." For the protection of the integrity of the data structure classes such as `CGAL::Polyhedron_3` are allowed to redefine the modifying member @@ -104,18 +104,17 @@ typedef Hidden_type Halfedge_const_handle; typedef Hidden_type Face_const_handle; /*! -`CGAL::Tag_true` or -`CGAL::Tag_false`. +\link CGAL::Tag_true `CGAL::Tag_true`\endlink or \link CGAL::Tag_false `CGAL::Tag_false`\endlink. */ typedef Hidden_type Supports_halfedge_prev; /*! -~ +\link CGAL::Tag_true `CGAL::Tag_true`\endlink or \link CGAL::Tag_false `CGAL::Tag_false`\endlink. */ typedef Hidden_type Supports_halfedge_vertex; /*! -~ +\link CGAL::Tag_true `CGAL::Tag_true`\endlink or \link CGAL::Tag_false `CGAL::Tag_false`\endlink. */ typedef Hidden_type Supports_halfedge_face; @@ -167,7 +166,7 @@ sets next halfedge to `h`. void set_next( Halfedge_handle h); /*! -is true if `h` is a border halfedge. +is true if the halfedge is a border halfedge. */ bool is_border() const; @@ -222,7 +221,7 @@ void set_vertex( Vertex_handle v); Face_handle face(); /*! -the incident face of `h`. If `h` is a border halfedge +the incident face of the halfedge. If the halfedge is a border halfedge the result is default construction of the handle. */ Face_const_handle face() const; diff --git a/HalfedgeDS/doc/HalfedgeDS/Concepts/HalfedgeDSItems.h b/HalfedgeDS/doc/HalfedgeDS/Concepts/HalfedgeDSItems.h index 6b4e53780a9..222bf01a9e2 100644 --- a/HalfedgeDS/doc/HalfedgeDS/Concepts/HalfedgeDSItems.h +++ b/HalfedgeDS/doc/HalfedgeDS/Concepts/HalfedgeDSItems.h @@ -13,9 +13,8 @@ uses the halfedge data structure as internal representation. `Traits` is not used by the halfedge data structure itself. These three member class templates provide a local type named `Vertex`, `Halfedge`, and `Face` respectively. The requirements on these -types are described on page \ref HalfedgeDSVertex, -page \ref HalfedgeDSHalfedge, and -page \ref HalfedgeDSFace respectively. +types are described on the manual pages of the concepts `HalfedgeDSVertex`, +`HalfedgeDSHalfedge`, and `HalfedgeDSFace` respectively. \hasModel CGAL::HalfedgeDS_min_items \hasModel CGAL::HalfedgeDS_items_2 diff --git a/HalfedgeDS/doc/HalfedgeDS/Concepts/HalfedgeDSVertex.h b/HalfedgeDS/doc/HalfedgeDS/Concepts/HalfedgeDSVertex.h index 2ae80e8e8bf..cad531d0a59 100644 --- a/HalfedgeDS/doc/HalfedgeDS/Concepts/HalfedgeDSVertex.h +++ b/HalfedgeDS/doc/HalfedgeDS/Concepts/HalfedgeDSVertex.h @@ -114,7 +114,7 @@ Vertex(); Halfedge_handle halfedge(); /*! -incident halfedge that points to `v`. +incident halfedge that points to the vertex. */ Halfedge_const_handle halfedge() const; /*! diff --git a/HalfedgeDS/doc/HalfedgeDS/HalfedgeDS.txt b/HalfedgeDS/doc/HalfedgeDS/HalfedgeDS.txt index 12595e5723c..613c322bf9e 100644 --- a/HalfedgeDS/doc/HalfedgeDS/HalfedgeDS.txt +++ b/HalfedgeDS/doc/HalfedgeDS/HalfedgeDS.txt @@ -29,7 +29,7 @@ geometric interpretation is added by classes built on top of the halfedge data structure. These classes might be more convenient to use than the halfedge data structure directly, since the halfedge data structure is meant as an implementation layer. See for example the -`CGAL::Polyhedron_3` class in Chapter \ref chapterPolyhedron. +`Polyhedron_3` class in Chapter \ref chapterPolyhedron "Polyhedral Surface". The data structure provided here is also known as the FE-structure \cite w-ebdss-85, as @@ -50,7 +50,7 @@ releases. Files and identifier names are disjoint with the old design which allows for both versions to co-exists. However, classes using a halfedge data structure can only use one design. For example the polyhedral surface `Polyhedron_3` uses by default the new -design. See Chapter \ref chapterPolyhedron for how to still select +design. See Chapter \ref chapterPolyhedron "Polyhedral Surface" for how to still select the old implementation. # Software Design # {#HalfedgeDSSoftware} @@ -61,7 +61,7 @@ the old implementation. Figure \ref figureHalfedgeDSDesign illustrates the responsibilities of the three layers of the software -design, with the `CGAL::Polyhedron_3` as an example for the top +design, with the `Polyhedron_3` as an example for the top layer. The items provide the space for the information that is actually stored, i.e., with member variables and access member functions in `Vertex`, `Halfedge`, and `Face` @@ -85,7 +85,7 @@ also provided to serve as defaults; for polyhedra they provide all optional incidences, a three-dimensional point in the vertex type and a plane equation in the face type. -The `Halfedge_data_structure`, concept `HalfedgeDS`, is +The Halfedge data structure concept `HalfedgeDS`, is responsible for the storage organization of the items. Currently, implementations using internally a bidirectional list or a vector are provided. The `HalfedgeDS` defines the handles and iterators @@ -109,11 +109,11 @@ example, the polyhedron. They add, for example, the Euler operations and partial operations from which further Euler operations can be built, such as inserting an edge into the ring of edges at a vertex. Furthermore, the helper classes contain adaptive -functionality. For example, if the `prev()` member function is not -provided for halfedges, the `find_prev()` member function of a helper +functionality. For example, if the `HalfedgeDSHalfedge::prev()` member function is not +provided for halfedges, the `HalfedgeDS_items_decorator::find_prev()` member function of a helper class searches in the positive direction along the face for the -previous halfedge. But if the `prev()` member function is provided, -the `find_prev()` member function simply calls it. This distinction is +previous halfedge. But if the `HalfedgeDSHalfedge::prev()` member function is provided, +the `HalfedgeDS_items_decorator::find_prev()` member function simply calls it. This distinction is resolved at compile time with a technique called compile-time tags, similar to iterator tags in \cite cgal:sl-stl-95. @@ -137,7 +137,7 @@ design. \anchor sectionHdsExamples -## The Default Halfedge Data Structure ## +## The %Default Halfedge Data Structure ## The following example program uses the default halfedge data structure and the decorator class. The default halfedge data structure uses a @@ -153,7 +153,7 @@ of two halfedges, one vertex and two faces, and checks its validity. ## A Minimal Halfedge Data Structure ## The following program defines a minimal halfedge data structure using -the minimal items class `CGAL::HalfedgeDS_min_items` and a +the minimal items class `HalfedgeDS_min_items` and a list-based halfedge data structure. The result is a data structure maintaining only halfedges with next and opposite pointers. No vertices or faces are stored. The data structure represents an undirected graph. @@ -174,7 +174,7 @@ in a consistent, i.e., valid, state. \cgalexample{HalfedgeDS/hds_prog_vector.cpp} -## Example Adding Color to Faces ## +## Example Adding %Color to Faces ## This example re-uses the base class available for faces and adds a member variable `color`. @@ -203,9 +203,9 @@ store this bit as the least significant bit in the next halfedge handle. Furthermore, we do not implement a pointer to the previous halfedge. What remains are three pointers per halfedge. -\advanced We use the static member function `halfedge_handle()` to convert +\advanced We use the static member function `HalfedgeDS::halfedge_handle()` to convert from pointers to halfedge handles. The same solution can be applied to -the list-based halfedge data structure `CGAL::HalfedgeDS_list`, +the list-based halfedge data structure `HalfedgeDS_list`, see examples/HalfedgeDS/hds_prog_compact2.cpp. Here is the example for the vector-based data structure. diff --git a/Matrix_search/doc/Matrix_search/CGAL/Dynamic_matrix.h b/Matrix_search/doc/Matrix_search/CGAL/Dynamic_matrix.h index d9a74dc0aa3..96c8ebc7a18 100644 --- a/Matrix_search/doc/Matrix_search/CGAL/Dynamic_matrix.h +++ b/Matrix_search/doc/Matrix_search/CGAL/Dynamic_matrix.h @@ -20,7 +20,7 @@ matrix search. ### Implementation ### All operations take constant time except for -`extract_all_even_rows` which needs time linear in the number +`extract_all_even_rows()` which needs time linear in the number of rows. */ @@ -33,7 +33,7 @@ public: /*! initializes -`d` to `m`. `m` is not copied, we only +the dynamic matrix to `m`. `m` is not copied, we only store a reference. */ Dynamic_matrix( const M& m); @@ -69,15 +69,15 @@ void replace_column( int old, int new); /*! returns -a new matrix consisting of all rows of `d` with even index, -(i.e.\ first row is row \f$ 0\f$ of `d`, second row is row \f$ 2\f$ of -`d` etc.). \pre `number_of_rows()` \f$ > 0\f$. +a new matrix consisting of all rows of the dynmic matrix with even index, +(i.e.\ first row is row \f$ 0\f$ of the dynamic matrix, second row is row \f$ 2\f$ of +the dynamic matrix, etc.). \pre `number_of_rows()` \f$ > 0\f$. */ Matrix* extract_all_even_rows() const; /*! deletes the -rightmost columns, such that `d` becomes quadratic. +rightmost columns, such that the dynamic matrix becomes quadratic. \pre `number_of_columns()` \f$ \ge\f$ `number_of_rows()`. \post `number_of_rows()` \f$ ==\f$ `number_of_columns()`. */ void shrink_to_quadratic_size(); diff --git a/Matrix_search/doc/Matrix_search/CGAL/Sorted_matrix_search_traits_adaptor.h b/Matrix_search/doc/Matrix_search/CGAL/Sorted_matrix_search_traits_adaptor.h index 0d01ef1970a..7c2a3fa94b6 100644 --- a/Matrix_search/doc/Matrix_search/CGAL/Sorted_matrix_search_traits_adaptor.h +++ b/Matrix_search/doc/Matrix_search/CGAL/Sorted_matrix_search_traits_adaptor.h @@ -10,8 +10,8 @@ arbitrary feasibility test and matrix classes `F` resp.\ `M`. \models ::SortedMatrixSearchTraits -\tparam `M` must be a model for `BasicMatrix` -\tparam `F` must define a copy constructor and a monotone `bool operator()( const Value&)`. +\tparam M must be a model for `BasicMatrix` +\tparam F must define a copy constructor and a monotone `bool operator()( const Value&)`. */ template< typename F, typename M > @@ -36,24 +36,24 @@ m); /*! typedef to `M`. */ -typedef Hidden_type Matrix; +typedef M Matrix; /*! typedef to `Matrix::Value`. */ -typedef Hidden_type Value; +typedef Matrix::Value Value; /*! typedef to `std::less`. */ -typedef Hidden_type Compare_strictly; +typedef std::less Compare_strictly; /*! typedef to `std::less_equal`. */ -typedef Hidden_type Compare_non_strictly; +typedef std::less_equal Compare_non_strictly; /// @} diff --git a/Matrix_search/doc/Matrix_search/Matrix_search.txt b/Matrix_search/doc/Matrix_search/Matrix_search.txt index d218a398793..1a4b92a89c0 100644 --- a/Matrix_search/doc/Matrix_search/Matrix_search.txt +++ b/Matrix_search/doc/Matrix_search/Matrix_search.txt @@ -7,7 +7,7 @@ namespace CGAL { \author Michael Hoffmann -`CGAL::monotone_matrix_search` and `CGAL::sorted_matrix_search` +`monotone_matrix_search()` and `sorted_matrix_search()` are techniques that deal with the problem of efficiently finding largest entries in matrices with certain structural properties. Many concrete problems can be modelled as matrix search problems, and for @@ -21,10 +21,10 @@ computing rectangular \f$ p\f$-centers. In the following program we build a random vector \f$ a = (a_i)_{i = 1,\,\ldots,\,5}\f$ (elements drawn uniformly from \f$ \{ -0,\,\ldots,\,99 \}\f$) and construct a Cartesian matrix \f$ M\f$ +0,\,\ldots,\,99 \}\f$) and construct a %Cartesian matrix \f$ M\f$ containing as elements all sums \f$ a_i + a_j,\: i,\,j \in \{1,\,\ldots,\,5\}\f$. If \f$ a\f$ is sorted, \f$ M\f$ is sorted as well. So -we can apply `sorted_matrix_search` to compute the upper bound +we can apply `sorted_matrix_search()` to compute the upper bound for the maximal entry of \f$ a\f$ in \f$ M\f$. \cgalexample{Matrix_search/sorted_matrix_search.cpp} diff --git a/Miscellany/doc/Miscellany/Miscellany.txt b/Miscellany/doc/Miscellany/Miscellany.txt index 5bab2ab1f73..16a6ba80b41 100644 --- a/Miscellany/doc/Miscellany/Miscellany.txt +++ b/Miscellany/doc/Miscellany/Miscellany.txt @@ -12,8 +12,8 @@ namespace CGAL { # Timers # {#MiscellanyTimers} \cgal provides classes for measuring the user process time and the real time. -The class `CGAL::Timer` is the version for the user process time and -the class `CGAL::Real_timer` is the version for the real time. +The class `Timer` is the version for the user process time and +the class `Real_timer` is the version for the real time. Instantiations of both classes are objects with a state. The state is either running or it is stopped. The state of an object @@ -29,7 +29,7 @@ first interval. # Memory Size # {#MiscellanyMemory} \cgal provides access to the memory size used by the program with the -`CGAL::Memory_sizer` class. Both the virtual memory size and the +`Memory_sizer` class. Both the virtual memory size and the resident size are available (the resident size does not account for swapped out memory nor for the memory which is not yet paged-in). @@ -37,7 +37,7 @@ swapped out memory nor for the memory which is not yet paged-in). \cgal provides a way to count the number of times a given line of code is executed during the execution of a program. Such -`CGAL::Profile_counter` counters can be added at critical place in the +`Profile_counter` counters can be added at critical place in the code, and at the end of the execution of a program, the count is printed on `std::cerr`. A macro `CGAL_PROFILER` can be used to conveniently place these counters anywhere. They are disabled by default and activated by the diff --git a/Modular_arithmetic/doc/Modular_arithmetic/CGAL/Residue.h b/Modular_arithmetic/doc/Modular_arithmetic/CGAL/Residue.h index a60e5d4a5e8..ae6f9736ef8 100644 --- a/Modular_arithmetic/doc/Modular_arithmetic/CGAL/Residue.h +++ b/Modular_arithmetic/doc/Modular_arithmetic/CGAL/Residue.h @@ -3,28 +3,28 @@ namespace CGAL { /*! \ingroup PkgModularArithmetic - \anchor Residue -The class `Residue` represents a finite field \f$ \Z{/p\Z}\f$, +\brief The class `Residue` represents a finite field \f$ \Z{/p\Z}\f$, for some prime number \f$ p\f$. The prime number \f$ p\f$ is stored in a static member variable. The class provides static member functions to change this value. -Note that changing the prime invalidates already existing objects -of this type. However, already existing objects do not lose their value with respect to the old prime and can be reused after restoring the old prime. Since the type is based on double arithmetic the prime is restricted to values less than \f$ 2^{26}\f$. The initial value of \f$ p\f$ is 67111067. -Please note that the implementation of class `CGAL::Residue` requires a mantissa +\attention Note that changing the prime invalidates already existing objects +of this type. + +Please note that the implementation of class `Residue` requires a mantissa precision according to the IEEE Standard for Floating-Point Arithmetic (IEEE 754). However, on some processors the traditional FPU uses an extended precision. Hence, it is indispensable that the proper mantissa length is enforced before performing any arithmetic operations. Moreover, it is required that numbers are rounded to the -next nearest value. This can be ensured using `CGAL::Protect_FPU_rounding` with +next nearest value. This can be ensured using `Protect_FPU_rounding` with `CGAL_FE_TONEAREST`, which also enforces the required precision as a side effect. In case the flag `CGAL_HAS_THREADS` @@ -33,8 +33,9 @@ of the class, that is, `Residue` is not thread-safe in this case. In case `CGAL_HAS_THREADS` the implementation of the class is thread safe using `boost::thread_specific_ptr`. However, this may cause some performance -penalty. Hence, it may be advisable to configure `CGAL` with -`CGAL_HAS_NO_THREADS`. +penalty. Hence, it may be advisable to configure %CGAL with +`CGAL_HAS_NO_THREADS`. See Section \ref Preliminaries_thread_safety "Thread Safety" +in the preliminaries. \models ::Field @@ -47,22 +48,22 @@ public: /// @{ /*! -introduces a variable `x`, which is initialized with zero; +introduces a variable `x`, which is initialized with zero. */ Residue(); /*! -copy constructor; +copy constructor. */ Residue(const Residue& m); /*! -introduces a variable `x`, which is initialized with \f$ i \% p\f$; +introduces a variable `x`, which is initialized with \f$ i \mod p\f$. */ Residue(int i); /*! -introduces a variable `x`, which is initialized with \f$ i \% p\f$; +introduces a variable `x`, which is initialized with \f$ i \mod p\f$. */ Residue(long i); @@ -73,9 +74,7 @@ Residue(long i); /*! -Static member function; - -sets current prime to the given value and returns the old prime. +Static member function which sets the current prime to the given value and returns the old prime. */ static int set_current_prime(int p); @@ -90,7 +89,7 @@ static int get_current_prime(); /*! -Returns the unique representative of `x`within the range +Returns the unique representative of `x` within the range \f$ [-p/2,p/2]\f$, where \f$ p\f$ is the current prime. */ diff --git a/Modular_arithmetic/doc/Modular_arithmetic/Concepts/ModularTraits--ModularImage.h b/Modular_arithmetic/doc/Modular_arithmetic/Concepts/ModularTraits--ModularImage.h index 80baba358c2..d9fbcb93707 100644 --- a/Modular_arithmetic/doc/Modular_arithmetic/Concepts/ModularTraits--ModularImage.h +++ b/Modular_arithmetic/doc/Modular_arithmetic/Concepts/ModularTraits--ModularImage.h @@ -8,7 +8,7 @@ with respect to a homomorphism \f$ \varphi\f$ from the `ModularTraits::Type` into the `ModularTraits::Residue_type`. The homomorphism preserves the mapping of `int` into both types -, i.e., \f$ \varphi(Type(i)) == Residue\_type(i)\f$. +, i.e., \f$ \varphi(\mathrm{Type}(i)) == \mathrm{Residue\_type}(i)\f$. \refines `AdaptableUnaryFunction` diff --git a/Modular_arithmetic/doc/Modular_arithmetic/Concepts/Modularizable.h b/Modular_arithmetic/doc/Modular_arithmetic/Concepts/Modularizable.h index 48e868eb01c..d5b32dbd89b 100644 --- a/Modular_arithmetic/doc/Modular_arithmetic/Concepts/Modularizable.h +++ b/Modular_arithmetic/doc/Modular_arithmetic/Concepts/Modularizable.h @@ -20,9 +20,9 @@ which can not be represented. \hasModel `int` \hasModel `long` -\hasModel `CORE::BigInt` +\hasModel `CGAL::CORE::BigInt` \hasModel `CGAL::Gmpz` -\hasModel `leda::integer` +\hasModel `leda_integer` \hasModel `mpz_class` The following types are `Modularizable` iff their template arguments are. diff --git a/Modular_arithmetic/doc/Modular_arithmetic/Modular_arithmetic.txt b/Modular_arithmetic/doc/Modular_arithmetic/Modular_arithmetic.txt index fe9898af730..f3d46d62e80 100644 --- a/Modular_arithmetic/doc/Modular_arithmetic/Modular_arithmetic.txt +++ b/Modular_arithmetic/doc/Modular_arithmetic/Modular_arithmetic.txt @@ -19,7 +19,7 @@ correspondent with respect to one prime only. # Residue and Modularizable # {#Modular_arithmetic_residue} -First of all, this package introduces a type `CGAL::Residue`. +First of all, this package introduces a type `Residue`. It represents \f$ \Z_{/p\Z}\f$ for some prime \f$ p\f$. The prime number \f$ p\f$ is stored in a static member variable. The class provides static member functions to change this value. @@ -36,15 +36,15 @@ The initial value of \f$ p\f$ is 67111067. Moreover, the package introduces the concept `Modularizable`. An algebraic structure `T` is considered as `Modularizable` if there is a mapping from `T` into an algebraic structure that is based on -the type `CGAL::Residue`. +the type `Residue`. For scalar types, e.g. Integers, this mapping is just the canonical -homomorphism into \f$ \Z_{/p\Z}\f$ represented by `CGAL::Residue`. +homomorphism into \f$ \Z_{/p\Z}\f$ represented by `Residue`. For compound types, e.g. Polynomials, the mapping is applied to the coefficients of the compound type. -The mapping is provided by the class `CGAL::Modular_traits`. -The class `CGAL::Modular_traits` is designed such that the concept +The mapping is provided by the class `Modular_traits`. +The class `Modular_traits` is designed such that the concept `Modularizable` can be considered as optional, i.e., -`CGAL::Modular_traits` provides a tag that can be used for dispatching. +`Modular_traits` provides a tag that can be used for dispatching. ## Example ## {#Modular_arithmetic_example} @@ -63,12 +63,12 @@ that the coefficient type is `Modularizable` and that it is not. If the type is not `Modularizable` the filter is just not applied and the function returns true. -Further note that the implementation of class `CGAL::Residue` requires a mantissa +Further note that the implementation of class `Residue` requires a mantissa precision according to the IEEE Standard for Floating-Point Arithmetic (IEEE 754). However, on some processors the traditional FPU uses an extended precision. Hence, it is indispensable that the proper mantissa length is enforced before performing any arithmetic operations. Moreover, it is required that numbers are rounded to the -next nearest value. This can be ensured using `CGAL::Protect_FPU_rounding` with +next nearest value. This can be ensured using `Protect_FPU_rounding` with `CGAL_FE_TONEAREST`, which also enforces the required precision as a side effect. @@ -76,7 +76,7 @@ next nearest value. This can be ensured using `CGAL::Protect_FPU_rounding` with # Design and Implementation History # {#Modular_arithmeticDesign} -The class `CGAL::Residue` is based on the C-code of Sylvain Pion et. al. +The class `Residue` is based on the C-code of Sylvain Pion et. al. as it was presented in \cite bepp-sdrns-99. The remaining part of the package is the result of the integration process diff --git a/Snap_rounding_2/doc/Snap_rounding_2/Concepts/SnapRoundingTraits_2.h b/Snap_rounding_2/doc/Snap_rounding_2/Concepts/SnapRoundingTraits_2.h index 9a7606d82b7..ed44ffe8a4d 100644 --- a/Snap_rounding_2/doc/Snap_rounding_2/Concepts/SnapRoundingTraits_2.h +++ b/Snap_rounding_2/doc/Snap_rounding_2/Concepts/SnapRoundingTraits_2.h @@ -5,7 +5,7 @@ The concept `SnapRoundingTraits_2` lists the set of requirements that must be fulfilled by an instance of the `Traits` template-parameter of -the function \ref CGAL::snap_rounding_2 "CGAL::snap_rounding_2()". +the function \ref CGAL::snap_rounding_2() "CGAL::snap_rounding_2()". This concept provides the types of the geometric primitives used in this class and some function object types for the required predicates on those primitives. @@ -14,9 +14,9 @@ predicates on those primitives. \refines `Assignable` \refines `CopyConstructible` \refines `SweepLineTraits_2` -\refines An instance of this concept is used as the traits class for the `CGAL::Sweep_line_2::get_intersection_points()` operation. The requirements listed below are induced by components of the `CGAL::snap_rounding_2` function other than the call to `CGAL::Sweep_line_2::get_intersection_points()`. Naturally, some of them may already be listed in `SweepLineTraits_2`. +\refines An instance of this concept is used as the traits class for the `CGAL::Sweep_line_2::get_intersection_points()` operation. The requirements listed below are induced by components of the `CGAL::snap_rounding_2()` function other than the call to `Sweep_line_2::get_intersection_points()`. Naturally, some of them may already be listed in `SweepLineTraits_2`. -\hasModel `CGAL::Snap_rounding_traits` +\hasModel `CGAL::Snap_rounding_traits_2` \sa `CGAL::Snap_rounding_2`