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

# APPSPACK::Cache::Manager Class Reference

`#include <APPSPACK_Cache_Manager.hpp>`

List of all members.

## Detailed Description

Actual cache object. Stored the cached points in a splay tree.

Author:
  H. Alton Patrick, Summer 2000

  Tamara G. Kolda

Definition at line 84 of file APPSPACK_Cache_Manager.hpp.

## Public Member Functions
| Manager (APPSPACK::Parameter::List &params, const Vector &scaling)
| ~Manager ()
bool | insert (const Vector &x, const Value &f)
| Add the given point to the cache.
bool | isCached (const Vector &x, Value &f)
| Return true if x is cached and fill in the function value.
## Private Member Functions
void | parseInputFile (APPSPACK::Parameter::List &params)
| Parse the cache input file (reading the name from the parameter list).
void | processInputLine (string &line)
| Process a single line from the input file.
void | openOutputFile (APPSPACK::Parameter::List &params)
| Open the output line for the cache.
void | writeToOutputFile (const Vector &x, const Value &f)
| Write a given cache point to the output file.
void | closeOutputFile ()
| Close the output file.
## Private Attributes
SplayTree< Cache::Point > * | treeptr
| Pointer to splay tree containing the cache.
bool | isFout
| Use cache output file?
ofstream | fout
| Cache output file.
int | precision
| Precision of output (determined by tolerance).

## Constructor & Destructor Documentation

APPSPACK::Cache::Manager::Manager | ( | APPSPACK::Parameter::List & | params,
|  | const Vector & | scaling
| ) |

| Constructor Definition at line 42 of file APPSPACK_Cache_Manager.cpp. References APPSPACK::Parameter::List::getDoubleParameter(), APPSPACK::Parameter::List::getParameter(), APPSPACK::Parameter::List::getValueParameter(), APPSPACK::Parameter::List::getVectorParameter(), insert(), APPSPACK::Parameter::List::isParameterDouble(), APPSPACK::Parameter::List::isParameterValue(), APPSPACK::Parameter::List::isParameterVector(), openOutputFile(), parseInputFile(), precision, treeptr, and APPSPACK::Vector.

APPSPACK::Cache::Manager::~Manager | ( |  | ) |

| Destructor Definition at line 62 of file APPSPACK_Cache_Manager.cpp. References closeOutputFile(), and treeptr.

## Member Function Documentation

bool APPSPACK::Cache::Manager::insert | ( | const Vector & | x,
|  | const Value & | f
| ) |

| Add the given point to the cache. Definition at line 68 of file APPSPACK_Cache_Manager.cpp. References treeptr, APPSPACK::Vector, and writeToOutputFile(). Referenced by APPSPACK::Conveyor::exchange(), Manager(), and processInputLine().

bool APPSPACK::Cache::Manager::isCached | ( | const Vector & | x,
|  | Value & | f
| ) |

| Return true if x is cached and fill in the function value. Definition at line 77 of file APPSPACK_Cache_Manager.cpp. References APPSPACK::Cache::Point::getF(), treeptr, and APPSPACK::Vector. Referenced by APPSPACK::Conveyor::exchange().

void APPSPACK::Cache::Manager::parseInputFile | ( | APPSPACK::Parameter::List & | params | ) | `[private]`

| Parse the cache input file (reading the name from the parameter list). Definition at line 90 of file APPSPACK_Cache_Manager.cpp. References APPSPACK::Parameter::List::getParameter(), and processInputLine(). Referenced by Manager().

void APPSPACK::Cache::Manager::processInputLine | ( | string & | line | ) | `[private]`

| Process a single line from the input file. Definition at line 116 of file APPSPACK_Cache_Manager.cpp. References APPSPACK::getNextDouble(), APPSPACK::getNextString(), insert(), APPSPACK::Value::setValueTo(), and APPSPACK::Vector. Referenced by parseInputFile().

void APPSPACK::Cache::Manager::openOutputFile | ( | APPSPACK::Parameter::List & | params | ) | `[private]`

| Open the output line for the cache. Definition at line 181 of file APPSPACK_Cache_Manager.cpp. References fout, APPSPACK::Parameter::List::getParameter(), and isFout. Referenced by Manager().

void APPSPACK::Cache::Manager::writeToOutputFile | ( | const Vector & | x,
|  | const Value & | f
| ) | `[private]`

| Write a given cache point to the output file. Definition at line 200 of file APPSPACK_Cache_Manager.cpp. References fout, APPSPACK::Value::getIsValue(), APPSPACK::Value::getValue(), isFout, precision, and APPSPACK::Vector. Referenced by insert().

void APPSPACK::Cache::Manager::closeOutputFile | ( |  | ) | `[private]`

| Close the output file. Definition at line 221 of file APPSPACK_Cache_Manager.cpp. References fout, and isFout. Referenced by ~Manager().

## Member Data Documentation

SplayTree<Cache::Point>* APPSPACK::Cache::Manager::treeptr`[private]`

| Pointer to splay tree containing the cache. Definition at line 120 of file APPSPACK_Cache_Manager.hpp. Referenced by insert(), isCached(), Manager(), and ~Manager().

bool APPSPACK::Cache::Manager::isFout`[private]`

| Use cache output file? Definition at line 123 of file APPSPACK_Cache_Manager.hpp. Referenced by closeOutputFile(), openOutputFile(), and writeToOutputFile().

ofstream APPSPACK::Cache::Manager::fout`[private]`

| Cache output file. Definition at line 126 of file APPSPACK_Cache_Manager.hpp. Referenced by closeOutputFile(), openOutputFile(), and writeToOutputFile().

int APPSPACK::Cache::Manager::precision`[private]`

| Precision of output (determined by tolerance). Definition at line 129 of file APPSPACK_Cache_Manager.hpp. Referenced by Manager(), and writeToOutputFile().

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

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