00001 /* mffm Mathematica C++ Wrapper 00002 Mathematica core library C++ wrapper 00003 00004 Copyright (C) 2000, 2002 Matt R. Flax flatmax at ieee org 00005 00006 This library is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU Lesser General Public 00008 License as published by the Free Software Foundation; either 00009 version 2.1 of the License, or (at your option) any later version. 00010 00011 This library is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 Lesser General Public License for more details. 00015 00016 You have received a copy of the GNU Lesser General Public License 00017 along with this library. 00018 */ 00019 #ifndef MATHEMATICA_H_ 00020 #define MATHEMATICA_H_ 00021 00022 #include "mathlink.h" 00023 00024 /** This class interfaces to the Mathematica MathLink facility 00025 It initialises and de-initialises MathLink automatically. 00026 */ 00027 class Mathematica{ 00028 int closeLink; 00029 long err; 00030 static MLENV ep; 00031 static MLINK lp; 00032 00033 static void deinit( void); 00034 static void closelink( void); 00035 static void error( MLINK lp); 00036 public: 00037 00038 /// Constructor 00039 Mathematica(void); 00040 /// De-Constructor 00041 ~Mathematica(void); 00042 00043 /// Returns the Mathematica evaluation of ProductLog[var] 00044 double productLog(double var); 00045 }; 00046 /** \example productLog.cc 00047 * This is an example of how to use the Mathematica class 00048 */ 00049 00050 #endif