BWAPI
SPAR/AIModule/BWTA/vendors/CGAL/CGAL/Polynomial/misc.h
Go to the documentation of this file.
00001 // Copyright (c) 2008 Max-Planck-Institute Saarbruecken (Germany)
00002 //
00003 // This file is part of CGAL (www.cgal.org); you can redistribute it and/or
00004 // modify it under the terms of the GNU Lesser General Public License as
00005 // published by the Free Software Foundation; version 2.1 of the License.
00006 // See the file LICENSE.LGPL distributed with CGAL.
00007 //
00008 // Licensees holding a valid commercial license may use this file in
00009 // accordance with the commercial license agreement provided with the software.
00010 //
00011 // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00012 // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00013 //
00014 // $URL: svn+ssh://scm.gforge.inria.fr/svn/cgal/branches/CGAL-3.5-branch/Polynomial/include/CGAL/Polynomial/misc.h $
00015 // $Id: misc.h 47254 2008-12-06 21:18:27Z afabri $
00016 //
00017 //
00018 // Author(s)     : Michael Hemmer 
00019 
00020 #ifndef CGAL_POLYNOMIAL_MISC_H
00021 #define CGAL_POLYNOMIAL_MISC_H
00022 
00023 #include <CGAL/basic.h>
00024 #include <CGAL/Polynomial/fwd.h>
00025 
00026 namespace CGAL{
00027 namespace CGALi{
00028 
00029 // template meta function Innermost_coefficient_type
00030 // returns the tpye of the innermost coefficient 
00031 template <class T> struct Innermost_coefficient_type{ typedef T Type; };
00032 template <class Coefficient_type> 
00033 struct Innermost_coefficient_type<Polynomial<Coefficient_type> >{
00034     typedef typename Innermost_coefficient_type<Coefficient_type>::Type Type; 
00035 };
00036 
00037 // template meta function Dimension
00038 // returns the number of variables 
00039 template <class T> struct Dimension{ static const int value = 0;};
00040 template <class Coefficient_type> 
00041 struct Dimension<Polynomial<Coefficient_type> > {
00042     static const int value = Dimension<Coefficient_type>::value + 1 ; 
00043 };
00044 
00045 } // namespace CGALi
00046 } // namespace CGAL
00047 
00048 #endif // CGAL_POLYNOMIAL_MISC_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines