Boost logo

Boost-Commit :

From: hervebronnimann_at_[hidden]
Date: 2007-06-26 02:06:54


Author: hervebronnimann
Date: 2007-06-26 02:06:52 EDT (Tue, 26 Jun 2007)
New Revision: 7163
URL: http://svn.boost.org/trac/boost/changeset/7163

Log:
Review pass. Here is my email:

I went to look at the Boost.graph library, and found out that they define
source(e, g) for the IncidenceGraph concept. Oops. We should follow the same
convention and have the hds as *second* argument as well.
I modified all the concepts.

Finally, thou shall write 50 times "I will never use #include "...", always
with <...> form." In order to make #include <boost/hdstl/hds_traits.hpp> work,
I created a boost subdirectory with a symlink named hdstl pointing to ../../.
I was sad that hds_traits.hpp did not have any documentation! Please add some.

Then I fixed the test driver (it compiles with the command line:
    g++ -W -Wall -pedantic -I$BOOST -I. -o hds_concept.t hds_concept.t.cpp
).

Next I added the support_vertices and support_facets to the hds_traits<HDS> in
the HDS concept. If they are not supported, they still need to be defined (and
equal to false).

In fact, they define a single MutableGraph concept with many concept-checking
classes. I think that's confusing, so I prefer to keep it the way we do it.

I performed a cleanup pass on all the concepts. I removed the set_opposite(h1,
h2): what could it possibly mean? Half-edges are created in pair, what would
the opposite h3 of h1 point to after h1 is set to be opposite to h2? Such a
function would violate the basic invariant that opposite(opposite(h3)) == h3
(it would then be equal to h2).

For vertex, you are inconsistent: the next_at_target_tag etc. in the
ForwardHDS concept does not have a single next(h, hds) function whose meaning
changes wrt the tag... So I don't think there should be a vertex(h, hds)
function that returns either the source or the target! You should have two
functions, source(h, hds) and target(h, hds) which always return the proper
vertex. Note that there is no need for a tag here, since target(h) =
source(opposite(h)). In fact, this should be an invariant.

I corrected a few things here and there (hopefully didn't miss too much, but
careful at defining hds member with types that are not 'HDS'; e.g., there is
no FacetListHDS type, not even as a template parameter -- the type is called
HDS, simply).

Added:
   sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/boost/
   sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/boost/hdstl (contents, props changed)
Text files modified:
   sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/backward_hds_concept.hpp | 47 +++++++++--------
   sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/bidirectional_hds_concept.hpp | 38 +++++++-------
   sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/facet_hds_concept.hpp | 61 ++++++++++++-----------
   sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/facet_list_hds_concept.hpp | 82 +++++++++++++++++-------------
   sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/forward_hds_concept.hpp | 103 +++++++++++++++++++++------------------
   sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/halfedge_list_hds_concept.hpp | 78 +++++++++++++++--------------
   sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/hds_concept.hpp | 66 ++++++++++++++-----------
   sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/hds_concept.t.cpp | 72 ++++++++++++++-------------
   sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/mutable_backward_hds_concept.hpp | 37 ++++++--------
   sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/mutable_bidirectional_hds_concept.hpp | 43 +++++++---------
   sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/mutable_facet_hds_concept.hpp | 64 ++++++++++++------------
   sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/mutable_forward_hds_concept.hpp | 36 ++++++-------
   sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/mutable_hds_concept.hpp | 38 +++++---------
   sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/mutable_vertex_hds_concept.hpp | 63 +++++++++++------------
   sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/vertex_hds_concept.hpp | 40 ++++++++------
   sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/vertex_list_hds_concept.hpp | 37 ++++++++-----
   16 files changed, 462 insertions(+), 443 deletions(-)

Modified: sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/backward_hds_concept.hpp
==============================================================================
--- sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/backward_hds_concept.hpp (original)
+++ sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/backward_hds_concept.hpp 2007-06-26 02:06:52 EDT (Tue, 26 Jun 2007)
@@ -61,39 +61,39 @@
 ///Valid Expressions
 ///-----------------
 // In addition to the valid expressions of the 'HDS' concept:
-// - 'prev_in_facet(hds,h)' must return a value assignable to 'h'.
-// - 'prev_at_source(hds,h)' must return a value assignable to 'h'.
-// - 'prev_at_target(hds,h)' must return a value assignable to 'h'.
+// - 'prev_in_facet(h, hds)' must return a value assignable to 'h'.
+// - 'prev_at_source(h, hds)' must return a value assignable to 'h'.
+// - 'prev_at_target(h, hds)' must return a value assignable to 'h'.
 //
 ///Expression Semantics
 ///--------------------
 // In addition to the expression semantics of the 'HDS' concept:
-// - 'prev_in_facet(hds,h)' returns a halfedge descriptor to the halfedge
+// - 'prev_in_facet(h, hds)' returns a halfedge descriptor to the halfedge
 // preceding 'h' in the adjacent facet cycle, when facet cycles are
 // oriented in counter-clockwise order.
-// - 'prev_at_source(hds,h)' returns a halfedge descriptor to the halfedge
+// - 'prev_at_source(h, hds)' returns a halfedge descriptor to the halfedge
 // preceding 'h' around the source vertex of 'h', when halfedges are
 // ordered around a given vertex in clockwise order.
-// - 'prev_at_target(hds,h)' returns a halfedge descriptor to the halfedge
+// - 'prev_at_target(h, hds)' returns a halfedge descriptor to the halfedge
 // preceding 'h' around the target vertex of 'h', when halfedges are
 // ordered around a given vertex in clockwise order.
 //
 ///Complexity guarantees
 ///---------------------
 // In addition to the complexity guarantees of the 'HDS' concept:
-// - 'prev_in_facet(hds,h)': amortized constant time.
-// - 'prev_at_source(hds,h)': amortized constant time.
-// - 'prev_at_target(hds,h)': amortized constant time.
+// - 'prev_in_facet(h, hds)': amortized constant time.
+// - 'prev_at_source(h, hds)': amortized constant time.
+// - 'prev_at_target(h, hds)': amortized constant time.
 //
 ///Invariants
 ///----------
 // The backward halfedge accessors are linked via the algebraic relations:
-// - 'prev_in_facet(hds,h)' == 'prev_at_target(opposite(hds,h))'
-// == 'opposite(prev_at_source(hds,h))'
-// - 'prev_at_source(hds,h)' == 'opposite(prev_in_facet(hds,h))'
-// == 'opposite(prev_at_target(opposite(hds,h)))'
-// - 'prev_at_target(hds,h)' == 'prev_in_facet(opposite(hds,h))'
-// == 'opposite(prev_at_source(opposite(hds,h)))'
+// - 'prev_in_facet(h, hds)' == 'prev_at_target(opposite(h, hds), hds)'
+// == 'opposite(prev_at_source(h, hds), hds)'
+// - 'prev_at_source(h, hds)' == 'opposite(prev_in_facet(h, hds), hds)'
+// == 'opposite(prev_at_target(opposite(h, hds)))'
+// - 'prev_at_target(h, hds)' == 'prev_in_facet(opposite(h, hds), hds)'
+// == 'opposite(prev_at_source(opposite(h, hds), hds), hds)'
 //
 ///Concept-checking class
 ///----------------------
@@ -117,9 +117,9 @@
 // const_constraints(hds);
 // }
 // void const_constraints(HDS const& hds){
-// h = prev_in_facet(hds,h);
-// h = prev_at_source(hds,h);
-// h = prev_at_target(hds,h);
+// h = prev_in_facet(h, hds);
+// h = prev_at_source(h, hds);
+// h = prev_at_target(h, hds);
 // }
 // BackwardHDS hds;
 // halfedge_descriptor h;
@@ -161,13 +161,16 @@
             using namespace boost;
             function_requires<HDSConcept<HDS> >();
             function_requires<ConvertibleConcept<traversal_category,
- backward_traversal_tag> >();
+ backward_traversal_tag> >();
             const bool is_valid_storage_tag =
                   is_convertible<backward_category,prev_at_source_tag>::value ||
                   is_convertible<backward_category,prev_at_target_tag>::value ||
                   is_convertible<backward_category,prev_in_facet_tag>::value;
             BOOST_STATIC_ASSERT( is_valid_storage_tag );
 
+ h = prev_in_facet(h, hds);
+ h = prev_at_source(h, hds);
+ h = prev_at_target(h, hds);
             const_constraints(hds);
         }
 
@@ -176,9 +179,9 @@
             // Check that the non-modifiable 'HDS' template parameters
             // satisfies all the constraints of 'BackwardHDSConcept'.
         {
- h = prev_in_facet(hds,h);
- h = prev_at_source(hds,h);
- h = prev_at_target(hds,h);
+ h = prev_in_facet(h, hds);
+ h = prev_at_source(h, hds);
+ h = prev_at_target(h, hds);
         }
 
       private:

Modified: sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/bidirectional_hds_concept.hpp
==============================================================================
--- sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/bidirectional_hds_concept.hpp (original)
+++ sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/bidirectional_hds_concept.hpp 2007-06-26 02:06:52 EDT (Tue, 26 Jun 2007)
@@ -38,7 +38,7 @@
 ///Associated types
 ///----------------
 // In addition to the types of the 'ForwardHDS' and 'BackwardHDS' concepts:
-// - 'hds_traits<HDS>::traversal_category' : from 'HDSConcept', with
+// - 'hds_traits<HDS>::traversal_category': from 'HDSConcept', with
 // the additional requirement that this type must be convertible to
 // the 'hds_traits<HDS>::bidirectional_traversal_tag' type which is
 // defined in '<boost/hdstl.hpp>'.
@@ -76,23 +76,23 @@
 ///Concept-checking class
 ///----------------------
 //..
