Ipopt
3.12.12
|
Templated class which stores one entry for the CachedResult class. More...
#include <IpCachedResults.hpp>
Public Member Functions | |
bool | DependentsIdentical (const std::vector< const TaggedObject * > &dependents, const std::vector< Number > &scalar_dependents) const |
This method returns true if the dependencies provided to this function are identical to the ones stored with the DependentResult. More... | |
void | DebugPrint () const |
Print information about this DependentResults. More... | |
Constructor, Destructors | |
DependentResult (const T &result, const std::vector< const TaggedObject * > &dependents, const std::vector< Number > &scalar_dependents) | |
Constructor, given all information about the result. More... | |
~DependentResult () | |
Destructor. More... | |
Accessor method. | |
bool | IsStale () const |
This returns true, if the DependentResult is no longer valid. More... | |
void | Invalidate () |
Invalidates the cached result. More... | |
const T & | GetResult () const |
Returns the cached result. More... | |
![]() | |
Observer () | |
Default Constructor. More... | |
virtual | ~Observer () |
Default destructor. More... | |
Protected Member Functions | |
virtual void | RecieveNotification (NotifyType notify_type, const Subject *subject) |
This method is overloading the pure virtual method from the Observer base class. More... | |
![]() | |
void | RequestAttach (NotifyType notify_type, const Subject *subject) |
Derived classes should call this method to request an "Attach" to a Subject. More... | |
void | RequestDetach (NotifyType notify_type, const Subject *subject) |
Derived classes should call this method to request a "Detach" to a Subject. More... | |
Private Member Functions | |
Default Compiler Generated Methods | |
(Hidden to avoid implicit creation/calling). These methods are not implemented and we do not want the compiler to implement them for us, so we declare them private and do not define them. This ensures that they will not be implicitly created/called. | |
DependentResult () | |
Default Constructor. More... | |
DependentResult (const DependentResult &) | |
Copy Constructor. More... | |
void | operator= (const DependentResult &) |
Overloaded Equals Operator. More... | |
Private Attributes | |
bool | stale_ |
Flag indicating, if the cached result is still valid. More... | |
const T | result_ |
The value of the dependent results. More... | |
std::vector< TaggedObject::Tag > | dependent_tags_ |
Dependencies in form of TaggedObjects. More... | |
std::vector< Number > | scalar_dependents_ |
Dependencies in form a Numbers. More... | |
Additional Inherited Members | |
![]() | |
enum | NotifyType { NT_All, NT_BeingDestroyed, NT_Changed } |
Enumeration specifying the type of notification. More... | |
Templated class which stores one entry for the CachedResult class.
It stores the result (of type T), together with its dependencies (vector of TaggedObjects and vector of Numbers). It also stores a priority.
Definition at line 31 of file IpCachedResults.hpp.
Ipopt::DependentResult< T >::DependentResult | ( | const T & | result, |
const std::vector< const TaggedObject * > & | dependents, | ||
const std::vector< Number > & | scalar_dependents | ||
) |
Constructor, given all information about the result.
Definition at line 348 of file IpCachedResults.hpp.
Ipopt::DependentResult< T >::~DependentResult | ( | ) |
Destructor.
Definition at line 381 of file IpCachedResults.hpp.
|
private |
Default Constructor.
|
private |
Copy Constructor.
bool Ipopt::DependentResult< T >::IsStale | ( | ) | const |
This returns true, if the DependentResult is no longer valid.
Definition at line 393 of file IpCachedResults.hpp.
void Ipopt::DependentResult< T >::Invalidate | ( | ) |
Invalidates the cached result.
Definition at line 399 of file IpCachedResults.hpp.
const T & Ipopt::DependentResult< T >::GetResult | ( | ) | const |
Returns the cached result.
Definition at line 456 of file IpCachedResults.hpp.
bool Ipopt::DependentResult< T >::DependentsIdentical | ( | const std::vector< const TaggedObject * > & | dependents, |
const std::vector< Number > & | scalar_dependents | ||
) | const |
This method returns true if the dependencies provided to this function are identical to the ones stored with the DependentResult.
Definition at line 419 of file IpCachedResults.hpp.
void Ipopt::DependentResult< T >::DebugPrint | ( | ) | const |
Print information about this DependentResults.
Definition at line 467 of file IpCachedResults.hpp.
|
protectedvirtual |
This method is overloading the pure virtual method from the Observer base class.
This method is called when a Subject registered for this Observer sends a notification. In this particular case, if this method is called with notify_type==NT_Changed or NT_BeingDeleted, then this results is marked as stale.
Implements Ipopt::Observer.
Definition at line 405 of file IpCachedResults.hpp.
|
private |
Overloaded Equals Operator.
|
private |
Flag indicating, if the cached result is still valid.
A result becomes invalid, if the RecieveNotification method is called with NT_Changed
Definition at line 330 of file IpCachedResults.hpp.
|
private |
The value of the dependent results.
Definition at line 332 of file IpCachedResults.hpp.
|
private |
Dependencies in form of TaggedObjects.
Definition at line 334 of file IpCachedResults.hpp.
|
private |
Dependencies in form a Numbers.
Definition at line 336 of file IpCachedResults.hpp.