Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

# APPSPACK::List Class Reference

`#include <APPSPACK_List.hpp>`

List of all members.

## Detailed Description

Manipulates a list of Point objects.

These lists are used in several ways.

Each iteration of APPS, a list of trial points is generated by Solver::generateTrialPoints. This list is passed to the Evaluator. The evaluator empties the list into its queue. Then it refills and returns the list with evaluated points.

The queue in the Evaluator is also a list of trial points.

Definition at line 57 of file APPSPACK_List.hpp.

## Public Member Functions
| List ()
| Constructor.
| ~List ()
| Desctructor: deletes the contents of the current list.
Accessors
bool | isEmpty () const
bool | isNotEmpty () const
int | size () const
const Point & | best ()
Manipulators
void | push (Point *trialPointPtr)
| Push the given Point onto the list.
Point * | pop ()
| Pop the next Point from the list.
Point * | pop (int tag)
| Pop the Point with the given tag.
void | insertList (List &source)
| Insert the source list into this list and empty the source list.
Point * | popBest ()
| Pop the best Point off the list.
void | prune (int n=0)
| Prune the list except for the most recently added n points.
Printing
void | print (const string label) const
| Print out the given trial point list, preceeded by the specified label.
## Private Types
typedef list< Point * > | TPL
| A list of pointers to trial points.
## Private Member Functions
void | moveBestToEndOfList ()
| Move the best point to the end of the list.
## Private Attributes
TPL | tpl
| The list of trial points.
bool | isValidBest
| True if the best pointer is valid.

## Member Typedef Documentation

typedef list<Point*> APPSPACK::List::TPL`[private]`

| A list of pointers to trial points. Definition at line 153 of file APPSPACK_List.hpp.

## Constructor & Destructor Documentation

APPSPACK::List::List | ( |  | ) |

| Constructor. Definition at line 41 of file APPSPACK_List.cpp.

APPSPACK::List::~List | ( |  | ) |

| Desctructor: deletes the contents of the current list. Definition at line 47 of file APPSPACK_List.cpp. References prune().

## Member Function Documentation

bool APPSPACK::List::isEmpty | ( |  | ) | const

| Return true of the list is empty Definition at line 52 of file APPSPACK_List.cpp. References tpl. Referenced by APPSPACK::Solver::processEvaluatedTrialPoints().

bool APPSPACK::List::isNotEmpty | ( |  | ) | const

| Return true of the list is not empty Definition at line 57 of file APPSPACK_List.cpp. References tpl. Referenced by APPSPACK::Conveyor::exchange().

int APPSPACK::List::size | ( |  | ) | const

| Return size Definition at line 62 of file APPSPACK_List.cpp. References tpl. Referenced by APPSPACK::Conveyor::exchange(), and prune().

const APPSPACK::Point & APPSPACK::List::best | ( |  | ) |

| Moves the best Point to the end of the list (if it's not already there). Definition at line 163 of file APPSPACK_List.cpp. References moveBestToEndOfList(), and tpl. Referenced by APPSPACK::Solver::processEvaluatedTrialPoints().

void APPSPACK::List::push | ( | Point * | trialPointPtr | ) |

| Push the given Point onto the list. The Point is pushed onto the front of the list. The list takes ownership for the given pointer. Definition at line 67 of file APPSPACK_List.cpp. References isValidBest, and tpl. Referenced by APPSPACK::Conveyor::exchange(), and APPSPACK::Solver::generateTrialPoints().

APPSPACK::Point * APPSPACK::List::pop | ( |  | ) |

| Pop the next Point from the list. If the list is empty, returns NULL. Otherwise, pops a Point off the end of the list. Ownership of the pointer is passed on to the calling object. Definition at line 101 of file APPSPACK_List.cpp. References isValidBest, and tpl. Referenced by APPSPACK::Conveyor::exchange(), popBest(), APPSPACK::Solver::processEvaluatedTrialPoints(), and prune().

APPSPACK::Point * APPSPACK::List::pop | ( | int | tag | ) |

| Pop the Point with the given tag. If the Point with the given tag is not in the list, returns NULL. Otherwise, it pops the Point with the given tag off the list. Ownership of the pointer is passed on to the calling object. Definition at line 112 of file APPSPACK_List.cpp. References isValidBest, and tpl.

void APPSPACK::List::insertList | ( | List & | source | ) |

| Insert the source list into this list and empty the source list. Insert the given source list at the front of this list. This list takes ownership of all the pointers in the source list, and the source list is emptied. Definition at line 73 of file APPSPACK_List.cpp. References isValidBest, and tpl. Referenced by APPSPACK::Conveyor::exchange().

APPSPACK::Point * APPSPACK::List::popBest | ( |  | ) |

| Pop the best Point off the list. The best trial Point is defined as the Point with the smallest function value. If the list is empty, returns NULL. Otherwise, it pops the best Point off the list. Ownership of the pointer is passed on to the calling object. Definition at line 169 of file APPSPACK_List.cpp. References moveBestToEndOfList(), and pop(). Referenced by APPSPACK::Solver::processEvaluatedTrialPoints().

void APPSPACK::List::prune | ( | int | n = `0` | ) |

| Prune the list except for the most recently added n points. The most recently added points are at the front of the list. Definition at line 80 of file APPSPACK_List.cpp. References pop(), size(), and tpl. Referenced by APPSPACK::Solver::processEvaluatedTrialPoints(), APPSPACK::Conveyor::prune(), APPSPACK::Conveyor::~Conveyor(), and ~List().

void APPSPACK::List::print | ( | const string | label | ) | const

| Print out the given trial point list, preceeded by the specified label. Prints the list out in reverse order; i.e., starts with the end of the list. This means that the objects that are first pushed onto the will be printed first. Definition at line 175 of file APPSPACK_List.cpp. References tpl. Referenced by APPSPACK::Solver::generateTrialPoints(), and APPSPACK::Solver::processEvaluatedTrialPoints().

void APPSPACK::List::moveBestToEndOfList | ( |  | ) | `[private]`

| Move the best point to the end of the list. Definition at line 132 of file APPSPACK_List.cpp. References isValidBest, and tpl. Referenced by best(), and popBest().

## Member Data Documentation

TPL APPSPACK::List::tpl`[private]`

| The list of trial points. Add to the front, remove from the back. Definition at line 157 of file APPSPACK_List.hpp. Referenced by best(), insertList(), isEmpty(), isNotEmpty(), moveBestToEndOfList(), pop(), print(), prune(), push(), and size().

bool APPSPACK::List::isValidBest`[private]`

| True if the best pointer is valid. Definition at line 160 of file APPSPACK_List.hpp. Referenced by insertList(), moveBestToEndOfList(), pop(), and push().

The documentation for this class was generated from the following files:

- APPSPACK_List.hpp
- APPSPACK_List.cpp

© Sandia Corporation | Site Contact | Privacy and Security

Generated on Wed Dec 14 18:41:05 2005 for APPSPACK 4.0.2 by 1.3.8 written by Dimitri van Heesch, © 1997-2002