-// template <class HDS>
-// struct BidirectionalHDSConcept {
-// typedef typename hds_traits<HDS>::halfedge_descriptor halfedge_descriptor;
-// typedef typename hds_traits<HDS>::traversal_category traversal_category;
-// typedef typename hds_traits<HDS>::forward_category forward_category;
-// typedef typename hds_traits<HDS>::backward_category backward_category;
-// void constraints() {
-// using namespace boost;
-// function_requires<ForwardHDSConcept<HDS> >();
-// function_requires<BackwardHDSConcept<HDS> >();
-// function_requires<ConvertibleConcept<traversal_category,
-// bidirectional_traversal_tag> >();
-// }
-// void const_constraints(HDS const& hds) {
-// }
-// BidirectionalHDS hds;
-// };
+// template <class HDS>
+// struct BidirectionalHDSConcept {
+// typedef typename hds_traits<HDS>::halfedge_descriptor halfedge_descriptor;
+// typedef typename hds_traits<HDS>::traversal_category traversal_category;
+// typedef typename hds_traits<HDS>::forward_category forward_category;
+// typedef typename hds_traits<HDS>::backward_category backward_category;
+// void constraints() {
+// using namespace boost;
+// function_requires<ForwardHDSConcept<HDS> >();
+// function_requires<BackwardHDSConcept<HDS> >();
+// function_requires<ConvertibleConcept<traversal_category,
+// bidirectional_traversal_tag> >();
+// }
+// void const_constraints(HDS const& hds) {
+// }
+// BidirectionalHDS hds;
+// };
 //..
 
 #ifndef BOOST_HDSTL_CONCEPTS_BIDIRECTIONAL_HDS_CONCEPT_HPP
@@ -137,7 +137,7 @@
             function_requires<ForwardHDSConcept<HDS> >();
             function_requires<BackwardHDSConcept<HDS> >();
             function_requires<ConvertibleConcept<traversal_category,
- bidirectional_traversal_tag> >();
+ bidirectional_traversal_tag> >();
         }
 
         // ACCESSORS

Added: sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/boost/hdstl
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/boost/hdstl 2007-06-26 02:06:52 EDT (Tue, 26 Jun 2007)
@@ -0,0 +1 @@
+link ../../
\ No newline at end of file

Modified: sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/facet_hds_concept.hpp
==============================================================================
--- sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/facet_hds_concept.hpp (original)
+++ sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/facet_hds_concept.hpp 2007-06-26 02:06:52 EDT (Tue, 26 Jun 2007)
@@ -41,8 +41,6 @@
 ///Definitions
 ///-----------
 // In addition to the definitions of the 'HDS' concept:
-// - 'halfedge_descriptor' is a type that contains information to access
-// the halfedge. (See the 'HDSConcept' for a full definition.)
 // - 'facet_descriptor' is a type that contains information to access the
 // facet to the left of the halfedge, if forward facet cycles are
 // ordered in counter clockwise rotation around the facet.
@@ -50,20 +48,20 @@
 ///Valid Expressions
 ///-----------------
 // In addition to the valid expressions of the 'HDS' concept:
-// - 'facet(hds,h)' must return a value assignable to 'f'.
+// - 'facet(h, hds)' must return a value assignable to 'f'.
 //
 ///Expression Semantics
 ///--------------------
 // In addition to the expressions semantics of the 'HDS' concept:
-// - 'hds_traits<HDS>::supports_facets': must compare equal to 'true'.
-// - 'facet(hds,h)' returns the facet descriptor of the facet to the
-// left of 'h', when forward facet cycles are oriented in
-// counter-clockwise order.
+// - 'hds_traits<HDS>::supports_facets' must compare equal to 'true'.
+// - 'facet(h, hds)' returns the facet descriptor of the facet to the
+// left of 'h', when forward facet cycles are oriented in
+// counter-clockwise order.
 //
 ///Complexity guarantees
 ///---------------------
 // In addition to the complexity guarantees of the 'HDS' concept:
-// - 'facet(hds,h)': amortized constant time.
+// - 'facet(h, hds)': amortized constant time.
 //
 ///Invariants
 ///----------
@@ -72,25 +70,27 @@
 ///Concept-checking class
 ///----------------------
 //..
-// template <class HDS>
-// struct FacetHDSConcept {
-// typedef typename hds_traits<HDS>::facet_descriptor facet_descriptor;
-// void constraints() {
-// using namespace boost;
-// function_requires<HDSConcept>();
-// function_requires<DefaultConstructibleConcept<facet_descriptor> >();
-// function_requires<CopyConstructibleConcept<facet_descriptor> >();
-// function_requires<EqualityComparableConcept<facet_descriptor> >();
-// function_requires<AssignableConcept<facet_descriptor> >();
-// BOOST_STATIC_ASSERT(hds_traits<HDS>::supports_facets);
-// const_constraints(hds);
-// }
-// void const_constraints(HDS const& hds) {
-// f = facet(hds, h);
-// }
-// HDS hds;
-// facet_descriptor f;
-// };
+// template <class HDS>
+// struct FacetHDSConcept {
+// typedef typename hds_traits<HDS>::facet_descriptor facet_descriptor;
+// void constraints() {
+// using namespace boost;
+// function_requires<HDSConcept>();
+// function_requires<DefaultConstructibleConcept<facet_descriptor> >();
+// function_requires<CopyConstructibleConcept<facet_descriptor> >();
+// function_requires<EqualityComparableConcept<facet_descriptor> >();
+// function_requires<AssignableConcept<facet_descriptor> >();
+//
+// BOOST_STATIC_ASSERT(hds_traits<HDS>::supports_facets);
+// f = facet(hds, h);
+// const_constraints(hds);
+// }
+// void const_constraints(HDS const& hds) {
+// f = facet(hds, h);
+// }
+// HDS hds;
+// facet_descriptor f;
+// };
 //..
 
 #ifndef BOOST_HDSTL_CONCEPTS_FACET_HDS_CONCEPT_HPP
@@ -134,6 +134,7 @@
            function_requires<AssignableConcept<facet_descriptor> >();
 
            BOOST_STATIC_ASSERT(hds_traits<HDS>::supports_facets);
+ f = facet(h, hds);
            const_constraints(hds);
        }
 
@@ -142,13 +143,13 @@
            // Check that the non-modifiable 'HDS' template parameters
            // satisfies all the constraints of 'FacetHDSConcept'.
        {
- f = facet(hds,h);
+ f = facet(h, hds);
        }
 
      private:
        //DATA
- FacetHDS hds; // a halfedge data structure object
- facet_descriptor f; // a facet descriptor
+ HDS hds; // a halfedge data structure object
+ facet_descriptor f; // a modifiable facet descriptor
    };
 
 } // close namespace concepts

Modified: sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/facet_list_hds_concept.hpp
==============================================================================
--- sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/facet_list_hds_concept.hpp (original)
+++ sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/facet_list_hds_concept.hpp 2007-06-26 02:06:52 EDT (Tue, 26 Jun 2007)
@@ -31,7 +31,7 @@
 // - 'HDS' A type that is a model of FacetListHDSConcept
 // - 'hds' A non-modifiable instance of HDS
 // - 'f' Facet descriptor, of type 'hds_traits<HDS>::facet_descriptor'
-// - 'p' Facet iterator, of type 'hds_traits<HDS>::facet_iterator'
+// - 'fit' Facet iterator, of type 'hds_traits<HDS>::facet_iterator'
 // - 'n' Facet list size, of type 'hds_traits<HDS>::size_type'
 //
 ///Associated types
@@ -44,26 +44,27 @@
 //
 ///Definitions
 ///-----------
-// - 'facet_descriptor' is a type that contains information to access
-// the facet. (See the 'FacetHDSConcept' for a full definition.)
+// In addition to the definitions of the 'FacetHDS' concept:
 // - 'facet_iterator' is an iterator type for the facets.
-// - 'size_type' defines the size type.
+// - 'size_type' is an integral type wide enough to hold any possible
+// number of facets that might be stored in a particular model.
 //
 ///Valid Expressions
 ///-----------------
 // In addition to the valid expressions of the 'HDS' concept:
 // - 'facets_begin(hds)' must return a value assignable to 'p'.
 // - 'facets_end(hds)' must return a value assignable to 'p'.
-// - '*p.first' must return a value assignable to 'f'.
+// - '*fit' must return a value assignable to 'f'.
 // - 'num_facets(hds)' must return a value assignable to 'n'.
 //
 ///Expression Semantics
 ///--------------------
 // In addition to the valid expression semantics of the 'HDS' concept:
-// - 'facets_begin(hds)' returns a 'facet_iterator' 'p' pointing to the
+// - 'facets_begin(hds)' returns a 'facet_iterator' 'fit' pointing to the
 // beginning of the "facet list".
-// - 'facets_end(hds)' returns a 'facet_iterator' 'p' pointing to the
+// - 'facets_end(hds)' returns a 'facet_iterator' 'fit' pointing to the
 // end of the "facet list".
+// - '*fit' returns the descriptor of the fact pointed to by 'fit'.
 // - 'num_facets(HDS)' returns the number of facets in the 'HDS' data
 // structure.
 //
@@ -72,6 +73,7 @@
 // In addition to the complexity guarantees of the 'FacetHDS' concept:
 // - 'facets_begin(hds)': amortized constant time.
 // - 'facets_end(hds)': amortized constant time.
+// - '*fit': worst-case constant time.
 // - 'num_facets(hds)': amortized constant time.
 //
 ///Invariants
@@ -81,34 +83,39 @@
 ///Concept-checking class
 ///----------------------
 //..
