SyFi
0.3
|
00001 // Copyright (C) 2006-2009 Kent-Andre Mardal and Simula Research Laboratory 00002 // 00003 // This file is part of SyFi. 00004 // 00005 // SyFi is free software: you can redistribute it and/or modify 00006 // it under the terms of the GNU General Public License as published by 00007 // the Free Software Foundation, either version 2 of the License, or 00008 // (at your option) any later version. 00009 // 00010 // SyFi is distributed in the hope that it will be useful, 00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 // GNU General Public License for more details. 00014 // 00015 // You should have received a copy of the GNU General Public License 00016 // along with SyFi. If not, see <http://www.gnu.org/licenses/>. 00017 00018 #ifndef UTILITIES_IS_INCLUDED 00019 #define UTILITIES_IS_INCLUDED 00020 00021 #include <string> 00022 00023 #include <ginac/ginac.h> 00024 00025 #include "containers.h" 00026 00027 namespace SyFi 00028 { 00029 extern const int version_major; 00030 extern const int version_minor; 00031 extern const char* version_micro; 00032 00033 // dirac delta function 00034 int dirac(unsigned int i, unsigned int j); 00035 00036 // string utilities 00037 std::string int2string(int i); 00038 00039 std::string istr(const std::string & a, int b); 00040 00041 std::string istr(const std::string & a, int b, int c); 00042 00043 std::string lst2string(GiNaC::lst& l); 00044 //std::string lst2string(GiNaC::exvector& v); 00045 00046 //GiNaC::lst compute_functions(GiNaC::lst& equations, GiNaC::lst& variables, GiNaC::lst& space); 00047 00048 // print functions 00049 #ifndef SWIG 00050 void print(GiNaC::exvector& v); 00051 void print(GiNaC::lst& l); 00052 void print(GiNaC::exmap m); 00053 void print(ex_int_map m); 00054 void print(std::map<std::pair<unsigned int,unsigned int>, GiNaC::ex> & A); 00055 #endif 00056 00057 } // namespace SyFi 00058 #endif