00001 /************************************************************************* 00002 * 00003 * The Contents of this file are made available subject to 00004 * the terms of GNU Lesser General Public License Version 2.1. 00005 * 00006 * 00007 * GNU Lesser General Public License Version 2.1 00008 * ============================================= 00009 * Copyright 2005 by Kohei Yoshida. 00010 * 1039 Kingsway Dr., Apex, NC 27502, USA 00011 * 00012 * This library is free software; you can redistribute it and/or 00013 * modify it under the terms of the GNU Lesser General Public 00014 * License version 2.1, as published by the Free Software Foundation. 00015 * 00016 * This library is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00019 * Lesser General Public License for more details. 00020 * 00021 * You should have received a copy of the GNU Lesser General Public 00022 * License along with this library; if not, write to the Free Software 00023 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 00024 * MA 02111-1307 USA 00025 * 00026 ************************************************************************/ 00027 00028 00029 #ifndef _LPBASE_HXX_ 00030 #define _LPBASE_HXX_ 00031 00032 #include <memory> 00033 00034 namespace scsolver { namespace numeric { 00035 00036 class Matrix; 00037 00038 namespace lp { 00039 00040 class Model; 00041 class BaseAlgorithmImpl; 00042 00043 class BaseAlgorithm 00044 { 00045 public: 00046 BaseAlgorithm(); 00047 virtual ~BaseAlgorithm() = 0; 00048 00049 virtual void solve() = 0; 00050 00051 Model* getModel() const; 00052 void setModel( Model* ); 00053 00063 Model* getCanonicalModel() const; 00064 00065 ::scsolver::numeric::Matrix getSolution() const; 00066 void setSolution( const ::scsolver::numeric::Matrix& ); 00067 00077 void setCanonicalSolution( const ::scsolver::numeric::Matrix& mx ); 00078 00079 private: 00080 ::std::auto_ptr<BaseAlgorithmImpl> m_pImpl; 00081 }; 00082 00083 }}} 00084 00085 #endif
1.5.3