-// template <class HDS>
-// struct FacetListHDSConcept {
-// typedef typename hds_traits<HDS>::facet_iterator facet_iterator;
-// typedef typename hds_traits<HDS>::facet_descriptor facet_descriptor;
-// typedef typename hds_traits<HDS>::size_type size_type;
-// void constraints()
-// {
-// using namespace boost;
-// function_requires<HDSConcept>();
-// function_requires<FacetHDSConcept>();
-// function_requires<ForwardIteratorConcept<facet_iterator> >();
-// function_requires<ConvertibleConcept<size_type,int> >();
-// const_constraints(hds);
-// }
-// void const_constraints(HDS const& hds)
-// {
-// b = facets_begin(hds);
-// e = facets_end(hds);
-// n = num_facets(hds);
-// }
-// private:
-// FacetListHDS hds;
-// facet_descriptor f;
-// facet_iterator b;
-// facet_iterator e;
-// size_type n;
-
-// };
+// template <class HDS>
+// struct FacetListHDSConcept {
+// typedef typename hds_traits<HDS>::facet_iterator facet_iterator;
+// typedef typename hds_traits<HDS>::facet_descriptor facet_descriptor;
+// typedef typename hds_traits<HDS>::size_type size_type;
+// void constraints()
+// {
+// using namespace boost;
+// function_requires<HDSConcept>();
+// function_requires<FacetHDSConcept>();
+// function_requires<ForwardIteratorConcept<facet_iterator> >();
+// function_requires<ConvertibleConcept<size_type,int> >();
+//
+// b = facets_begin(hds);
+// e = facets_end(hds);
+// f = *b;
+// n = num_facets(hds);
+// const_constraints(hds);
+// }
+// void const_constraints(HDS const& hds)
+// {
+// b = facets_begin(hds);
+// e = facets_end(hds);
+// f = *b;
+// n = num_facets(hds);
+// }
+// private:
+// FacetListHDS hds;
+// facet_descriptor f;
+// facet_iterator b;
+// facet_iterator e;
+// size_type n;
+// };
 //..
 
 #ifndef BOOST_HDSTL_CONCEPTS_FACET_LIST_HDS_CONCEPT_HPP
@@ -154,8 +161,10 @@
            function_requires<hdstl_detail::ForwardIteratorConcept<
                                                            facet_iterator> >();
            function_requires<ConvertibleConcept<size_type,int> >();
+
            b = facets_begin(hds);
            e = facets_end(hds);
+ f = *b;
            n = num_facets(hds);
            const_constraints(hds);
        }
@@ -167,12 +176,13 @@
        {
            b = facets_begin(hds);
            e = facets_end(hds);
+ f = *b;
            n = num_facets(hds);
        }
 
      private:
        //DATA
- FacetListHDS hds; // a halfedge data structure object
+ HDS hds; // a halfedge data structure object
        facet_descriptor f; // a facet descriptor
        facet_iterator b; // a facet iterator
        facet_iterator e; // a facet iterator

Modified: sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/forward_hds_concept.hpp
==============================================================================
--- sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/forward_hds_concept.hpp (original)
+++ sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/forward_hds_concept.hpp 2007-06-26 02:06:52 EDT (Tue, 26 Jun 2007)
@@ -44,7 +44,7 @@
 // - 'hds_traits<HDS>::traversal_category': from 'HDSConcept', with
 // additional requirement that this type must be convertible to
 // 'hdstl::forward_traversal_tag'.
-// - 'hds_traits<HDS>::forward_category': defines the pointer type for
+// - 'hds_traits<HDS>::forward_category': defines the pointer type for
 // forward iteration.
 //
 ///Definitions
@@ -61,70 +61,73 @@
 ///Valid Expressions
 ///-----------------
 // In addition to the valid expressions of the 'HDS' concept:
-// - 'next_in_facet(hds,h)' must return a value assignable to 'h'.
-// - 'next_at_source(hds,h)' must return a value assignable to 'h'.
-// - 'next_at_target(hds,h)' must return a value assignable to 'h'.
+// - 'next_in_facet(h, hds)' must return a value assignable to 'h'.
+// - 'next_at_source(h, hds)' must return a value assignable to 'h'.
+// - 'next_at_target(h, hds)' must return a value assignable to 'h'.
 //
 ///Expression Semantics
 ///--------------------
 // In addition to the expression semantics of the 'HDS' concept:
-// - 'next_in_facet(hds,h)' returns a halfedge descriptor to the halfedge
+// - 'next_in_facet(h, hds)' returns a halfedge descriptor to the halfedge
 // succeeding 'h' in the adjacent facet cycle, when facet cycles are
 // oriented in counter-clockwise order.
-// - 'next_at_source(hds,h)' returns a halfedge descriptor to the halfedge
+// - 'next_at_source(h, hds)' returns a halfedge descriptor to the halfedge
 // succeeding 'h' around the source vertex of 'h', when halfedges are
 // ordered around a given vertex in clockwise order.
-// - 'next_at_target(hds,h)' returns a halfedge descriptor to the halfedge
+// - 'next_at_target(h, hds)' returns a halfedge descriptor to the halfedge
 // succeeding 'h' around the target vertex of 'h', when halfedges are
 // ordered around a given vertex in clockwise order.
 //
 ///Complexity guarantees
 ///---------------------
 // In addition to the complexity guarantees of the 'HDS' concept:
-// - 'next_in_facet(hds,h)': amortized constant time.
-// - 'next_at_source(hds,h)': amortized constant time.
-// - 'next_at_target(hds,h)': amortized constant time.
+// - 'next_in_facet(h, hds)': amortized constant time.
+// - 'next_at_source(h, hds)': amortized constant time.
+// - 'next_at_target(h, hds)': amortized constant time.
 //
 ///Invariants
 ///----------
 // The forward halfedge accessors are linked via the algebraic relations:
-// - 'next_in_facet(hds,h)' == 'next_at_source(opposite(hds,h))'
-// == 'opposite(next_at_target(hds,h))'
-// - 'next_at_source(hds,h)' == 'next_in_facet(opposite(hds,h))'
-// == 'opposite(next_at_target(opposite(hds,h)))'
-// - 'next_at_target(hds,h)' == 'opposite(next_in_facet(hds,h))'
-// == 'opposite(next_at_source(opposite(hds,h)))'
+// - 'next_in_facet(h, hds)' == 'next_at_source(opposite(h, hds), hds)'
+// == 'opposite(next_at_target(h, hds), hds)'
+// - 'next_at_source(h, hds)' == 'next_in_facet(opposite(h, hds), hds)'
+// == 'opposite(next_at_target(opposite(h, hds), hds), hds)'
+// - 'next_at_target(h, hds)' == 'opposite(next_in_facet(h, hds), hds)'
+// == 'opposite(next_at_source(opposite(h, hds), hds), hds)'
 //
 ///Concept-checking class
 ///----------------------
 //..
-// template <class HDS>
-// struct ForwardHDSConcept {
-// typedef typename hds_traits<HDS>::halfedge_descriptor halfedge_descriptor;
-// typedef typename hds_traits<HDS>::traversal_category traversal_category;
-// typedef typename hds_traits<HDS>::forward_category forward_category;
-// void constraints() {
-// using namespace boost;
-// function_requires<HDSConcept<HDS> >();
-// function_requires<ConvertibleConcept<traversal_category,
-// hdstl::forward_traversal_tag> >();
-// const bool is_valid_storage_tag =
-// is_convertible<forward_category,next_at_source_tag>::value ||
-// is_convertible<forward_category,next_at_target_tag>::value ||
-// is_convertible<forward_category,next_in_facet_tag>::value;
-// BOOST_STATIC_ASSERT( is_valid_storage_tag );
-//
-// const_constraints(hds);
-// }
-// void const_constraints(HDS const& hds){
-// h = next_in_facet(hds,h);
-// h = next_at_source(hds,h);
-// h = next_at_target(hds,h);
-// }
-// ForwardHDS hds;
-// halfedge_descriptor h;
-// halfedge_descriptor g;
-// };
+// template <class HDS>
+// struct ForwardHDSConcept {
+// typedef typename hds_traits<HDS>::halfedge_descriptor halfedge_descriptor;
+// typedef typename hds_traits<HDS>::traversal_category traversal_category;
+// typedef typename hds_traits<HDS>::forward_category forward_category;
+// void constraints() {
+// using namespace boost;
+// function_requires<HDSConcept<HDS> >();
+// function_requires<ConvertibleConcept<traversal_category,
+// hdstl::forward_traversal_tag> >();
+// const bool is_valid_storage_tag =
+// is_convertible<forward_category,next_at_source_tag>::value ||
+// is_convertible<forward_category,next_at_target_tag>::value ||
+// is_convertible<forward_category,next_in_facet_tag>::value;
+// BOOST_STATIC_ASSERT( is_valid_storage_tag );
+//
+// h = next_in_facet(h, hds);
+// h = next_at_source(h, hds);
+// h = next_at_target(h, hds);
+// const_constraints(hds);
+// }
+// void const_constraints(HDS const& hds){
+// h = next_in_facet(h, hds);
+// h = next_at_source(h, hds);
+// h = next_at_target(h, hds);
+// }
+// ForwardHDS hds;
+// halfedge_descriptor h;
+// halfedge_descriptor g;
+// };
 //..
 
 #ifndef BOOST_HDSTL_CONCEPTS_FORWARD_HDS_CONCEPT_HPP
@@ -165,13 +168,17 @@
             using namespace boost;
             function_requires<HDSConcept<HDS> >();
             function_requires<ConvertibleConcept<traversal_category,
- forward_traversal_tag> >();
+ forward_traversal_tag> >();
+
             const bool is_valid_storage_tag =
                    is_convertible<forward_category,next_at_source_tag>::value ||
                    is_convertible<forward_category,next_at_target_tag>::value ||
                    is_convertible<forward_category,next_in_facet_tag>::value;
             BOOST_STATIC_ASSERT( is_valid_storage_tag );
 
+ h = next_in_facet(h, hds);
+ h = next_at_source(h, hds);
+ h = next_at_target(h, hds);
             const_constraints(hds);
         }
 
