NOMAD Source
Version 4.0.0 Beta
|
#include <CacheInterface.hpp>
Public Member Functions | |
CacheInterface (const Step *step) | |
Constructor. More... | |
size_t | findBestFeas (std::vector< EvalPoint > &evalPointList, const EvalType &evalType, const Eval *refeval) const |
Find best feasible point(s) in cache. More... | |
size_t | findBestInf (std::vector< EvalPoint > &evalPointList, const Double &hMax, const EvalType &evalType, const Eval *refeval) const |
Find best infeasible point(s) in cache. More... | |
bool | smartInsert (const EvalPoint &evalPoint, const short maxNumberEval=1, const EvalType &evalType=EvalType::BB) |
Interface for CacheBase::smartInsert. More... | |
size_t | find (const Point &x, EvalPoint &evalPoint, const EvalType &evalType=EvalType::UNDEFINED) |
Interface for CacheBase::smartFind. More... | |
size_t | find (std::function< bool(const EvalPoint &)> crit, std::vector< EvalPoint > &evalPointList, bool findInSubspace=false) const |
Find points in the cache fulfilling a criteria. More... | |
size_t | getAllPoints (std::vector< EvalPoint > &evalPointList) const |
Get all points from the cache. More... | |
Private Member Functions | |
void | init () |
Helper for constructor. More... | |
Private Attributes | |
const Step * | _step |
Step that uses the Cache. More... | |
Point | _fixedVariable |
Full dimension point including fixed variables. More... | |
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 62 of file CacheInterface.hpp.
|
inlineexplicit |
Constructor.
step | The step using this CacheInterface |
Definition at line 74 of file CacheInterface.hpp.
size_t CacheInterface::find | ( | const Point & | x, |
EvalPoint & | evalPoint, | ||
const EvalType & | evalType = EvalType::UNDEFINED |
||
) |
size_t CacheInterface::find | ( | std::function< bool(const EvalPoint &)> | crit, |
std::vector< EvalPoint > & | evalPointList, | ||
bool | findInSubspace = false |
||
) | const |
Find points in the cache fulfilling a criteria.
crit | The criteria function (function of EvalPoint) – IN. |
evalPointList | The vector of EvalPoints found – OUT. |
findInSubspace | The flag to find in subspace – IN. |
size_t CacheInterface::findBestFeas | ( | std::vector< EvalPoint > & | evalPointList, |
const EvalType & | evalType, | ||
const Eval * | refeval | ||
) | const |
Find best feasible point(s) in cache.
evalPointList | The found evaluation points – OUT. |
evalType | Criteria for EvalType – IN. |
refeval | The point of reference – IN. |
size_t CacheInterface::findBestInf | ( | std::vector< EvalPoint > & | evalPointList, |
const Double & | hMax, | ||
const EvalType & | evalType, | ||
const Eval * | refeval | ||
) | const |
Find best infeasible point(s) in cache.
evalPointList | The found evaluation points – OUT. |
hMax | Points' h value must be under this value – IN. |
evalType | Points' EvalType to look at – IN. |
refeval | The point of reference – IN. |
size_t CacheInterface::getAllPoints | ( | std::vector< EvalPoint > & | evalPointList | ) | const |
Get all points from the cache.
evalPointList | The vector of EvalPoints – OUT |
|
private |
Helper for constructor.
bool CacheInterface::smartInsert | ( | const EvalPoint & | evalPoint, |
const short | maxNumberEval = 1 , |
||
const EvalType & | evalType = EvalType::BB |
||
) |
Interface for CacheBase::smartInsert.
The full dimension point is reconstructed from step fixed variables information.
evalPoint | The point to insert – IN. |
maxNumberEval | Maximun number of times this point may be evaluated – IN. |
evalType | Criteria for EvalType – IN. |
True
if the point may be sent for evaluation, false
otherwise
|
private |
Full dimension point including fixed variables.
Definition at line 67 of file CacheInterface.hpp.
|
private |
Step that uses the Cache.
Definition at line 66 of file CacheInterface.hpp.