ppALIGN API documentation
CheckpointDriver Class Reference
#include <checkpoint.hpp>
Public Member Functions | |
| virtual | ~CheckpointDriver () |
| virtual void | FirstPassForward (long last_row, long current_row, long row_i)=0 |
| virtual void | Forward (long last_row, long current_row, long row_i)=0 |
| virtual bool | Backward (long current_row, long row_i)=0 |
| virtual long | SpaceAvail ()=0 |
| virtual void | ForwardDone () |
| virtual long | StartBackward () |
| virtual long | SpaceRequired ()=0 |
Detailed Description
A base class for checkpointing algorithms. Derive this class to implement own dynamic programing algorithms that might rely on forward and backward computation or backward sampling. Whether or not checkpointing is required or not is not essential in the implementation of the algorithms.
The main concept is that the drivers provide the number of rows that would be required by the full computation (CheckpointDriver::SpaceRequired()) and the number of available rows in the workspace (CheckpointDriver::SpaceAvail()) to the main checkpoint aligorithms (e.g. void LinearSpaceComputation(CheckpointDriver & d, bool forward_done_event=true), void QuadraticSpaceComputation(CheckpointDriver & d), or void OptimalCheckpoint(CheckpointDriver & driver)).
Definition at line 49 of file checkpoint.hpp.
Constructor & Destructor Documentation
| virtual CheckpointDriver::~CheckpointDriver | ( | ) | [inline, virtual] |
default destructor.
Definition at line 54 of file checkpoint.hpp.
Member Function Documentation
| virtual bool CheckpointDriver::Backward | ( | long | current_row, | |
| long | row_i | |||
| ) | [pure virtual] |
Method that is called when the one forward row and the corresponding backward row is available.
- Returns:
- true if the algorithm is not finished yet
Implemented in DemoCheckpointDriver.
| virtual void CheckpointDriver::FirstPassForward | ( | long | last_row, | |
| long | current_row, | |||
| long | row_i | |||
| ) | [pure virtual] |
Method that realizes the event when a row is computed for the first time.
Implemented in DemoCheckpointDriver.
| virtual void CheckpointDriver::Forward | ( | long | last_row, | |
| long | current_row, | |||
| long | row_i | |||
| ) | [pure virtual] |
Method that realizes the event when a row is computed for the second (or more) time
Implemented in DemoCheckpointDriver.
| virtual void CheckpointDriver::ForwardDone | ( | ) | [inline, virtual] |
Event when the first forward pass is finished.
Definition at line 77 of file checkpoint.hpp.
| virtual long CheckpointDriver::SpaceAvail | ( | ) | [pure virtual] |
- Returns:
- Number of rows that are availible.
Implemented in DemoCheckpointDriver.
| virtual long CheckpointDriver::SpaceRequired | ( | ) | [pure virtual] |
- Returns:
- number of rows that have to be computed.
Implemented in DemoCheckpointDriver.
| virtual long CheckpointDriver::StartBackward | ( | ) | [virtual] |
Row where the backward computation starts.
- Returns:
- by default SpaceRequired() - 1
Reimplemented in DemoCheckpointDriver.
The documentation for this class was generated from the following file:
- src/checkpoint.hpp