diff --git a/Old_Packages/_d/changes.txt b/Old_Packages/_d/changes.txt index f05aa88780b..99111899cc3 100644 --- a/Old_Packages/_d/changes.txt +++ b/Old_Packages/_d/changes.txt @@ -1,3 +1,7 @@ +2.6 (17 May 2001) +- Remove PointSd.h +- Fix BCC warning in PointHd.h + 2.5 (13 Feb 2001) - Take care of Simple_homogeneous<>. diff --git a/Old_Packages/_d/include/CGAL/PointHd.h b/Old_Packages/_d/include/CGAL/PointHd.h index 1d662afff62..14ece0fc445 100644 --- a/Old_Packages/_d/include/CGAL/PointHd.h +++ b/Old_Packages/_d/include/CGAL/PointHd.h @@ -25,9 +25,7 @@ #ifndef CGAL_POINTHD_H #define CGAL_POINTHD_H -#ifndef D_TUPLE_H #include -#endif // D_TUPLE_H CGAL_BEGIN_NAMESPACE @@ -92,15 +90,11 @@ const _d_tuple* PointHd::ptr() const { return (_d_tuple*)PTR; } + CGAL_END_NAMESPACE - -#ifndef CGAL_ORIGIN_H #include -#endif // CGAL_ORIGIN_H -#ifndef CGAL_NUMBER_UTILS_H #include -#endif // CGAL_NUMBER_UTILS_H CGAL_BEGIN_NAMESPACE @@ -212,7 +206,7 @@ const RT* PointHd::end() const { return ptr()->e + dimension() + 1; } -#ifndef NO_OSTREAM_INSERT_POINTHD +#ifndef CGAL_NO_OSTREAM_INSERT_POINTHD template < class FT, class RT > std::ostream& operator<<(std::ostream& os, const PointHd& p) @@ -238,15 +232,15 @@ operator<<(std::ostream& os, const PointHd& p) return os; } } -#endif // NO_OSTREAM_INSERT_POINTHD +#endif // CGAL_NO_OSTREAM_INSERT_POINTHD -#ifndef NO_ISTREAM_EXTRACT_POINTHD +#ifndef CGAL_NO_ISTREAM_EXTRACT_POINTHD template < class FT, class RT > std::istream& operator>>(std::istream& is, PointHd &p) { int d=0, i; - RT* e=0; + RT* e; switch(is.iword(IO::mode)) { case IO::ASCII : @@ -269,9 +263,8 @@ operator>>(std::istream& is, PointHd &p) delete[] e; return is; } +#endif // CGAL_NO_ISTREAM_EXTRACT_POINTHD -#endif // NO_ISTREAM_EXTRACT_POINTHD CGAL_END_NAMESPACE - -#endif // POINTH_H +#endif // CGAL_POINTHD_H diff --git a/Old_Packages/_d/include/CGAL/PointSd.h b/Old_Packages/_d/include/CGAL/PointSd.h deleted file mode 100644 index b452e27055a..00000000000 --- a/Old_Packages/_d/include/CGAL/PointSd.h +++ /dev/null @@ -1,280 +0,0 @@ -// ====================================================================== -// -// Copyright (c) 1999 The CGAL Consortium -// -// This software and related documentation is part of an INTERNAL release -// of the Computational Geometry Algorithms Library (CGAL). It is not -// intended for general use. -// -// ---------------------------------------------------------------------- -// -// release : -// release_date : -// -// file : PointSd.h -// package : _d -// revision : $Revision$ -// revision_date : $Date$ -// author(s) : Sven Schoenherr -// Bernd Gaertner -// -// coordinator : MPI, Saarbruecken () -// ====================================================================== - - -#ifndef CGAL_POINTSD_H -#define CGAL_POINTSD_H - -#ifndef D_TUPLE_H -#include -#endif // D_TUPLE_H - -CGAL_BEGIN_NAMESPACE - -template < class FT > -class DASd; - -template < class FT > -class PointSd : public Handle -{ - friend class DASd; - - public: - PointSd (); - PointSd (int dim, const Origin&); - PointSd (const PointSd &p); - - template - PointSd (int dim, InputIterator first, InputIterator last) - { - CGAL_kernel_precondition( dim >= 0); - PTR = new _d_tuple(dim); - FT* o; - FT* e = ptr()->e; - InputIterator i; - for ( i=first, o=e; ( i < last)&&( o < e+dim ); *(o++) = *(i++) ) {}; - CGAL_kernel_precondition( o == e+dim ); - if ( i < last ) - { - FT h = *(i++); - CGAL_kernel_precondition( !CGAL_NTS is_zero (h) ); - CGAL_kernel_precondition( i == last ); - for ( o=e; o < e+dim; *(o++) /= h ) ; - // if ( h != FT(1) ) { for ( o=e; o < e+dim; *(o++) /= h ) {}; } - } - } - - - ~PointSd(); - - PointSd &operator=(const PointSd &p); - - bool operator==(const PointSd &p) const; - bool operator!=(const PointSd &p) const; - - int id() const; - - FT homogeneous (int i) const; - FT cartesian (int i) const; - FT operator[] (int i) const; - const FT* begin() const; - const FT* end() const; - - int dimension () const; - - private: - const _d_tuple* ptr() const; -}; - -template < class FT > -CGAL_KERNEL_INLINE -const _d_tuple* PointSd::ptr() const -{ - return (_d_tuple*)PTR; -} -CGAL_END_NAMESPACE - - -#ifndef CGAL_ORIGIN_H -#include -#endif // CGAL_ORIGIN_H -#ifndef CGAL_NUMBER_UTILS_H -#include -#endif // CGAL_NUMBER_UTILS_H - -CGAL_BEGIN_NAMESPACE - -template < class FT > -CGAL_KERNEL_CTOR_INLINE -PointSd::PointSd() -{ - PTR = new _d_tuple(); -} - -template < class FT > -CGAL_KERNEL_CTOR_INLINE -PointSd::PointSd(int dim, const Origin &) -{ - CGAL_kernel_precondition (dim>=0); - PTR = new _d_tuple(dim); - FT* e = ptr()->e; - FT* i; - for (i=e; i -CGAL_KERNEL_CTOR_INLINE -PointSd::PointSd(const PointSd &p) - : Handle((Handle&)p) -{} - - -template < class FT > -inline -PointSd::~PointSd() -{} - -template < class FT > -inline -PointSd &PointSd::operator=(const PointSd &p) -{ - Handle::operator=(p); - return *this; -} - -template < class FT > -inline -bool PointSd::operator==(const PointSd& p) const -{ - int d = dimension(); - if (d != p.dimension()) return false; - FT* e = ptr()->e; - FT* ep = p.ptr()->e; - FT* i = e; - FT* j = ep; - for ( ; i < e+d; ++i, ++j) - if (*i != *j) return false; - return true; -} - -template < class FT > -inline -bool -PointSd::operator!=(const PointSd& p) const -{ return !(*this == p); } - -template < class FT > -inline -int PointSd::id() const -{ return (int)PTR; } - -template < class FT > -inline -FT -PointSd::homogeneous(int i) const -{ - CGAL_kernel_precondition ( (i>=0) && (i<=dimension()) ); - if (ie[i]; - else - return FT(1); -} - -template < class FT > -CGAL_KERNEL_INLINE -FT -PointSd::cartesian(int i) const -{ - CGAL_kernel_precondition ( (i>=0) && (ie[i]; -} - -template < class FT > -inline -FT -PointSd::operator[](int i) const -{ return cartesian(i); } - - -template < class FT > -inline -int -PointSd::dimension() const -{ return ptr()->d; } - -template < class FT > -inline -const FT* -PointSd::begin() const -{ return ptr()->e; } - -template < class FT > -inline -const FT* PointSd::end() const -{ return ptr()->e + dimension(); } - -#ifndef NO_OSTREAM_INSERT_POINTSD -template < class FT > -std::ostream& -operator<<(std::ostream& os, const PointSd &p) -{ - int d = p.dimension(); - int i; - switch(os.iword(IO::mode)) - { - case IO::ASCII : - os << d << ' '; - for (i=0; i -std::istream& -operator>>(std::istream& is, PointSd &p) -{ - int d=0, i; - FT* e=0; - switch(is.iword(IO::mode)) - { - case IO::ASCII : - is >> d; - e = new FT[d]; - for (i=0; i < d; ++i) { is >> e[i]; } - break; - case IO::BINARY : - read(is, d); - e = new FT[d]; - for (i=0; i( d, e, e+d); - delete[] e; - return is; -} - -#endif // NO_ISTREAM_EXTRACT_POINTSD -CGAL_END_NAMESPACE - - -#endif // CGAL_POINTSD_H