BWAPI
|
00001 // Copyright (c) 2005 Stanford University (USA). 00002 // All rights reserved. 00003 // 00004 // This file is part of CGAL (www.cgal.org); you can redistribute it and/or 00005 // modify it under the terms of the GNU Lesser General Public License as 00006 // published by the Free Software Foundation; version 2.1 of the License. 00007 // See the file LICENSE.LGPL distributed with CGAL. 00008 // 00009 // Licensees holding a valid commercial license may use this file in 00010 // accordance with the commercial license agreement provided with the software. 00011 // 00012 // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 00013 // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 00014 // 00015 // $URL: svn+ssh://scm.gforge.inria.fr/svn/cgal/branches/CGAL-3.5-branch/Kinetic_data_structures/include/CGAL/Polynomial/internal/nt_converters.h $ 00016 // $Id: nt_converters.h 28567 2006-02-16 14:30:13Z lsaboret $ 00017 // 00018 // 00019 // Author(s) : Daniel Russel <drussel@alumni.princeton.edu> 00020 00021 #ifndef CGAL_POLYNOMIAL_NT_CONVERTERS_H 00022 #define CGAL_POLYNOMIAL_NT_CONVERTERS_H 00023 00024 #include <CGAL/Polynomial/basic.h> 00025 00026 #ifdef CGAL_POLYNOMIAL_USE_CGAL 00027 #include <CGAL/NT_converter.h> 00028 #include <CGAL/number_utils_classes.h> 00029 00030 CGAL_POLYNOMIAL_BEGIN_NAMESPACE 00031 00032 template <class NT1, class NT2> 00033 class NT_converter: public CGAL::NT_converter<NT1, NT2> 00034 { 00035 public: 00036 NT_converter(){} 00037 }; 00038 00039 template <class NT> 00040 class To_double: public CGAL::To_double<NT> 00041 { 00042 public: 00043 To_double(){} 00044 }; 00045 00046 /*template <class NT> 00047 double to_double(const NT &nt) { 00048 return CGAL::to_double(nt); 00049 }*/ 00050 00051 CGAL_POLYNOMIAL_END_NAMESPACE 00052 00053 #else 00054 00055 Not implemented yet; 00056 #endif 00057 00058 CGAL_POLYNOMIAL_BEGIN_NAMESPACE 00059 00061 template <class NT> 00062 struct Identity_converter 00063 { 00064 typedef NT argument_type; 00065 typedef NT result_type; 00066 Identity_converter(){} 00067 const NT &operator()(const NT &nt) const 00068 { 00069 return nt; 00070 } 00071 }; 00072 00073 CGAL_POLYNOMIAL_END_NAMESPACE 00074 #endif