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::Cache::Manager Class Reference

#include <APPSPACK_Cache_Manager.hpp>

Collaboration diagram for APPSPACK::Cache::Manager:

Collaboration graph
[legend]
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 85 of file APPSPACK_Cache_Manager.hpp.

Public Member Functions

 Manager (APPSPACK::Parameter::List &params, const Vector &scaling)
 ~Manager ()
bool insert (const Vector &x, const Vector &f)
 Add the given point to the cache.
bool isCached (const Vector &x, Vector &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 Vector &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 43 of file APPSPACK_Cache_Manager.cpp.

References APPSPACK::Parameter::List::getDoubleParameter(), APPSPACK::Parameter::List::getParameter(), APPSPACK::Parameter::List::getVectorParameter(), insert(), APPSPACK::Parameter::List::isParameterVector(), openOutputFile(), parseInputFile(), precision, and treeptr.

APPSPACK::Cache::Manager::~Manager  ) 
 

Destructor

Definition at line 66 of file APPSPACK_Cache_Manager.cpp.

References closeOutputFile().


Member Function Documentation

bool APPSPACK::Cache::Manager::insert const Vector x,
const Vector f
 

Add the given point to the cache.

Definition at line 72 of file APPSPACK_Cache_Manager.cpp.

References APPSPACK::Cache::SplayTree< Comparable >::insert(), treeptr, and writeToOutputFile().

Referenced by APPSPACK::Conveyor::exchange(), Manager(), and processInputLine().

bool APPSPACK::Cache::Manager::isCached const Vector x,
Vector f
 

Return true if x is cached and fill in the function value.

Definition at line 81 of file APPSPACK_Cache_Manager.cpp.

References APPSPACK::Cache::SplayTree< Comparable >::find(), APPSPACK::Cache::Point::getF(), and treeptr.

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 94 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 120 of file APPSPACK_Cache_Manager.cpp.

References APPSPACK::getNextDouble(), APPSPACK::getNextString(), insert(), APPSPACK::Vector::push_back(), and APPSPACK::Vector::resize().

Referenced by parseInputFile().

void APPSPACK::Cache::Manager::openOutputFile APPSPACK::Parameter::List params  )  [private]
 

Open the output line for the cache.

Definition at line 193 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 Vector f
[private]
 

Write a given cache point to the output file.

Definition at line 212 of file APPSPACK_Cache_Manager.cpp.

References fout, APPSPACK::Vector::leftshift(), and precision.

Referenced by insert().

void APPSPACK::Cache::Manager::closeOutputFile  )  [private]
 

Close the output file.

Definition at line 226 of file APPSPACK_Cache_Manager.cpp.

References fout.

Referenced by ~Manager().


Member Data Documentation

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

Pointer to splay tree containing the cache.

Definition at line 121 of file APPSPACK_Cache_Manager.hpp.

Referenced by insert(), isCached(), and Manager().

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

Use cache output file?

Definition at line 124 of file APPSPACK_Cache_Manager.hpp.

Referenced by openOutputFile().

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

Cache output file.

Definition at line 127 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 130 of file APPSPACK_Cache_Manager.hpp.

Referenced by Manager(), and writeToOutputFile().


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

 

© Sandia Corporation | Site Contact | Privacy and Security

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