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_List.hpp

Go to the documentation of this file.
00001 // $Id: APPSPACK_List.hpp,v 1.10 2005/10/10 16:47:58 jgriffi Exp $ 
00002 // $Source: /space/CVS-Acro/acro/packages/appspack/appspack/src/APPSPACK_List.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_LIST_HPP
00038 #define APPSPACK_LIST_HPP
00039 
00040 #include "APPSPACK_Point.hpp"
00041 
00042 namespace APPSPACK
00043 {
00044 
00057 class List
00058 {
00059 public:
00060 
00062   List();
00063 
00065   ~List();
00066 
00067 
00069 
00071   bool isEmpty() const;
00072 
00074   bool isNotEmpty() const;
00075 
00077   int size() const;
00078 
00081   const Point& best();
00082     
00084 
00086 
00088 
00091   void push(Point* trialPointPtr);
00092 
00094 
00098   Point* pop();
00099 
00101 
00105   Point* pop(int tag);
00106 
00114   void insertList(List& source);
00115 
00117 
00124   Point* popBest();
00125 
00130   void prune(int n = 0);
00131 
00133 
00135 
00137 
00141   void print(const string label) const;
00142 
00144 
00145 private:
00146 
00148   void moveBestToEndOfList();
00149     
00150 private:
00151 
00153   typedef list<Point*> TPL;
00154 
00156 
00157   TPL tpl;
00158 
00160   bool isValidBest;
00161 };
00162 
00163 
00164 }
00165 #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