Sandia Home Sandia Home
Main Page | Publications | Downloads | Configuration | Running the Code | Solver Parameters | FAQ | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

APPSPACK_Point.hpp

Go to the documentation of this file.
00001 // $Id: APPSPACK_Point.hpp,v 1.15 2006/06/30 01:42:08 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_Combiner_Generic.hpp"
00043 
00044 namespace APPSPACK
00045 {
00047 
00054 class Point 
00055 {
00056 public:
00057 
00059   enum State
00060     {
00062       Infeasible,
00063 
00065       Unevaluated,
00066 
00069       CachedInsufficientDecrease,
00070       
00072       Cached,
00073       
00076       EvaluatedInsufficientDecrease,
00077 
00080       Evaluated
00081     };
00082 
00084 
00096   Point(const Vector& x_in, const Vector& f_in, 
00097         double step_in, double alpha_in,
00098         Combiner::Generic& combiner_in);
00099 
00118   Point(const Vector& x_in, double step_in, const Point& parent, int idx_in);
00119 
00121 
00123 
00124   ~Point();
00126 
00128 
00130   const Vector& getX() const;
00131 
00133   double getF() const;
00134 
00136   const Vector& getVecF() const;
00137 
00139   int getTag() const;
00140 
00142   int getParentTag() const;
00143 
00145   int getIndex() const;
00146   
00148   double getStep() const;
00149 
00151 
00153 
00157   void setCachedFunctionValue(const Vector& f_in, const string& msg_in);
00158 
00162   void setEvaluatedFunctionValue(const Vector& f_in, const string& msg_in);
00163 
00166   void setInfeasible();
00167 
00169 
00171 
00205   bool operator<(const Point& other) const;
00206 
00208   bool lessThan(const Vector& value) const;
00209 
00211   bool greaterThan(const Vector& value) const;
00213 
00215  
00217   ostream& leftshift(ostream& stream) const;
00218 
00219 
00221 
00222 private:
00223 
00225   void operator=(const Point& source);
00226 
00228   Point(const Point& source);
00229 
00231   bool isSufficientDecrease() const;
00232   
00233 private:
00234 
00236   static int staticCount;
00237 
00239   Combiner::Generic& combiner;
00240 
00242   const Vector x;
00243 
00245   Vector f;
00246 
00248   const int tag;
00249 
00251   const double step;
00252 
00254   string msg;
00255 
00257 
00258   const int parentTag;
00259 
00261   const int idx;
00262 
00264   const double parentF;
00265 
00266 
00268 
00275   const double alpha;
00276 
00278 
00285   const double rho;
00286 
00288   State state;
00289 
00290 };
00291 }
00292 
00294 ostream& operator<<(ostream& stream, const APPSPACK::Point& point);
00295 
00297 ostream& operator<<(ostream& stream, APPSPACK::Point::State state);
00298 
00299 #endif

 

© Sandia Corporation | Site Contact | Privacy and Security

Generated on Fri Feb 16 10:33:35 2007 for APPSPACK 5.0.1 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2002