From 23e61815ced5aa511b23ee7571faecd08e362454 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sven=20Sch=C3=B6nherr?= Date: Thu, 17 Aug 2000 16:16:20 +0000 Subject: [PATCH] fixed some bugs on Borland and M$-VC++ --- Packages/Min_sphere_d_new/web/Min_sphere_d.aw | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/Packages/Min_sphere_d_new/web/Min_sphere_d.aw b/Packages/Min_sphere_d_new/web/Min_sphere_d.aw index e7c09028058..9596eb9c442 100644 --- a/Packages/Min_sphere_d_new/web/Min_sphere_d.aw +++ b/Packages/Min_sphere_d_new/web/Min_sphere_d.aw @@ -94,7 +94,7 @@ @! -------- \begin{abstract} - We provide an implementation for computing the smallest (w.r.t.~area) + We provide an implementation for computing the smallest (w.r.t.~volume) enclosing sphere of a finite point set in arbitrary dimension. The problem is formulated as a quadratic program and a dedicated solver~\cite{gs-eegqp-00} is used to obtain the solution. @@ -1083,18 +1083,22 @@ radius of the smallest enclosing sphere. @macro = @begin c_vector.resize( points.size()); - for ( unsigned int i = 0; i < points.size(); ++i) { + int i; + for ( i = 0; i < number_of_points(); ++i) { c_vector[ i] = -std::inner_product( tco.access_coordinates_begin_d_object()( points[ i]), tco.access_coordinates_begin_d_object()( points[ i])+d, tco.access_coordinates_begin_d_object()( points[ i]), NT( 0), std::plus(), std::multiplies()); } - typename QP_rep::B_iterator const_one( 1); + typedef typename QP_rep::A_iterator A_it; + typedef typename QP_rep::B_iterator B_it; + typedef typename QP_rep::D_iterator D_it; + B_it const_one( 1); solver.set( points.size(), 1, - typename QP_rep::A_iterator( const_one), + A_it( const_one), const_one, c_vector.begin(), - typename QP_rep::D_iterator( points.begin(), + D_it( points.begin(), CGAL::QP_rep_row_of_d< NT, Point, Point_iterator, @@ -1177,8 +1181,8 @@ 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 = typename _R::RT, - class _NT = typename _R::RT > + template < class _R, class _ET = CGAL_TYPENAME_MSVC_NULL _R::RT, + class _NT = CGAL_TYPENAME_MSVC_NULL _R::RT > class Min_sphere_d_traits_2; @end @@ -1245,8 +1249,8 @@ 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 = typename _R::RT, - class _NT = typename _R::RT > + template < class _R, class _ET = CGAL_TYPENAME_MSVC_NULL _R::RT, + class _NT = CGAL_TYPENAME_MSVC_NULL _R::RT > class Min_sphere_d_traits_3; @end @@ -1313,8 +1317,8 @@ 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 = typename _R::RT, - class _NT = typename _R::RT > + template < class _R, class _ET = CGAL_TYPENAME_MSVC_NULL _R::RT, + class _NT = CGAL_TYPENAME_MSVC_NULL _R::RT > class Min_sphere_d_traits_d; @end @@ -2231,7 +2235,7 @@ can be enabled by giving a number between 0 and 3 at the command line. // includes and typedefs // --------------------- @(2) - @(3) + @(2) // main // ----