@@ -180,14 +187,14 @@
             // Check that the non-modifiable 'HDS' template parameters
             // satisfies all the constraints of 'ForwardHDSConcept'.
         {
- h = next_in_facet(hds,h);
- h = next_at_source(hds,h);
- h = next_at_target(hds,h);
+ h = next_in_facet(h, hds);
+ h = next_at_source(h, hds);
+ h = next_at_target(h, hds);
         }
 
       private:
         // DATA
- ForwardHDS hds; // a halfedge data structure object
+ HDS hds; // a halfedge data structure object
         halfedge_descriptor h; // a halfedge descriptor
         halfedge_descriptor g; // another halfedge descriptor
     };

Modified: sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/halfedge_list_hds_concept.hpp
==============================================================================
--- sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/halfedge_list_hds_concept.hpp (original)
+++ sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/halfedge_list_hds_concept.hpp 2007-06-26 02:06:52 EDT (Tue, 26 Jun 2007)
@@ -31,7 +31,7 @@
 // - 'HDS' A type that is a model of HalfedgeListHDSConcept
 // - 'hds' A non-modifiable instance of HDS
 // - 'h' Halfedge descriptor, of type 'hds_traits<HDS>::halfedge_descriptor'
-// - 'p' Halfedge iterator, of type 'hds_traits<HDS>::halfedge_iterator'
+// - 'hit' Halfedge iterator, of type 'hds_traits<HDS>::halfedge_iterator'
 // - 'n' Halfedge list size, of type 'hds_traits<HDS>::size_type'
 //
 ///Associated types
@@ -47,22 +47,25 @@
 ///-----------
 // In addition to the definitions of the 'HDS' concept:
 // - 'halfedge_iterator' is an iterator type for the halfedges.
-// - 'size_type' defines the size type.
+// - 'size_type' is an integral type wide enough to hold any possible
+// number of halfedges that might be stored in a particular model.
 //
 ///Valid Expressions
 ///-----------------
 // In addition to the valid expressions of the 'HDS' concept:
-// - 'halfedges_begin(hds)' must return a value assignable to 'p'.
-// - 'halfedges_end(hds)' must return a value assignable to 'p'.
+// - 'halfedges_begin(hds)' must return a value assignable to 'hit'.
+// - 'halfedges_end(hds)' must return a value assignable to 'hit'.
+// - '*hit' must return a value assignable to 'h'.
 // - 'num_halfedges(hds)' must return a value assignable to 'n'.
 //
 ///Expression Semantics
 ///--------------------
 // In addition to the expression semantics of the 'HDS' concept:
-// - 'halfedges_begin(hds)' returns a 'halfedge_iterator' pointing to the
-// beginning of the "halfedge list".
-// - 'halfedges_end(hds)' returns a 'halfedge_iterator' pointing to the
+// - 'halfedges_begin(hds)' returns a 'halfedge_iterator' 'hit' pointing to
+// the beginning of the "halfedge list".
+// - 'halfedges_end(hds)' returns a 'halfedge_iterator' 'hit' pointing to the
 // end of the "halfedge list".
+// - '*hit' returns a descriptor to the halfedge pointed to by 'hit'.
 // - 'num_halfedges(hds)' returns the number of halfedges in the 'HDS' data
 // structure.
 //
@@ -70,6 +73,7 @@
 ///---------------------
 // - 'halfedges_begin(hds)': amortized constant time.
 // - 'halfedges_end(hds)': amortized constant time.
+// - '*hit': worst-case constant time.
 // - 'num_halfedges(hds)': amortized constant time.
 //
 ///Invariants
@@ -81,35 +85,35 @@
 ///Concept-checking class
 ///----------------------
 //..
-// template <class HDS>
-// struct HalfedgeListHDSConcept {
-// typedef typename hds_traits<HDS>::halfedge_iterator halfedge_iterator;
-// typedef typename hds_traits<HDS>::halfedge_descriptor halfedge_descriptor;
-// typedef typename hds_traits<HDS>::halfedges_size_type halfedges_size_type;
-// void constraints()
-// {
-// using namespace boost;
-// function_requires<HDSConcept>();
-// function_requires<DefaultConstructibleConcept<halfedge_descriptor> >();
-// function_requires<CopyConstructibleConcept<halfedge_descriptor> >();
-// function_requires<EqualityComparableConcept<halfedge_descriptor> >();
-// function_requires<AssignableConcept<halfedge_descriptor> >();
-// function_requires<ForwardIteratorConcept<halfedge_iterator> >();
-// function_requires<ConvertibleConcept<halfedges_size_type> >();
-// const_constraints(hds);
-// }
-// void const_constraints(HDS const& hds)
-// {
-// b = halfedges_begin(hds);
-// e = halfedges_end(hds);
-// n = num_halfedges(hds);
-// }
-// private:
-// HalfedgeListHDS hds;
-// halfedge_descriptor h;
-// halfedge_iterator b, e;
-// size_type n;
-// };
+// template <class HDS>
+// struct HalfedgeListHDSConcept {
+// typedef typename hds_traits<HDS>::halfedge_iterator halfedge_iterator;
+// typedef typename hds_traits<HDS>::halfedge_descriptor halfedge_descriptor;
+// typedef typename hds_traits<HDS>::halfedges_size_type halfedges_size_type;
+// void constraints()
+// {
+// using namespace boost;
+// function_requires<HDSConcept>();
+// function_requires<DefaultConstructibleConcept<halfedge_descriptor> >();
+// function_requires<CopyConstructibleConcept<halfedge_descriptor> >();
+// function_requires<EqualityComparableConcept<halfedge_descriptor> >();
+// function_requires<AssignableConcept<halfedge_descriptor> >();
+// function_requires<ForwardIteratorConcept<halfedge_iterator> >();
+// function_requires<ConvertibleConcept<halfedges_size_type> >();
+// const_constraints(hds);
+// }
+// void const_constraints(HDS const& hds)
+// {
+// b = halfedges_begin(hds);
+// e = halfedges_end(hds);
+// n = num_halfedges(hds);
+// }
+// private:
+// HalfedgeListHDS hds;
+// halfedge_descriptor h;
+// halfedge_iterator b, e;
+// size_type n;
+// };
 //..
 
 #ifndef BOOST_HDSTL_CONCEPTS_HALFEDGE_LIST_HDS_CONCEPT_HPP
@@ -172,7 +176,7 @@
 
      private:
        //DATA
- HalfedgeListHDS hds; // a halfedge data structure object
+ HDS hds; // a halfedge data structure object
        halfedge_descriptor h; // a halfedge descriptor
        halfedge_iterator b,e; // halfedge iterators
        size_type n; // halfedge size type

Modified: sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/hds_concept.hpp
==============================================================================
--- sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/hds_concept.hpp (original)
+++ sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/hds_concept.hpp 2007-06-26 02:06:52 EDT (Tue, 26 Jun 2007)
@@ -35,8 +35,7 @@
 ///--------
 // - 'HDS' A type that is a model of 'HDSConcept'
 // - 'hds' A non-modifiable instance of 'HDS'
-// - 'h','g' Halfedge descriptors, of type
-// 'hds_traits<HDS>::halfedge_descriptor'
+// - 'h','g' Halfedge descriptors, of type 'hds_traits<HDS>::halfedge_descriptor'
 //
 ///Associated types
 ///----------------
@@ -55,7 +54,7 @@
 ///Valid Expressions
 ///-----------------
 // The following expression must be valid and obey the syntactic requirement:
-// - 'opposite(hds, h)' must return a value assignable to 'h'.
+// - 'opposite(h, hds)' must return a value assignable to 'h'.
 // - 'hds_traits<HDS>::supports_facets' must be usable as a Boolean.
 // - 'hds_traits<HDS>::supports_vertices' must be usable as a Boolean.
 //
@@ -66,45 +65,51 @@
 // is a model of the 'FacetHDS' concept (see the page [facethdsconcept]).
 // - 'hds_traits<HDS>::supports_vertices' is true if and only if 'HDS'
 // is a model of the 'VertexHDS' concept (see the page [vertexhdsconcept]).
-// - 'opposite(hds, h)' returns a descriptor to the halfedge opposite 'h' in
+// - 'opposite(h, hds)' returns a descriptor to the halfedge opposite 'h' in
 // the data structure 'hds'. Does not modify the state of either 'hds'
 // or 'h'.
 //
 ///Complexity guarantees
 ///---------------------
-// - 'opposite(hds, h)': Amortized constant time.
+// - 'opposite(h, hds)': Amortized constant time.
 //
 ///Invariants
 ///----------
 // Every valid halfedge descriptor 'h' must have a valid opposite
-// 'g = opposite(hds, h)', *distinct* from h, such that
-// 'opposite(hds, g)' returns 'h'. (Hence, 'opposite' is an involution.)
+// 'g = opposite(h, hds)', *distinct* from h, such that
+// 'opposite(g, hds)' returns 'h'. (Hence, 'opposite' is an involution.)
 //
 ///Concept-checking class
 ///----------------------
 //..
-// template <class HDS>
-// struct HDSConcept {
-// typedef typename hds_traits<HDS>::halfedge_descriptor halfedge_descriptor;
-// void constraints() {
-// using namespace boost;
-// function_requires<DefaultConstructibleConcept<halfedge_descriptor> >();
-// function_requires<CopyConstructibleConcept<halfedge_descriptor> >();
-// function_requires<EqualityComparableConcept<halfedge_descriptor> >();
-// function_requires<AssignableConcept<halfedge_descriptor> >();
-// h = opposite(hds,h);
-// const_constraints(hds);
-// }
-// void const_constraints(HDS const& hds) {
-// h = opposite(hds,h);
-// }
+// template <class HDS>
+// struct HDSConcept {
+// typedef typename hds_traits<HDS>::halfedge_descriptor halfedge_descriptor;
+// void constraints() {
+// using namespace boost;
+// function_requires<DefaultConstructibleConcept<halfedge_descriptor> >();
+// function_requires<CopyConstructibleConcept<halfedge_descriptor> >();
+// function_requires<EqualityComparableConcept<halfedge_descriptor> >();
+// function_requires<AssignableConcept<halfedge_descriptor> >();
+//
+// h = opposite(h, hds);
+// const_constraints(hds);
+// }
+// void const_constraints(HDS const& hds) {
+// if (hds_traits<HDS>::supports_vertices) {}
+// if (hds_traits<HDS>::supports_facets) {}
+// h = opposite(h, hds);
+// }
+// HDS hds;
+// halfedge_descriptor h;
+// }
 //..
 
 #ifndef BOOST_HDSTL_CONCEPTS_HDS_CONCEPT_HPP
 #define BOOST_HDSTL_CONCEPTS_HDS_CONCEPT_HPP 1
 
 #include <boost/concept_check.hpp>
