#include <NOX_Direction_Broyden.H>
Public Member Functions | |
| BroydenMemory () | |
| Constructor. | |
| ~BroydenMemory () | |
| Destructor. | |
| void | reset (int m) |
| Reset the memory. | |
| void | reset () |
| Reset the memory. | |
| void | push (const NOX::Abstract::Vector &d) |
| Add new information to the memory. | |
| bool | empty () const |
| Returns true if the memory is empty. | |
| int | size () const |
| Number of items in memory. | |
| BroydenMemoryUnit & | operator[] (int i) |
| Return the ith MemoryUnit (unchecked access). | |
Store up to
MemoryUnit objects where
is passed to reset(). Every time push() is called, a new MemoryUnit is added. If there are already
MemoryUnit's, the oldest is bumped off the list. The zero-th entry is always the oldest.
| NOX::Direction::Broyden::BroydenMemory::BroydenMemory | ( | ) |
Constructor.
Does nothing.
| NOX::Direction::Broyden::BroydenMemory::~BroydenMemory | ( | ) |
Destructor.
Does nothing.
| NOX::Direction::Broyden::BroydenMemoryUnit & NOX::Direction::Broyden::BroydenMemory::operator[] | ( | int | i | ) |
Return the ith MemoryUnit (unchecked access).
The zero entry is the oldest memory. The m-1 entry is the newest entry (where m denotes the memory size).
| void NOX::Direction::Broyden::BroydenMemory::push | ( | const NOX::Abstract::Vector & | d | ) |
Add new information to the memory.
We need to calculate where the new udpate should be stored in memory and update the information in index.
Let k denote the index of where the new update should be stored. If there are current m items stored in memory and m < mMax, then we set k = m. Otherwise, we set k equal to the location of the oldest update. The oldest update is deleted to make room for the new update. In both cases, index must be updated appropriately so that the first (zero) entry points to the oldest update and the last entry points to the newest update.
| void NOX::Direction::Broyden::BroydenMemory::reset | ( | ) |
Reset the memory.
Sets the size of the index vector to be zero.
| void NOX::Direction::Broyden::BroydenMemory::reset | ( | int | m | ) |
Reset the memory.
Sets mMax to the value of m. Sets the size of the memory vector to be at least mMax. Sets the capacity of the index vector to be at least mMax. Sets the size of the index vector to be zero.
1.4.7