00001 // $Id: APPSPACK_Point.hpp,v 1.9 2004/04/12 17:42:49 tgkolda Exp $ 00002 // $Source: /space/CVS-Acro/acro/packages/appspack/appspack/src/APPSPACK_Point.hpp,v $ 00003 00004 //@HEADER 00005 // ************************************************************************ 00006 // 00007 // APPSPACK: Asynchronous Parallel Pattern Search 00008 // Copyright (2003) Sandia Corporation 00009 // 00010 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive 00011 // license for use of this work by or on behalf of the U.S. Government. 00012 // 00013 // This library is free software; you can redistribute it and/or modify 00014 // it under the terms of the GNU Lesser General Public License as 00015 // published by the Free Software Foundation; either version 2.1 of the 00016 // License, or (at your option) any later version. 00017 // 00018 // This library is distributed in the hope that it will be useful, but 00019 // WITHOUT ANY WARRANTY; without even the implied warranty of 00020 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00021 // Lesser General Public License for more details. 00022 // 00023 // You should have received a copy of the GNU Lesser General Public 00024 // License along with this library; if not, write to the Free Software 00025 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 00026 // USA. . 00027 // 00028 // Questions? Contact Tammy Kolda (tgkolda@sandia.gov) 00029 // 00030 // ************************************************************************ 00031 //@HEADER 00032 00037 #ifndef APPSPACK_POINT_HPP 00038 #define APPSPACK_POINT_HPP 00039 00040 #include "APPSPACK_Common.hpp" 00041 #include "APPSPACK_Vector.hpp" 00042 #include "APPSPACK_Value.hpp" 00043 00044 namespace APPSPACK 00045 { 00047 00054 class Point 00055 { 00056 public: 00057 00059 enum State 00060 { 00062 Unevaluated, 00063 00065 Infeasible, 00066 00069 CachedInsufficientDecrease, 00070 00072 Cached, 00073 00076 EvaluatedInsufficientDecrease, 00077 00080 Evaluated 00081 }; 00082 00084 00094 Point(const Vector& x_in, const Value& f_in, double step_in, double alpha_in); 00095 00114 Point(const Vector& x_in, double step_in, const Point& parent, int idx_in); 00115 00117 00119 00120 ~Point(); 00122 00124 00126 const Vector& getX() const; 00127 00129 const Value& getF() const; 00130 00132 int getTag() const; 00133 00135 int getParentTag() const; 00136 00138 int getIndex() const; 00139 00141 double getStep() const; 00142 00144 00146 00150 void setCachedFunctionValue(const Value& f_in, const string& msg_in); 00151 00155 void setEvaluatedFunctionValue(const Value& f_in, const string& msg_in); 00156 00159 void setInfeasible(); 00160 00162 00164 00198 bool operator<(const Point& other) const; 00199 00201 00203 00205 ostream& leftshift(ostream& stream) const; 00206 00207 00209 00210 private: 00211 00213 void operator=(const Point& source); 00214 00216 Point(const Point& source); 00217 00219 bool isSufficientDecrease() const; 00220 00221 private: 00222 00224 static int staticCount; 00225 00227 const Vector x; 00228 00230 Value f; 00231 00233 const int tag; 00234 00236 const double step; 00237 00239 string msg; 00240 00242 00243 const int parentTag; 00244 00246 const int idx; 00247 00249 const Value parentValue; 00250 00251 00253 00260 const double alpha; 00261 00263 00270 const double rho; 00271 00273 State state; 00274 00275 }; 00276 } 00277 00279 ostream& operator<<(ostream& stream, const APPSPACK::Point& point); 00280 00282 ostream& operator<<(ostream& stream, APPSPACK::Point::State state); 00283 00284 #endif
© Sandia Corporation | Site Contact | Privacy and Security
Generated on Wed Dec 14 18:41:04 2005 for APPSPACK 4.0.2 by
1.3.8 written by Dimitri van Heesch,
© 1997-2002