-#include "../hds_traits.hpp"
+#include <boost/hdstl/hds_traits.hpp>
 
 namespace boost {
 namespace hdstl {
@@ -139,7 +144,8 @@
             function_requires<CopyConstructibleConcept<halfedge_descriptor> >();
             function_requires<EqualityComparableConcept<halfedge_descriptor> >();
             function_requires<AssignableConcept<halfedge_descriptor> >();
- h= hds.opposite(h);
+
+ h = opposite(h, hds);
             const_constraints(hds);
         }
 
@@ -148,13 +154,15 @@
             // Check that the non-modifiable 'HDS' template parameters
             // satisfies all the constraints of 'HDSConcept'.
         {
- h = opposite(hds,h);
+ if (hds_traits<HDS>::supports_vertices) {}
+ if (hds_traits<HDS>::supports_facets) {}
+ h = opposite(h, hds);
         }
 
- private:
- // DATA
- HDS hds; // a halfedge data structure object
- halfedge_descriptor h; // a halfedge descriptor
+ private:
+ // DATA
+ HDS hds; // a halfedge data structure object
+ halfedge_descriptor h; // a halfedge descriptor
     };
 
 } // close namespace hdstl

Modified: sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/hds_concept.t.cpp
==============================================================================
--- sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/hds_concept.t.cpp (original)
+++ sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/hds_concept.t.cpp 2007-06-26 02:06:52 EDT (Tue, 26 Jun 2007)
@@ -16,44 +16,49 @@
 // the concept requirements of the concept. Note that the purpose of
 // this test driver is to verify the validity of the concept checking
 // class, not of the archetype. This is why it suffices to take the
-// halfedge_descriptor as an int, although a real archetype would make
+// 'halfedge_descriptor' as an 'int', although a real archetype would make
 // this into a custom-made class with the tailored minimal requirements.
 
-namespace boost {
-namespace hdstl {
-struct hds_archetype1 {
- typedef int halfedge_descriptor;
- halfedge_descriptor opposite(halfedge_descriptor h) const { return h; }
-};
+namespace hdstl1 {
 
+ struct hds_archetype {
+ // This 'struct', intentionally defined in a namespace different from
+ // 'hdstl', the 'hds_traits' specialization defined in the namespace
+ // 'hdstl', and the supporting function 'opposite', defined in the same
+ // namespace as this 'struct' to take advantage of ADL
+ // (argument-dependent lookup) provide an archetype for the 'HDS'
+ // concept.
 
-template<typename T>
-int opposite(const T& hds, int h) { return h; }
+ typedef int halfedge_descriptor;
+ };
 
-struct hds_archetype2 {
- typedef int halfedge_descriptor;
- halfedge_descriptor opposite(halfedge_descriptor h) const
+ hds_archetype::halfedge_descriptor
+ opposite(hds_archetype::halfedge_descriptor h,
+ const hds_archetype&)
     {
- return boost::hdstl::opposite(*this, h);
+ return h;
     }
-};
 
+} // namespace hdstl
+
+namespace boost {
+namespace hdstl {
+
     template <>
- class hds_traits<hds_archetype1>
- {
- public:
- typedef int halfedge_descriptor;
- static const bool supports_vertices = false;
- static const bool supports_facets = false;
- };
- template <>
- class hds_traits<hds_archetype2>
+ struct hds_traits<hdstl1::hds_archetype>
     {
- public:
- typedef int halfedge_descriptor;
- enum { supports_vertices = true };
- enum { supports_facets = true };
+ typedef hdstl1::hds_archetype::halfedge_descriptor
+ halfedge_descriptor;
+ enum { supports_vertices = false};
+ static const int supports_facets = true;
     };
+
+} // namespace hdstl
+} // namespace boost
+
+// ===========================================================================
+// BOOST TEST APPARATUS
+// ===========================================================================
 
 template <class HDS>
 struct class_concept_requirements
@@ -64,16 +69,13 @@
 template <class HDS>
 bool concept_requirements()
 {
- function_requires<HDSConcept<HDS> >();
- class_concept_requirements<HDS>(); // force instantiation
+ boost::function_requires<boost::hdstl::HDSConcept<HDS> >();
+ class_concept_requirements<HDS>(); // force instantiation
+ return true;
 }
 
-int main()
+int test_main(int, char **)
 {
- BOOST_CHECK(( concept_requirements<hds_archetype1>() ));
- BOOST_CHECK(( concept_requirements<hds_archetype2>() ));
+ BOOST_CHECK(( concept_requirements<hdstl1::hds_archetype>() ));
     return 0;
 }
-
-} // end namespace hdstl
-} // end namespace boost

Modified: sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/mutable_backward_hds_concept.hpp
==============================================================================
--- sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/mutable_backward_hds_concept.hpp (original)
+++ sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/mutable_backward_hds_concept.hpp 2007-06-26 02:06:52 EDT (Tue, 26 Jun 2007)
@@ -38,33 +38,28 @@
 ///----------------
 // None besides the types in the 'MutableHDS' and 'BackwardHDS' concepts.
 //
-///Definitions
-///-----------
-// None besides the definitions in the 'MutableHDS' and 'BackwardHDS'
-// concepts.
-//
 ///Valid Expressions
 ///-----------------
 // In addition to the valid expressions of the 'MutableHDS' and the
 // 'BackwardHDS' concepts:
-// - 'set_prev_in_facet(hds,h,g)' sets 'g' as the 'prev_in_facet' value of
+// - 'set_prev_in_facet(h, g, hds)' sets 'g' as the 'prev_in_facet' value of
 // 'h'.
-// - 'set_prev_at_source(hds,h,g)' sets 'g' as the 'prev_at_source' value of
+// - 'set_prev_at_source(h, g, hds)' sets 'g' as the 'prev_at_source' value of
 // 'h'.
-// - 'set_prev_at_target(hds,h,g)' sets 'g' as the 'prev_at_target' value of
+// - 'set_prev_at_target(h, g, hds)' sets 'g' as the 'prev_at_target' value of
 // 'h'.
 //
 ///Expression Semantics
 ///--------------------
 // In addition to the expression semantics of the 'Mutable HDS' and the
 // 'BackwardHDS' concepts:
-// - 'set_prev_in_facet(hds,h,g)' sets 'g' as the halfedge
+// - 'set_prev_in_facet(h, g, hds)' sets 'g' as the halfedge
 // preceding 'h' in the adjacent facet cycle, when facet cycles are
 // oriented in counter-clockwise order.
-// - 'set_prev_at_source(hds,h,g)' sets 'g' as the halfedge
+// - 'set_prev_at_source(h, g, hds)' sets 'g' as the halfedge
 // preceding 'h' around the source vertex of 'h', when halfedges are
 // ordered around a given vertex in clockwise order.
-// - 'set_prev_at_target(hds,h,g)' sets 'g' as the halfedge
+// - 'set_prev_at_target(h, g, hds)' sets 'g' as the halfedge
 // preceding 'h' around the target vertex of 'h', when halfedges are
 // ordered around a given vertex in clockwise order.
 //
@@ -72,9 +67,9 @@
 ///---------------------
 // In addition to the complexity guarantees of the 'Mutable HDS' and the
 // 'BackwardHDS' concepts:
-// - 'set_prev_in_facet(hds,h,g)': amortized constant time.
-// - 'set_prev_at_source(hds,h,g)': amortized constant time.
-// - 'set_prev_at_target(hds,h,g)': amortized constant time.
+// - 'set_prev_in_facet(h, g, hds)': amortized constant time.
+// - 'set_prev_at_source(h, g, hds)': amortized constant time.
+// - 'set_prev_at_target(h, g, hds)': amortized constant time.
 //
 ///Invariants
 ///----------
@@ -94,9 +89,10 @@
 // using namespace boost;
 // function_requires<BackwardHDSConcept<HDS> >();
 // function_requires<MutableHDSConcept<HDS> >();
-// set_prev_in_facet(hds,h,g);
-// set_prev_at_source(hds,h,g);
-// set_prev_at_target(hds,h,g);
+//
+// set_prev_in_facet(h, g, hds);
+// set_prev_at_source(h, g, hds);
+// set_prev_at_target(h, g, hds);
 // const_constraints(hds);
 // }
 // void const_constraints(HDS const& hds)
@@ -150,10 +146,9 @@
             function_requires<BackwardHDSConcept<HDS> >();
             function_requires<MutableHDSConcept<HDS> >();
 
- set_prev_in_facet(hds,h,g);
- set_prev_at_source(hds,h,g);
- set_prev_at_target(hds,h,g);
-
+ set_prev_in_facet(h, g, hds);
+ set_prev_at_source(h, g, hds);
+ set_prev_at_target(h, g, hds);
             const_constraints(hds);
         }
 

Modified: sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/mutable_bidirectional_hds_concept.hpp
==============================================================================
--- sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/mutable_bidirectional_hds_concept.hpp (original)
+++ sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/mutable_bidirectional_hds_concept.hpp 2007-06-26 02:06:52 EDT (Tue, 26 Jun 2007)
@@ -43,11 +43,6 @@
 // None besides the types in the 'BidirectionalHDS', 'MutableForwardHDS',
 // and 'MutableBackwardHDS' concepts
 //
