00001 /******************************************************************************/ 00002 /* */ 00003 /* P L A N E C Y L I N D E R C L A S S H E A D E R */ 00004 /* */ 00005 /* Roberto Lopez */ 00006 /* International Center for Numerical Methods in Engineering (CIMNE) */ 00007 /* Technical University of Catalonia (UPC) */ 00008 /* Barcelona, Spain */ 00009 /* E-mail: rlopez@cimne.upc.edu */ 00010 /* */ 00011 /******************************************************************************/ 00012 00013 00014 #ifndef __PLANECYLINDER_H__ 00015 #define __PLANECYLINDER_H__ 00016 00017 #include "ObjectiveFunction.h" 00018 00019 namespace Purple 00020 { 00021 00022 /// This class represents the objective function for the plane-cylinder problem. 00023 /// 00024 /// @see ObjectiveFunction. 00025 00026 class PlaneCylinder : public ObjectiveFunction 00027 { 00028 00029 private: 00030 00031 /// Penalty term ratio. 00032 00033 double penalty; 00034 00035 public: 00036 00037 // GENERAL CONSTRUCTOR 00038 00039 PlaneCylinder(void); 00040 00041 00042 // DESTRUCTOR 00043 00044 virtual ~PlaneCylinder(void); 00045 00046 00047 // METHODS 00048 00049 // Get methods 00050 00051 double getPenalty(void); 00052 00053 // Set methods 00054 00055 void setPenalty(double); 00056 00057 // Objective function methods 00058 00059 double getError(Vector<double>); 00060 00061 double getEvaluation(Vector<double>); 00062 00063 // Utility methods 00064 00065 void print(Vector<double>); 00066 }; 00067 00068 } 00069 00070 #endif 00071 00072 00073 // Purple: An Open Source Numerical Optimization C++ Library. 00074 // Copyright (C) 2006 Roberto Lopez 00075 // 00076 // This library is free software; you can redistribute it and/or 00077 // modify it under the terms of the GNU Lesser General Public 00078 // License as published by the Free Software Foundation; either 00079 // version 2.1 of the License, or any later version. 00080 // 00081 // This library is distributed in the hope that it will be useful, 00082 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00083 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00084 // Lesser General Public License for more details. 00085 00086 // You should have received a copy of the GNU Lesser General Public 00087 // License along with this library; if not, write to the Free Software 00088 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA