// // $Source: /cvsroot/gambit/gambit/sources/tools/enumpoly/gpoly.cc,v $ // $Date: 2006/08/20 17:02:15 $ // $Revision: 1.7 $ // // DESCRIPTION: // Instantiation of common gPoly classes // // This file is part of Gambit // Copyright (c) 2002, The Gambit Project // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // #include "gpoly.imp" #include "libgambit/libgambit.h" template<> double gPoly::String_Coeff(double nega) { std::string Coeff = ""; while (charc >= '0' && charc <= '9' || charc == '.'){ Coeff += charc; charnum++; GetChar(); } if (Coeff == "") return (nega); else return (nega * strtod(Coeff.c_str(), NULL)); } template class gPoly; template gPoly operator+(const gPoly &poly, const double val); template gPoly operator*(const double val, const gPoly &poly); template gPoly operator*(const gPoly &poly, const double val); template gPoly TogDouble(const gPoly&); template gPoly NormalizationOfPoly(const gPoly&); template std::string &operator<<(std::string &, const gPoly &); /* template<> Gambit::Rational gPoly::String_Coeff(Gambit::Rational nega) { Gambit::Rational rat; std::string Coeff = ""; while (charc >= '0' && charc <= '9' || charc == '/' || charc == '.'){ Coeff += charc; charnum++; GetChar(); } if (Coeff == "") return (nega); else return (nega * Gambit::ToRational(Coeff)); } template class gPoly; template gPoly operator*(const Gambit::Rational val, const gPoly &poly); template gPoly operator*(const gPoly &poly, const Gambit::Rational val); template gPoly TogDouble(const gPoly&); template gPoly NormalizationOfPoly(const gPoly&); template std::string &operator<<(std::string &, const gPoly &); */