-///Definitions
-///-----------
-// Same as the definitions in the 'BidirectionalHDS', 'MutableForwardHDS',
-// and 'MutableBackwardHDS' concepts
-//
 ///Valid Expressions
 ///-----------------
 // Same as the valid expressions in the 'BidirectionalHDS',
@@ -71,24 +66,24 @@
 ///Concept-checking class
 ///----------------------
 //..
-// template <class HDS>
-// struct MutableBidirectionalHDSConcept {
-// typedef typename hds_traits<HDS>::halfedge_descriptor halfedge_descriptor;
-// typedef typename hds_traits<HDS>::traversal_category traversal_category;
-// typedef typename hds_traits<HDS>::forward_category forward_category;
-// typedef typename hds_traits<HDS>::backward_category backward_category;
-// void constraints() {
-// using namespace boost;
-// function_requires<BidirectionalHDSConcept<HDS> >();
-// function_requires<MutableForwardHDSConcept<HDS> >();
-// function_requires<MutableBackwardHDSConcept<HDS> >();
-// function_requires<ConvertibleConcept<traversal_category,
-// bidirectional_traversal_tag> >();
-// }
-// void const_constraints(HDS const& hds) {
-// }
-// MutableBidirectionalHDS hds;
-// };
+// template <class HDS>
+// struct MutableBidirectionalHDSConcept {
+// typedef typename hds_traits<HDS>::halfedge_descriptor halfedge_descriptor;
+// typedef typename hds_traits<HDS>::traversal_category traversal_category;
+// typedef typename hds_traits<HDS>::forward_category forward_category;
+// typedef typename hds_traits<HDS>::backward_category backward_category;
+// void constraints() {
+// using namespace boost;
+// function_requires<BidirectionalHDSConcept<HDS> >();
+// function_requires<MutableForwardHDSConcept<HDS> >();
+// function_requires<MutableBackwardHDSConcept<HDS> >();
+// function_requires<ConvertibleConcept<traversal_category,
+// bidirectional_traversal_tag> >();
+// }
+// void const_constraints(HDS const& hds) {
+// }
+// MutableBidirectionalHDS hds;
+// };
 //..
 
 #ifndef BOOST_HDSTL_CONCEPTS_MUTABLE_BIDIRECTIONAL_HDS_CONCEPT_HPP
@@ -134,7 +129,7 @@
             function_requires<MutableForwardHDSConcept<HDS> >();
             function_requires<MutableBackwardHDSConcept<HDS> >();
             function_requires<ConvertibleConcept<traversal_category,
- bidirectional_traversal_tag> >();
+ bidirectional_traversal_tag> >();
         }
 
         // ACCESSORS

Modified: sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/mutable_facet_hds_concept.hpp
==============================================================================
--- sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/mutable_facet_hds_concept.hpp (original)
+++ sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/mutable_facet_hds_concept.hpp 2007-06-26 02:06:52 EDT (Tue, 26 Jun 2007)
@@ -38,30 +38,26 @@
 ///----------------
 // None besides the types in the 'MutableHDS' and 'FacetHDS' concepts.
 //
-///Definitions
-///-----------
-// Same as the definitions in the 'MutableHDS' and 'FacetHDS' concepts.
-//
 ///Valid Expressions
 ///-----------------
 // In addition to the valid expressions of the 'FacetHDS' and the
 // 'MutableHDS' concepts:
-// - 'set_facet(hds,h,f)' sets the facet descriptor value of 'h' to 'f'.
+// - 'set_facet(h, f, hds)' sets the facet descriptor value of 'h' to 'f'.
 // - 'new_facet(hds)' creates a new facet 'f' in data structure 'hds'.
-// - 'remove_facet(hds,f)' removes the facet 'f' from the 'hds' data structure.
+// - 'remove_facet(f, hds)' removes the facet 'f' from the 'hds' data structure.
 //
 ///Expression Semantics
 ///--------------------
 // In addition to the expression semantics of the 'FacetHDS' and the
 // 'MutableHDS' concepts.
-// - 'set_facet(hds,h,f)' sets the facet descriptor value of 'h' to 'f' for a
+// - 'set_facet(h, f, hds)' sets the facet descriptor value of 'h' to 'f' for a
 // single halfedge in the 'hds' data structure.
 // - 'new_facet(hds)' creates a new facet 'f' data structure 'hds'
 // and returns the facet descriptor of this new facet.
 // By this operation the facet is added but no connections to the halfedges
-// are set. In order to assign facets to halfedges 'set_facet(hds,h,f)'
+// are set. In order to assign facets to halfedges 'set_facet(h, f, hds)'
 // operation should be used.
-// - 'remove_facet(hds,f)' removes the facet 'f' from the 'hds' data
+// - 'remove_facet(f, hds)' removes the facet 'f' from the 'hds' data
 // structure. All 'facet_descriptors' related to this facet will be
 // invalidated after this call.
 //
@@ -69,9 +65,9 @@
 ///---------------------
 // In addition to the complexity guarantees of the 'FacetHDS' and the
 // 'MutableHDS' concepts.
-// - 'set_facet(hds,h,f)' : amortized constant time.
+// - 'set_facet(h, f, hds)' : amortized constant time.
 // - 'new_facet(hds)': amortized constant time.
-// - 'remove_facet(hds,f)': amortized constant time.
+// - 'remove_facet(f, hds)': amortized constant time.
 //
 ///Invariants
 ///----------
@@ -81,26 +77,27 @@
 ///Concept-checking class
 ///----------------------
 //..
-// template <class HDS>
-// struct MutableFacetHDSConcept {
-// typedef typename hds_traits<HDS>::facet_descriptor facet_descriptor;
-// void constraints() {
-// using namespace boost;
-// function_requires<HDSConcept>();
-// function_requires<DefaultConstructibleConcept<facet_descriptor> >();
-// function_requires<CopyConstructibleConcept<facet_descriptor> >();
-// function_requires<EqualityComparableConcept<facet_descriptor> >();
-// function_requires<AssignableConcept<facet_descriptor> >();
-// set_facet(hds,h,f);
-// f = new_facet(hds);
-// remove_facet(hds,f);
-// }
-// void const_constraints(HDS const& hds) {
-// }
-// HDS hds;
-// halfedge_descriptor h;
-// facet_descriptor f;
-// };
+// template <class HDS>
+// struct MutableFacetHDSConcept {
+// typedef typename hds_traits<HDS>::facet_descriptor facet_descriptor;
+// void constraints() {
+// using namespace boost;
+// function_requires<HDSConcept>();
+// function_requires<DefaultConstructibleConcept<facet_descriptor> >();
+// function_requires<CopyConstructibleConcept<facet_descriptor> >();
+// function_requires<EqualityComparableConcept<facet_descriptor> >();
+// function_requires<AssignableConcept<facet_descriptor> >();
+//
+// set_facet(h, f, hds);
+// f = new_facet(hds);
+// remove_facet(f, hds);
+// }
+// void const_constraints(HDS const& hds) {
+// }
+// HDS hds;
+// halfedge_descriptor h;
+// facet_descriptor f;
+// };
 //..
 
 #ifndef BOOST_HDSTL_CONCEPTS_MUTABLE_FACET_HDS_CONCEPT_HPP
@@ -144,9 +141,10 @@
            function_requires<CopyConstructibleConcept<facet_descriptor> >();
            function_requires<EqualityComparableConcept<facet_descriptor> >();
            function_requires<AssignableConcept<facet_descriptor> >();
- set_facet(hds,h,f);
+
+ set_facet(h, f, hds);
            f = new_facet(hds);
- delete_facet(hds,f);
+ delete_facet(f, hds);
            const_constraints(hds);
        }
 

Modified: sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/mutable_forward_hds_concept.hpp
==============================================================================
--- sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/mutable_forward_hds_concept.hpp (original)
+++ sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/mutable_forward_hds_concept.hpp 2007-06-26 02:06:52 EDT (Tue, 26 Jun 2007)
@@ -38,32 +38,28 @@
 ///----------------
 // None besides the types in the 'MutableHDS' and the 'ForwardHDS' concepts.
 //
-///Definitions
-///-----------
-// Same as the definitions in the 'MutableHDS' and the 'ForwardHDS' concepts.
-//
 ///Valid Expressions
 ///-----------------
 // In addition to the valid expressions of the 'MutableHDS' and the
 // 'ForwardHDS' concepts:
-// - 'set_next_in_facet(hds,h,g)' sets 'g' as the 'next_in_facet' value of
+// - 'set_next_in_facet(h, g, hds)' sets 'g' as the 'next_in_facet' value of
 // 'h'.
-// - 'set_next_at_source(hds,h,g)' sets 'g' as the 'next_at_source' value of
+// - 'set_next_at_source(h, g, hds)' sets 'g' as the 'next_at_source' value of
 // 'h'.
-// - 'set_next_at_target(hds,h,g)' sets 'g' as the 'next_at_target' value of
+// - 'set_next_at_target(h, g, hds)' sets 'g' as the 'next_at_target' value of
 // 'h'.
 //
 ///Expression Semantics
 ///--------------------
 // In addition to the expression semantics of the 'MutableHDS' and the
 // 'ForwardHDS' concepts:
-// - 'set_next_in_facet(hds,h,g)' sets 'g' as the halfedge
+// - 'set_next_in_facet(h, g, hds)' sets 'g' as the halfedge
 // succeeding 'h' in the adjacent facet cycle, when facet cycles are
 // oriented in counter-clockwise order.
-// - 'set_next_at_source(hds,h,g)' sets 'g' as the halfedge
+// - 'set_next_at_source(h, g, hds)' sets 'g' as the halfedge
 // succeeding 'h' around the source vertex of 'h', when halfedges are
 // ordered around a given vertex in clockwise order.
