4.2. pyopus.optimizer.cache — Caching of function and constraint values, and annotations¶
Point caching (PyOPUS subsystem name: CACHE)
-
class
pyopus.optimizer.cache.Cache¶ Cache for storing points. The point is the key. Every point has an object associated with it.
-
getHits()¶ Returns cache hit count.
-
insert(point, value)¶ Inserts an object value for point point.
Returns
Trueif a point in the cache is replaced.
-
lookup(point)¶ Looks up a point and returns the associated object.
Returns
Noneif the point is not in the cache.Increases hit count if the point is found in the cache.
-
remove(point)¶ Removes a point from the cache.
Returns
Trueif a point is found and removed.
-
reset()¶ Clears cache and resets hit count.
-