diff --git a/Packages/Polytope_distance_d/doc_tex/Optimisation/Optimisation_ref/Polytope_distance_d.tex b/Packages/Polytope_distance_d/doc_tex/Optimisation/Optimisation_ref/Polytope_distance_d.tex index 256bbd78a77..d4335ca7687 100644 --- a/Packages/Polytope_distance_d/doc_tex/Optimisation/Optimisation_ref/Polytope_distance_d.tex +++ b/Packages/Polytope_distance_d/doc_tex/Optimisation/Optimisation_ref/Polytope_distance_d.tex @@ -58,12 +58,11 @@ operation. \ccRequirements \ccIndexRequirements -The template parameter \ccc{Traits} is a model for -\ccc{Polytope_distance_d_traits}. +The template parameter \ccc{Traits} is a model for \ccc{Optimisation_d_traits}. -We provide the models \ccc{Polytope_distance_d_traits_2}, -\ccc{Polytope_distance_d_traits_3}, and \ccc{Polytope_distance_d_traits_d} -using the two-, three-, and $d$-dimensional \cgal~kernel, respectively. +We provide the models \ccc{Optimisation_d_traits_2}, +\ccc{Optimisation_d_traits_3}, and \ccc{Optimisation_d_traits_d} using the +two-, three-, and $d$-dimensional \cgal~kernel, respectively. % ----------------------------------------------------------------------------- \ccTypes @@ -409,10 +408,10 @@ An object \ccVar\ is valid, iff % ----------------------------------------------------------------------------- \ccSeeAlso -\ccRefIdfierPage{CGAL::Polytope_distance_d_traits_2}\\ -\ccRefIdfierPage{CGAL::Polytope_distance_d_traits_3}\\ -\ccRefIdfierPage{CGAL::Polytope_distance_d_traits_d}\\[1ex] -\ccRefConceptPage{Polytope_distance_d_traits} +\ccRefIdfierPage{CGAL::Optimisation_d_traits_2}\\ +\ccRefIdfierPage{CGAL::Optimisation_d_traits_3}\\ +\ccRefIdfierPage{CGAL::Optimisation_d_traits_d}\\[1ex] +\ccRefConceptPage{Optimisation_d_traits} % ----------------------------------------------------------------------------- \ccImplementation diff --git a/Packages/Polytope_distance_d/doc_tex/Optimisation/Optimisation_ref/main_Polytope_distance_d.tex b/Packages/Polytope_distance_d/doc_tex/Optimisation/Optimisation_ref/main_Polytope_distance_d.tex index 992cbb216a8..2aa1ad409df 100644 --- a/Packages/Polytope_distance_d/doc_tex/Optimisation/Optimisation_ref/main_Polytope_distance_d.tex +++ b/Packages/Polytope_distance_d/doc_tex/Optimisation/Optimisation_ref/main_Polytope_distance_d.tex @@ -18,10 +18,4 @@ \inputOpt{Polytope_distance_d} -\inputOpt{Polytope_distance_d_traits_2} -\inputOpt{Polytope_distance_d_traits_3} -\inputOpt{Polytope_distance_d_traits_d} - -\inputOpt{Polytope_distance_d_traits} - % ===== EOF =================================================================== diff --git a/Packages/Polytope_distance_d/doc_tex/basic/Optimisation/Optimisation_ref/Polytope_distance_d.tex b/Packages/Polytope_distance_d/doc_tex/basic/Optimisation/Optimisation_ref/Polytope_distance_d.tex index 256bbd78a77..d4335ca7687 100644 --- a/Packages/Polytope_distance_d/doc_tex/basic/Optimisation/Optimisation_ref/Polytope_distance_d.tex +++ b/Packages/Polytope_distance_d/doc_tex/basic/Optimisation/Optimisation_ref/Polytope_distance_d.tex @@ -58,12 +58,11 @@ operation. \ccRequirements \ccIndexRequirements -The template parameter \ccc{Traits} is a model for -\ccc{Polytope_distance_d_traits}. +The template parameter \ccc{Traits} is a model for \ccc{Optimisation_d_traits}. -We provide the models \ccc{Polytope_distance_d_traits_2}, -\ccc{Polytope_distance_d_traits_3}, and \ccc{Polytope_distance_d_traits_d} -using the two-, three-, and $d$-dimensional \cgal~kernel, respectively. +We provide the models \ccc{Optimisation_d_traits_2}, +\ccc{Optimisation_d_traits_3}, and \ccc{Optimisation_d_traits_d} using the +two-, three-, and $d$-dimensional \cgal~kernel, respectively. % ----------------------------------------------------------------------------- \ccTypes @@ -409,10 +408,10 @@ An object \ccVar\ is valid, iff % ----------------------------------------------------------------------------- \ccSeeAlso -\ccRefIdfierPage{CGAL::Polytope_distance_d_traits_2}\\ -\ccRefIdfierPage{CGAL::Polytope_distance_d_traits_3}\\ -\ccRefIdfierPage{CGAL::Polytope_distance_d_traits_d}\\[1ex] -\ccRefConceptPage{Polytope_distance_d_traits} +\ccRefIdfierPage{CGAL::Optimisation_d_traits_2}\\ +\ccRefIdfierPage{CGAL::Optimisation_d_traits_3}\\ +\ccRefIdfierPage{CGAL::Optimisation_d_traits_d}\\[1ex] +\ccRefConceptPage{Optimisation_d_traits} % ----------------------------------------------------------------------------- \ccImplementation diff --git a/Packages/Polytope_distance_d/doc_tex/basic/Optimisation/Optimisation_ref/main_Polytope_distance_d.tex b/Packages/Polytope_distance_d/doc_tex/basic/Optimisation/Optimisation_ref/main_Polytope_distance_d.tex index 992cbb216a8..2aa1ad409df 100644 --- a/Packages/Polytope_distance_d/doc_tex/basic/Optimisation/Optimisation_ref/main_Polytope_distance_d.tex +++ b/Packages/Polytope_distance_d/doc_tex/basic/Optimisation/Optimisation_ref/main_Polytope_distance_d.tex @@ -18,10 +18,4 @@ \inputOpt{Polytope_distance_d} -\inputOpt{Polytope_distance_d_traits_2} -\inputOpt{Polytope_distance_d_traits_3} -\inputOpt{Polytope_distance_d_traits_d} - -\inputOpt{Polytope_distance_d_traits} - % ===== EOF =================================================================== diff --git a/Packages/Polytope_distance_d/web/Polytope_distance_d.aw b/Packages/Polytope_distance_d/web/Polytope_distance_d.aw index 0abdef7ed84..42521b76027 100644 --- a/Packages/Polytope_distance_d/web/Polytope_distance_d.aw +++ b/Packages/Polytope_distance_d/web/Polytope_distance_d.aw @@ -107,7 +107,7 @@ \newlength{\defaultparskip} \setlength{\defaultparskip}{\parskip} -\setlength{\parskip}{.7ex} +\setlength{\parskip}{1ex} \tableofcontents @@ -171,7 +171,7 @@ value of the objective function at $x^*$. \emph{Note:} Below some references are undefined, they refer to sections in the \cgal\ Reference Manual. -@p maximum_input_line_length = 87 +@p maximum_input_line_length = 102 @! ---------------------------------------------------------------------------- @! Class: Polytope_distance_d @@ -181,35 +181,11 @@ in the \cgal\ Reference Manual. \input{../doc_tex/basic/Optimisation/Optimisation_ref/Polytope_distance_d.tex} @! ---------------------------------------------------------------------------- -@! Class: Polytope_distance_d_traits_2 +@! Concept: Optimisation_d_traits @! ---------------------------------------------------------------------------- -\subsectionRef{Class}{% - CGAL::Polytope\_distance\_d\_traits\_2\texttt{<}R,ET,NT\texttt{>}} -\input{../doc_tex/basic/Optimisation/Optimisation_ref/Polytope_distance_d_traits_2.tex} - -@! ---------------------------------------------------------------------------- -@! Class: Polytope_distance_d_traits_3 -@! ---------------------------------------------------------------------------- - -\subsectionRef{Class}{% - CGAL::Polytope\_distance\_d\_traits\_3\texttt{<}R,ET,NT\texttt{>}} -\input{../doc_tex/basic/Optimisation/Optimisation_ref/Polytope_distance_d_traits_3.tex} - -@! ---------------------------------------------------------------------------- -@! Class: Polytope_distance_d_traits_d -@! ---------------------------------------------------------------------------- - -\subsectionRef{Class}{% - CGAL::Polytope\_distance\_d\_traits\_d\texttt{<}R,ET,NT\texttt{>}} -\input{../doc_tex/basic/Optimisation/Optimisation_ref/Polytope_distance_d_traits_d.tex} - -@! ---------------------------------------------------------------------------- -@! Concept: Polytope_distance_d_traits -@! ---------------------------------------------------------------------------- - -\subsectionRef{Concept}{Polytope\_distance\_d\_traits} -\input{../doc_tex/basic/Optimisation/Optimisation_ref/Polytope_distance_d_traits.tex} +\subsectionRef{Concept}{Optimisation\_d\_traits} +\input{../../Optimisation_basic/doc_tex/basic/Optimisation/Optimisation_ref/Optimisation_d_traits.tex} @p maximum_input_line_length = 80 @@ -229,12 +205,8 @@ in the \cgal\ Reference Manual. CGAL::Polytope\_distance\_d\texttt{<}Traits\texttt{>}} The class template \ccc{Polytope_distance_d} expects a model of the concept -\ccc{Polytope_distance_d_traits} (see -Section~\ref{ccRef_Polytope_distance_d_traits}.1) as its template argument. -Available models are described in -Sections~\ref{sec:Polytope_distance_d_traits_2}, -\ref{sec:Polytope_distance_d_traits_3}, -and~\ref{sec:Polytope_distance_d_traits_d} below. +\ccc{Optimisation_d_traits} (see +Section~\ref{ccRef_Optimisation_d_traits}.2) as its template argument. @macro += @begin template < class Traits_ > @@ -242,8 +214,8 @@ and~\ref{sec:Polytope_distance_d_traits_d} below. @end The interface consists of the public types and member functions described -in Section~\ref{ccRef_CGAL::Polytope_distance_d}.2 and of some private -types, private member functions, and data members. +in Section~\ref{ccRef_CGAL::Polytope_distance_d}.1 and of some +private types, private member functions, and data members. @macro = @begin template < class Traits_ > @@ -1415,222 +1387,6 @@ realizing the distance. @end -@! ============================================================================ -@! Traits Class Models -@! ============================================================================ - -\clearpage -\section{Traits Class Models} \label{sec:traits_class_models} - -@! ---------------------------------------------------------------------------- -@! The Class Template CGAL::Polytope_distance_d_traits_2 -@! ---------------------------------------------------------------------------- - -\subsection{The Class Template \ccFont - CGAL::Polytope\_distance\_d\_traits\_2\texttt{<}R,ET,NT\texttt{>}} -\label{sec:Polytope_distance_d_traits_2} - -The first template argument of \ccc{Polytope_distance_d_traits_2} is -expected to be a \cgal\ representation class. The second and third -template argument are expected to be number types fulfilling the -requirements of a \cgal\ number type. They have default type -\ccc{R::RT}. - -@macro = @begin - template < class R_, class ET_ = CGAL_TYPENAME_MSVC_NULL R_::RT, - class NT_ = CGAL_TYPENAME_MSVC_NULL R_::RT > - class Polytope_distance_d_traits_2; -@end - -The interface consists of the types and member functions described in -Section~\ref{ccRef_CGAL::Polytope_distance_d_traits_2}.3. - -@macro = @begin - template < class R_, class ET_, class NT_> - class Polytope_distance_d_traits_2 { - public: - // self - typedef R_ R; - typedef ET_ ET; - typedef NT_ NT; - typedef Polytope_distance_d_traits_2 - Self; - - // types - typedef typename R::Point_2 Point_d; - - typedef typename R::Rep_tag Rep_tag; - - typedef typename R::RT RT; - typedef typename R::FT FT; - - typedef Access_dimension_2 Access_dimension_d; - typedef Access_coordinates_begin_2 - Access_coordinates_begin_d; - - typedef typename R::Construct_point_2 - Construct_point_d; - - // creation - Polytope_distance_d_traits_2( ) { } - Polytope_distance_d_traits_2( - const Polytope_distance_d_traits_2&) { } - - // operations - Access_dimension_d - access_dimension_d_object( ) const - { return Access_dimension_d(); } - - Access_coordinates_begin_d - access_coordinates_begin_d_object( ) const - { return Access_coordinates_begin_d(); } - - Construct_point_d - construct_point_d_object( ) const - { return Construct_point_d(); } - }; -@end - - -@! ---------------------------------------------------------------------------- -@! The Class Template CGAL::Polytope_distance_d_traits_3 -@! ---------------------------------------------------------------------------- - -\subsection{The Class Template \ccFont - CGAL::Polytope\_distance\_d\_traits\_3\texttt{<}R,ET,NT\texttt{>}} -\label{sec:Polytope_distance_d_traits_3} - -The first template argument of \ccc{Polytope_distance_d_traits_3} is -expected to be a \cgal\ representation class. The second and third -template argument are expected to be number types fulfilling the -requirements of a \cgal\ number type. They have default type -\ccc{R::RT}. - -@macro = @begin - template < class R_, class ET_ = CGAL_TYPENAME_MSVC_NULL R_::RT, - class NT_ = CGAL_TYPENAME_MSVC_NULL R_::RT > - class Polytope_distance_d_traits_3; -@end - -The interface consists of the types and member functions described in -Section~\ref{ccRef_CGAL::Polytope_distance_d_traits_3}.4. - -@macro = @begin - template < class R_, class ET_, class NT_> - class Polytope_distance_d_traits_3 { - public: - // self - typedef R_ R; - typedef ET_ ET; - typedef NT_ NT; - typedef Polytope_distance_d_traits_3 - Self; - - // types - typedef typename R::Point_3 Point_d; - - typedef typename R::Rep_tag Rep_tag; - - typedef typename R::RT RT; - typedef typename R::FT FT; - - typedef Access_dimension_3 Access_dimension_d; - typedef Access_coordinates_begin_3 - Access_coordinates_begin_d; - - typedef typename R::Construct_point_3 - Construct_point_d; - - // creation - Polytope_distance_d_traits_3( ) { } - Polytope_distance_d_traits_3( - const Polytope_distance_d_traits_3&) { } - - // operations - Access_dimension_d - access_dimension_d_object( ) const - { return Access_dimension_d(); } - - Access_coordinates_begin_d - access_coordinates_begin_d_object( ) const - { return Access_coordinates_begin_d(); } - - Construct_point_d - construct_point_d_object( ) const - { return Construct_point_d(); } - }; -@end - - -@! ---------------------------------------------------------------------------- -@! The Class Template CGAL::Polytope_distance_d_traits_d -@! ---------------------------------------------------------------------------- - -\subsection{The Class Template \ccFont - CGAL::Polytope\_distance\_d\_traits\_d\texttt{<}R,ET,NT\texttt{>}} -\label{sec:Polytope_distance_d_traits_d} - -The first template argument of \ccc{Polytope_distance_d_traits_d} is -expected to be a \cgal\ representation class. The second and third -template argument are expected to be number types fulfilling the -requirements of a \cgal\ number type. They have default type -\ccc{R::RT}. - -@macro = @begin - template < class R_, class ET_ = CGAL_TYPENAME_MSVC_NULL R_::RT, - class NT_ = CGAL_TYPENAME_MSVC_NULL R_::RT > - class Polytope_distance_d_traits_d; -@end - -The interface consists of the types and member functions described in -Section~\ref{ccRef_CGAL::Polytope_distance_d_traits_d}.5. - -@macro = @begin - template < class R_, class ET_, class NT_> - class Polytope_distance_d_traits_d { - public: - // self - typedef R_ R; - typedef ET_ ET; - typedef NT_ NT; - typedef Polytope_distance_d_traits_d - Self; - - // types - typedef typename R::Point_d Point_d; - - typedef typename R::Rep_tag Rep_tag; - - typedef typename R::RT RT; - typedef typename R::FT FT; - - typedef Access_dimension_d Access_dimension_d; - typedef Access_coordinates_begin_d - Access_coordinates_begin_d; - - typedef Construct_point_d Construct_point_d; - - // creation - Polytope_distance_d_traits_d( ) { } - Polytope_distance_d_traits_d( - const Polytope_distance_d_traits_d&) { } - - // operations - Access_dimension_d - access_dimension_d_object( ) const - { return Access_dimension_d(); } - - Access_coordinates_begin_d - access_coordinates_begin_d_object( ) const - { return Access_coordinates_begin_d(); } - - Construct_point_d - construct_point_d_object( ) const - { return Construct_point_d(); } - }; -@end - - @! ============================================================================ @! Test Programs @! ============================================================================ @@ -1806,11 +1562,15 @@ standard error stream. \subsection{Traits Class Models} -All three traits class models are tested twice, firstly with one exact -number type (the ``default'' use) and secondly with three different number -types (the ``advanced'' use). Since the current implementation of the -underlying quadratic programming solver can only handle input points with -Cartesian representation, we use \cgal's Cartesian kernel for testing. +We perform the tests with the traits class models +\ccc{Optimisation_d_traits_2}, \ccc{Optimisation_d_traits_3}, and +\ccc{Optimisation_d_traits_d} based on the two-, three-, and +$d$-dimensional \cgal~kernel. All three traits class models are used twice, +firstly with one exact number type (the ``default'' use) and secondly with +three different number types (the ``advanced'' use). Since the current +implementation of the underlying linear programming solver can only handle +input points with Cartesian representation, we use \cgal's Cartesian kernel +for testing. Some of the following macros are parameterized with the dimension, e.g.~with $2$, $3$, or $d$. @@ -1819,7 +1579,7 @@ e.g.~with $2$, $3$, or $d$. #include #include #include - #include + #include @end We use the number type \ccc{leda_integer} from \leda{} for the first @@ -1830,10 +1590,10 @@ variant. // test variant 1 (needs LEDA) #ifdef CGAL_USE_LEDA # include - typedef CGAL::Cartesian R_1; - typedef CGAL::Polytope_distance_d_traits_@1 Traits_1; + typedef CGAL::Cartesian R_1; + typedef CGAL::Optimisation_d_traits_@1 Traits_1; # define TEST_VARIANT_1 \ - "Polytope_distance_d_traits_@1< Cartesian >" + "Optimisation_d_traits_@1< Cartesian >" CGAL_DEFINE_ITERATOR_TRAITS_POINTER_SPEC( leda_integer) #endif @end @@ -1849,11 +1609,10 @@ arithmetic. // test variant 2 (needs GMP) #ifdef CGAL_USE_GMP # include - typedef CGAL::Cartesian< int > R_2; - typedef CGAL::Polytope_distance_d_traits_@1 - Traits_2; + typedef CGAL::Cartesian< int > R_2; + typedef CGAL::Optimisation_d_traits_@1 Traits_2; # define TEST_VARIANT_2 \ - "Polytope_distance_d_traits_@1< Cartesian, GMP::Double, double >" + "Optimisation_d_traits_@1< Cartesian, GMP::Double, double >" #endif @end @@ -2123,126 +1882,6 @@ can be enabled by giving a number between 0 and 3 at the command line. @ @end -@! ---------------------------------------------------------------------------- -@! Polytope_distance_d_traits_2.h -@! ---------------------------------------------------------------------------- - -\subsection{include/CGAL/Polytope\_distance\_d\_traits\_2.h} - -@file = @begin - @( - "include/CGAL/Polytope_distance_d_traits_2.h", - "Traits class (2D) for polytope distance") - - #ifndef CGAL_POLYTOPE_DISTANCE_D_TRAITS_2_H - #define CGAL_POLYTOPE_DISTANCE_D_TRAITS_2_H - - // includes - #ifndef CGAL_OPTIMISATION_ACCESS_DIMENSION_2_H - # include - #endif - #ifndef CGAL_OPTIMISATION_ACCESS_COORDINATES_BEGIN_2_H - # include - #endif - - @("CGAL") - - // Class declaration - // ================= - @ - - // Class interface - // =============== - @ - - @("CGAL") - - #endif // CGAL_POLYTOPE_DISTANCE_D_TRAITS_2_H - - @ -@end - -@! ---------------------------------------------------------------------------- -@! Polytope_distance_d_traits_3.h -@! ---------------------------------------------------------------------------- - -\subsection{include/CGAL/Polytope\_distance\_d\_traits\_3.h} - -@file = @begin - @( - "include/CGAL/Polytope_distance_d_traits_3.h", - "Traits class (3D) for polytope distance") - - #ifndef CGAL_POLYTOPE_DISTANCE_D_TRAITS_3_H - #define CGAL_POLYTOPE_DISTANCE_D_TRAITS_3_H - - // includes - #ifndef CGAL_OPTIMISATION_ACCESS_DIMENSION_3_H - # include - #endif - #ifndef CGAL_OPTIMISATION_ACCESS_COORDINATES_BEGIN_3_H - # include - #endif - - @("CGAL") - - // Class declaration - // ================= - @ - - // Class interface - // =============== - @ - - @("CGAL") - - #endif // CGAL_POLYTOPE_DISTANCE_D_TRAITS_3_H - - @ -@end - -@! ---------------------------------------------------------------------------- -@! Polytope_distance_d_traits_d.h -@! ---------------------------------------------------------------------------- - -\subsection{include/CGAL/Polytope\_distance\_d\_traits\_d.h} - -@file = @begin - @( - "include/CGAL/Polytope_distance_d_traits_d.h", - "Traits class (dD) for polytope distance") - - #ifndef CGAL_POLYTOPE_DISTANCE_D_TRAITS_D_H - #define CGAL_POLYTOPE_DISTANCE_D_TRAITS_D_H - - // includes - #ifndef CGAL_OPTIMISATION_ACCESS_DIMENSION_D_H - # include - #endif - #ifndef CGAL_OPTIMISATION_ACCESS_COORDINATES_BEGIN_D_H - # include - #endif - #ifndef CGAL_OPTIMISATION_CONSTRUCT_POINT_D_H - # include - #endif - - @("CGAL") - - // Class declaration - // ================= - @ - - // Class interface - // =============== - @ - - @("CGAL") - - #endif // CGAL_POLYTOPE_DISTANCE_D_TRAITS_D_H - - @ -@end - @! ---------------------------------------------------------------------------- @! test_Polytope_distance_d.h @! ----------------------------------------------------------------------------