-// - 'set_next_at_target(hds,h,g)' sets 'g' as the halfedge
+// - 'set_next_at_target(h, g, hds)' sets 'g' as the halfedge
 // succeeding 'h' around the target vertex of 'h', when halfedges are
 // ordered around a given vertex in clockwise order.
 //
@@ -71,9 +67,9 @@
 ///---------------------
 // In addition to the complexity guarantees of the 'MutableHDS' and the
 // 'ForwardHDS' concepts:
-// - 'set_next_in_facet(hds,h,g)': amortized constant time.
-// - 'set_next_at_source(hds,h,g)': amortized constant time.
-// - 'set_next_at_target(hds,h,g)': amortized constant time.
+// - 'set_next_in_facet(h, g, hds)': amortized constant time.
+// - 'set_next_at_source(h, g, hds)': amortized constant time.
+// - 'set_next_at_target(h, g, hds)': amortized constant time.
 //
 ///Invariants
 ///----------
@@ -93,9 +89,10 @@
 // using namespace boost;
 // function_requires<ForwardHDSConcept<HDS> >();
 // function_requires<MutableHDSConcept<HDS> >();
-// set_next_in_facet(hds,h,g);
-// set_next_at_source(hds,h,g);
-// set_next_at_target(hds,h,g);
+//
+// set_next_in_facet(h, g, hds);
+// set_next_at_source(h, g, hds);
+// set_next_at_target(h, g, hds);
 // const_constraints(hds);
 // }
 // void const_constraints(HDS const& hds)
@@ -149,10 +146,9 @@
             function_requires<ForwardHDSConcept<HDS> >();
             function_requires<MutableHDSConcept<HDS> >();
 
- set_next_in_facet(hds,h,g);
- set_next_at_source(hds,h,g);
- set_next_at_target(hds,h,g);
-
+ set_next_in_facet(h, g, hds);
+ set_next_at_source(h, g, hds);
+ set_next_at_target(h, g, hds);
             const_constraints(hds);
         }
 

Modified: sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/mutable_hds_concept.hpp
==============================================================================
--- sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/mutable_hds_concept.hpp (original)
+++ sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/mutable_hds_concept.hpp 2007-06-26 02:06:52 EDT (Tue, 26 Jun 2007)
@@ -31,36 +31,28 @@
 //
 ///Notation
 ///--------
-// - 'HDS' A type that is a model of 'MutableHDSConcept'
-// - 'hds' A modifiable instance of 'HDS'
-// - 'h', h1','h2'
-// Halfedge descriptors, of type 'hds_traits<HDS>::halfedge_descriptor'
+// - 'HDS' A type that is a model of 'MutableHDSConcept'
+// - 'hds' A modifiable instance of 'HDS'
+// - 'h' Halfedge descriptors, of type 'hds_traits<HDS>::halfedge_descriptor'
 //
 ///Associated types
 ///----------------
 // None besides the types of the 'HDS' concept,
 //
-///Definitions
-///-----------
-// Same as the definitions of the 'HDS' concept,
-//
 ///Valid Expressions
 ///-----------------
 // In addition to the valid expressions of the 'HDS' concept:
-// - 'set_opposite(hds,h1,h2)'
 // - 'h = new_edge(hds)'
-// - 'delete_edge(hds,h)'
+// - 'delete_edge(h, hds)'
 //
 ///Expression Semantics
 ///--------------------
 // In addition to the expression semantics of the 'HDS' concept:
-// - 'set_opposite(hds,h1,h2)' sets 'h1' and 'h2' as opposites of each other
-// in the data structure 'hds'.
-// - 'new_edge(hds)' creates a new edge in data structure 'hds', and
+// - 'new_edge(hds)' creates a pair of opposite halfedges in 'hds', and
 // returns the halfedge descriptor of one of the two halfedges created.
-// The other new halfedge can be obtained using 'opposite(hds,h)'.
+// The other new halfedge can be obtained using 'opposite(h, hds)'.
 // Note that halfedges can only be created in opposite pairs.
-// - 'delete_edge(hds,h)' removes the halfedges 'h' and 'opposite(hds,h)'
+// - 'delete_edge(h, hds)' removes the halfedges 'h' and 'opposite(h, hds)'
 // from the data structure 'hds'. Note that only the halfedges that form
 // a pair by validating the 'opposite' function can be deleted by this
 // method.
@@ -68,9 +60,8 @@
 ///Complexity guarantees
 ///---------------------
 // In addition to the complexity guarantees of the 'HDS' concept:
-// - 'set_opposite(hds,h1,h2)': amortized constant time.
 // - 'new_edge(hds)': amortized constant time.
-// - 'delete_edge(hds,h)' : amortized constant time.
+// - 'delete_edge(h, hds)' : amortized constant time.
 //
 ///Invariants
 ///----------
@@ -85,15 +76,15 @@
 // void constraints() {
 // using namespace boost;
 // function_requires<HDSConcept<HDS> >();
-// set_opposite(hds,h1,h2);
+//
 // h = new_edge(hds);
-// delete_edge(hds,h);
+// delete_edge(h, hds);
 // const_constraints(hds);
 // }
 // void const_constraints(HDS const& hds) {
 // }
 // HDS hds;
-// halfedge_descriptor h,h1,h2;
+// halfedge_descriptor h;
 // };
 //..
 
@@ -136,9 +127,8 @@
             using namespace boost;
             function_requires<HDSConcept<HDS> >();
 
- set_opposite(hds,h1,h2);
             h = new_edge(hds);
- delete_edge(hds,h);
+ delete_edge(h, hds);
             const_constraints(hds);
         }
 
@@ -151,8 +141,8 @@
 
         private:
         // DATA
- HDS hds; // a halfedge data structure object
- halfedge_descriptor h,h1,h2; // halfedge descriptors
+ HDS hds; // a halfedge data structure object
+ halfedge_descriptor h; // a halfedge descriptor
    };
 
 } // close namespace concepts

Modified: sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/mutable_vertex_hds_concept.hpp
==============================================================================
--- sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/mutable_vertex_hds_concept.hpp (original)
+++ sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/mutable_vertex_hds_concept.hpp 2007-06-26 02:06:52 EDT (Tue, 26 Jun 2007)
@@ -38,15 +38,11 @@
 ///----------------
 // None besides the types in the 'VertexHDS' and the 'MutableHDS' concepts.
 //
-///Definitions
-///-----------
-// Same as the definitions in the 'VertexHDS' and the 'MutableHDS' concepts.
-//
 ///Valid Expressions
 ///-----------------
 // In addition to the valid expressions of the 'VertexHDS' and the
 // 'MutableHDS' concepts:
-// - 'set_vertex(hds,h,v)' sets the source vertex descriptor value of 'h' to
+// - 'set_vertex(h, v, hds)' sets the source vertex descriptor value of 'h' to
 // 'v'.
 // - 'new_vertex(hds)' adds a new vertex 'v' to the 'hds' data structure
 // and returns the vertex descriptor to this new vertex.
@@ -57,21 +53,21 @@
 ///--------------------
 // In addition to the expression semantics of the 'VertexHDS' and the
 // 'MutableHDS' concepts:
-// - 'set_vertex(hds,h,v)' sets the source vertex descriptor value of 'h' to
+// - 'set_vertex(h, v, hds)' sets the source vertex descriptor value of 'h' to
 // 'v' for a single halfedge in the 'hds' data structure.
 // - 'new_vertex(hds)' adds a new vertex 'v' to the 'hds' data structure.
 // By this operation the vertex is added but no connections to the halfedges
-// are set. In order to assign vertces to halfedges 'set_vertex(hds,h,v)'
+// are set. In order to assign vertces to halfedges 'set_vertex(h, v, hds)'
 // operation should be used.
 // - 'remove_vertex(hds,v)' removes the vertex 'v' from the 'hds' data
-// structure. All 'vertex_descriptors' related to this vertex will be
-// invalidated after this call.
+// structure. All 'vertex_descriptor's related to this vertex will be
+// invalidated after this call.
 //
 ///Complexity guarantees
 ///---------------------
 // In addition to the complexity guarantees of the 'VertexHDS' and the
 // 'MutableHDS' concepts:
-// - 'set_vertex(hds,h,v)': amortized constant time.
+// - 'set_vertex(h, v, hds)': amortized constant time.
 // - 'new_vertex(hds)': amortized constant time.
 // - 'remove_vertex(hds,v)': amortized constant time.
 //
@@ -83,28 +79,29 @@
 ///Concept-checking class
 ///----------------------
 //..
-// template <class HDS>
-// struct MutableVertexHDSConcept {
-// typedef typename hds_traits<HDS>::vertex_descriptor vertex_descriptor;
-// void constraints() {
-// using namespace boost;
-// function_requires<HDSConcept>();
-// function_requires<VertexHDSConcept>();
-// function_requires<DefaultConstructibleConcept<vertex_descriptor> >();
-// function_requires<CopyConstructibleConcept<vertex_descriptor> >();
-// function_requires<EqualityComparableConcept<vertex_descriptor> >();
-// function_requires<AssignableConcept<vertex_descriptor> >();
-// set_vertex(hds,h,v);
-// v = new_vertex(hds);
-// remove_vertex(hds,h,v);
-// const_constraints(hds);
-// }
-// void const_constraints(HDS const& hds) {
-// }
-// HDS hds;
-// halfedge_descriptor h;
-// vertex_descriptor v;
-// };
+// template <class HDS>
+// struct MutableVertexHDSConcept {
+// typedef typename hds_traits<HDS>::vertex_descriptor vertex_descriptor;
+// void constraints() {
+// using namespace boost;
+// function_requires<HDSConcept>();
+// function_requires<VertexHDSConcept>();
+// function_requires<DefaultConstructibleConcept<vertex_descriptor> >();
+// function_requires<CopyConstructibleConcept<vertex_descriptor> >();
+// function_requires<EqualityComparableConcept<vertex_descriptor> >();
+// function_requires<AssignableConcept<vertex_descriptor> >();
+//
+// set_vertex(h, v, hds);
+// v = new_vertex(hds);
+// remove_vertex(h, v, hds);
+// const_constraints(hds);
+// }
+// void const_constraints(HDS const& hds) {
+// }
+// HDS hds;
+// halfedge_descriptor h;
+// vertex_descriptor v;
+// };
 //..
 
 #ifndef BOOST_HDSTL_CONCEPTS_MUTABLE_VERTEX_HDS_CONCEPT_HPP
