NOMAD Source  Version 4.0.0 Beta
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CacheInterface Class Reference

#include <CacheInterface.hpp>

Collaboration diagram for CacheInterface:

Public Member Functions

 CacheInterface (const Step *step)
 Constructor. More...
 
size_t findBestFeas (std::vector< EvalPoint > &evalPointList, const Point &fixedVariable=Point()) const
 Find best feasible(s) in cache. More...
 
size_t findBestInf (std::vector< EvalPoint > &evalPointList, const Double &hMax=INF, const Point &fixedVariable=Point()) const
 Find best infeasible(s) in cache. More...
 
bool smartInsert (const EvalPoint &evalPoint, const short maxNumberEval=1)
 Insert a full dimension point. More...
 
size_t find (const Point x, EvalPoint &evalPoint)
 Find a full dimension point in cache. More...
 

Private Member Functions

void init ()
 Helper for constructor. More...
 

Static Private Member Functions

static void convertPointListToSub (std::vector< EvalPoint > &evalPointList, const Point &fixedVariable)
 Helper for find functions. More...
 

Private Attributes

const Step_step
 Step that uses the Cache. More...
 

Detailed Description

Used by algorithm and step classes. The CacheInterface takes care of converting points from subproblems to full dimension before adding them to the cache, and from full dimension to subproblems when retrieving them from the cache.

Definition at line 18 of file CacheInterface.hpp.

Constructor & Destructor Documentation

CacheInterface::CacheInterface ( const Step step)
inlineexplicit

Constructor.

Parameters
stepThe step using this CacheInterface

Definition at line 29 of file CacheInterface.hpp.

30  : _step(step)
31  {
32  init();
33  }
void init()
Helper for constructor.
const Step * _step
Step that uses the Cache.

Member Function Documentation

static void CacheInterface::convertPointListToSub ( std::vector< EvalPoint > &  evalPointList,
const Point fixedVariable 
)
staticprivate

Helper for find functions.

size_t CacheInterface::find ( const Point  x,
EvalPoint evalPoint 
)

Find a full dimension point in cache.

The full dimension point is reconstructed from step fixed variables information.

size_t CacheInterface::findBestFeas ( std::vector< EvalPoint > &  evalPointList,
const Point fixedVariable = Point() 
) const

Find best feasible(s) in cache.

Parameters
evalPointListThe returned evaluation points – OUT.
fixedVariableDefinition of fixed variables – IN.
Returns
Number of feasible poins in cache
size_t CacheInterface::findBestInf ( std::vector< EvalPoint > &  evalPointList,
const Double hMax = INF,
const Point fixedVariable = Point() 
) const

Find best infeasible(s) in cache.

Parameters
evalPointListThe returned evaluation points – OUT.
fixedVariableDefinition of fixed variables – IN.
Returns
Number of infeasible poins in cache
void CacheInterface::init ( )
private

Helper for constructor.

bool CacheInterface::smartInsert ( const EvalPoint evalPoint,
const short  maxNumberEval = 1 
)

Insert a full dimension point.

The full dimension point is reconstructed from step fixed variables information.

Member Data Documentation

const Step* CacheInterface::_step
private

Step that uses the Cache.

Definition at line 22 of file CacheInterface.hpp.


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