@@ -150,7 +147,7 @@
             function_requires<EqualityComparableConcept<vertex_descriptor> >();
             function_requires<AssignableConcept<vertex_descriptor> >();
 
- set_vertex(hds,h,v);
+ set_vertex(h, v, hds);
             v = new_vertex(hds);
             remove_vertex(hds,v);
 

Modified: sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/vertex_hds_concept.hpp
==============================================================================
--- sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/vertex_hds_concept.hpp (original)
+++ sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/vertex_hds_concept.hpp 2007-06-26 02:06:52 EDT (Tue, 26 Jun 2007)
@@ -41,32 +41,33 @@
 ///Definitions
 ///-----------
 // In addition to the definitions in the 'HDS' concept:
-// - 'halfedge_descriptor' is a type that contains information to access
-// the halfedge. (See the 'HDSConcept' for a full definition.)
 // - 'vertex_descriptor' is a type that contains information to access the
 // vertex at the source or the target of the halfedge.
 //
 ///Valid Expressions
 ///-----------------
 // In addition to the valid expressions of the 'HDS' concept:
-// - 'vertex(hds,h)' must return a value assignable to 'v'.
+// - 'source(h, hds)' must return a value assignable to 'v'.
+// - 'target(h, hds)' must return a value assignable to 'v'.
 //
 ///Expression Semantics
 ///--------------------
 // In addition to the expressions semantics of the 'HDS' concept:
-// - 'hds_traits<HDS>::supports_vertices': must compare equal to 'true'.
-// - 'vertex(hds,h)' returns the vertex descriptor of the vertex to the
-// source or target of 'h', depending on the 'source_access_tag' and
-// 'target_access_tag'.
+// - 'hds_traits<HDS>::supports_vertices' must compare equal to 'true'.
+// - 'source(h, hds)' returns the source vertex descriptor of 'h'.
+// - 'target(h, hds)' returns the source vertex descriptor of 'h'.
 //
 ///Complexity guarantees
 ///---------------------
 // In addition to the complexity guarantees of the 'HDS' concept:
-// - 'vertex(hds,h)': amortized constant time.
+// - 'source(h, hds)': amortized constant time.
+// - 'target(h, hds)': amortized constant time.
 //
 ///Invariants
 ///----------
-// 'VertexHDSConcept' should validate all the invariants for the 'HDSConcept'.
+// In addition to the invariants of the 'HDS' concept, for all valid halfedge
+// descriptor 'h', the following should hold:
+// - 'target(h, hds) == source(opposite(h, hds), hds)'
 //
 ///Concept-checking class
 ///----------------------
@@ -76,17 +77,20 @@
 // typedef typename hds_traits<HDS>::vertex_descriptor vertex_descriptor;
 // void constraints() {
 // using namespace boost;
-// function_requires<HDSConcept>();
+// function_requires<HDSConcept<HDS> >();
 // function_requires<DefaultConstructibleConcept<vertex_descriptor> >();
 // function_requires<CopyConstructibleConcept<vertex_descriptor> >();
 // function_requires<EqualityComparableConcept<vertex_descriptor> >();
 // function_requires<AssignableConcept<vertex_descriptor> >();
+//
 // BOOST_STATIC_ASSERT(hds_traits<HDS>::supports_vertices);
-// v = vertex(hds,h);
+// v = source(h, hds);
+// v = target(h, hds);
 // const_constraints(hds);
 // }
 // void const_constraints(HDS const& hds) {
-// v = vertex(hds,h);
+// v = source(h, hds);
+// v = target(h, hds);
 // }
 // HDS hds;
 // vertex_descriptor v;
@@ -127,14 +131,15 @@
             // constraints of 'VertexHDSConcept' on page [vertexhdsconcept].
         {
             using namespace boost;
- function_requires<HDSConcept>();
+ function_requires<HDSConcept<HDS> >();
             function_requires<DefaultConstructibleConcept<vertex_descriptor> >();
             function_requires<CopyConstructibleConcept<vertex_descriptor> >();
             function_requires<EqualityComparableConcept<vertex_descriptor> >();
             function_requires<AssignableConcept<vertex_descriptor> >();
             BOOST_STATIC_ASSERT(hds_traits<HDS>::supports_vertices);
 
- v = vertex(hds,h);
+ v = source(h, hds);
+ v = target(h, hds);
             const_constraints(hds);
         }
 
@@ -143,13 +148,14 @@
             // Check that the non-modifiable 'HDS' template parameters
             // satisfies all the constraints of 'VertexHDSConcept'.
         {
- v = vertex(hds,h);
+ v = source(h, hds);
+ v = target(h, hds);
         }
 
       private:
         //DATA
- VertexHDS hds; // a halfedge data structure object
- vertex_descriptor f; // a vertex descriptor
+ HDS hds; // a halfedge data structure object
+ vertex_descriptor v; // a vertex descriptor
    };
 
 } // close namespace concepts

Modified: sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/vertex_list_hds_concept.hpp
==============================================================================
--- sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/vertex_list_hds_concept.hpp (original)
+++ sandbox/SOC/2007/geometry/libs/hdstl/dev/hds_concepts/vertex_list_hds_concept.hpp 2007-06-26 02:06:52 EDT (Tue, 26 Jun 2007)
@@ -31,7 +31,7 @@
 // - 'HDS' A type that is a model of VertexListHDSConcept
 // - 'hds' A non-modifiable instance of HDS
 // - 'v' Vertex descriptor, of type 'hds_traits<HDS>::vertex_descriptor'
-// - 'p' Vertex iterator, of type 'hds_traits<HDS>::vertex_iterator'
+// - 'vit' Vertex iterator, of type 'hds_traits<HDS>::vertex_iterator'
 // - 'n' Vertex list size, of type 'hds_traits<HDS>::size_type'
 //
 ///Associated types
@@ -51,8 +51,9 @@
 ///Valid Expressions
 ///-----------------
 // In addition to the valid expressions of the 'VertexHDS' concept:
-// - 'vertices_begin(hds)' must return a value assignable to 'p'.
-// - 'vertices_end(hds)' must return a value assignable to 'p'.
+// - 'vertices_begin(hds)' must return a value assignable to 'vit'.
+// - 'vertices_end(hds)' must return a value assignable to 'vit'.
+// - '*vit' must return a value assignable to 'v'.
 // - 'num_vertices(hds)' must return a value assignable to 'n'.
 //
 ///Expression Semantics
@@ -62,6 +63,7 @@
 // beginning of the "vertex list".
 // - 'vertices_end(hds)' returns a 'vertex_iterator' 'p' pointing to the
 // end of the "vertex list".
+// - '*vit' returns a descriptor to the vertex 'v' pointed to by 'vit'.
 // - 'num_vertices(hds)' returns the number of vertices in the 'HDS' data
 // structure.
 //
@@ -70,6 +72,7 @@
 // In addition to the complexity guarantees of the 'VertexHDS' concept:
 // - 'vertices_begin(hds)': amortized constant time.
 // - 'vertices_end(hds)': amortized constant time.
+// - '*vit': worst-case constant time.
 // - 'num_vertices(hds)': amortized constant time.
 //
 ///Invariants
@@ -88,19 +91,21 @@
 // void constraints()
 // {
 // using namespace boost;
-// function_requires<HDSConcept>();
-// function_requires<DefaultConstructibleConcept<vertex_descriptor> >();
-// function_requires<CopyConstructibleConcept<vertex_descriptor> >();
-// function_requires<EqualityComparableConcept<vertex_descriptor> >();
-// function_requires<AssignableConcept<vertex_descriptor> >();
+// function_requires<VertexHDSConcept<HDS> >();
 // function_requires<ForwardIteratorConcept<vertex_iterator> >();
 // function_requires<ConvertibleConcept<size_type,int> >();
+
+// b = vertices_begin(hds);
+// e = vertices_end(hds);
+// v = *b;
+// n = num_vertices(hds);
 // const_constraints(hds);
 // }
 // void const_constraints(HDS const& hds)
 // {
 // b = vertices_begin(hds);
 // e = vertices_end(hds);
+// v = *b;
 // n = num_vertices(hds);
 // }
 // private:
@@ -150,13 +155,14 @@
            // [vertexlisthdsconcept].
        {
            using namespace boost;
- function_requires<HDSConcept>();
- function_requires<DefaultConstructibleConcept<vertex_descriptor> >();
- function_requires<CopyConstructibleConcept<vertex_descriptor> >();
- function_requires<EqualityComparableConcept<vertex_descriptor> >();
- function_requires<AssignableConcept<vertex_descriptor> >();
+ function_requires<VertexHDSConcept<HDS> >();
            function_requires<ForwardIteratorConcept<vertex_iterator> >();
            function_requires<ConvertibleConcept<size_type,int> >();
+
+ b = vertices_begin(hds);
+ e = vertices_end(hds);
+ v = *b;
+ n = num_vertices(hds);
            const_constraints(hds);
        }
 
@@ -167,15 +173,16 @@
        {
            b = vertices_begin(hds);
            e = vertices_end(hds);
+ v = *b;
            n = num_vertices(hds);
        }
 
      private:
        //DATA
- VertexListHDS hds; // a halfedge data structure object
+ HDS hds; // a halfedge data structure object
        vertex_descriptor v; // a vertex descriptor
        vertex_iterator b,e; // a vertex iterators
- size_type n; // vertex size type
+ size_type n; // vertex size type
 
    };
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk