A version of the MSTHeapCache that is specialized to work with the Partitioned MST Cluster Maker. More...
#include <PMSTHeapCache.h>
Public Member Functions | |
PMSTHeapCache (const int totalESTCount, const int startOwnESTidx, const int numOwnESTs, const ESTAnalyzer *analyzer) | |
The constructor. | |
virtual | ~PMSTHeapCache () |
The destructor. | |
virtual void | popBestEntry (int &srcESTidx, int &destESTidx, float &metric, int &alignmentData) |
Obtains and removes the top-most similar entry from the MSTCache. |
A version of the MSTHeapCache that is specialized to work with the Partitioned MST Cluster Maker.
It provides some special functionality needed to construct the full MST using Kruskal's algorithm after merging MSTs that were constructed in parallel.
This class is not designed for use by any subclasses and should not be extended.
Definition at line 47 of file PMSTHeapCache.h.
PMSTHeapCache::PMSTHeapCache | ( | const int | totalESTCount, | |
const int | startOwnESTidx, | |||
const int | numOwnESTs, | |||
const ESTAnalyzer * | analyzer | |||
) |
The constructor.
This MST cache requires information about the number of ESTs in the system in order to effectively track the ESTs already added to the MST. These values must be passed in as the various parameters to this class. The constructor essentially passes off the parameters to the base class that saves the information (for future reference) in suitable instance variables.
[in] | totalESTCount | The total number of ESTs to be processed (that is, to be added to the MST). |
[in] | startOwnESTidx | The starting index of the EST that is owned by the process that is using this cache. This value is used to internally normalize est index values to 0 for the first EST owned by this process. |
[in] | numOwnESTs | The number of ESTs owned by the process that is using this cache. This information is used to reserve necessary space to hold SMLists for each EST owned by the manager/worker process. |
[in] | analyzer | The analyzer to be used for EST comparisons, comparing metrics, and ordering entries in this cache depending on the type of EST analyzer (whether it is similarity based or distance metric based). |
Definition at line 39 of file PMSTHeapCache.cpp.
virtual PMSTHeapCache::~PMSTHeapCache | ( | ) | [inline, virtual] |
The destructor.
The STL data structures used by this class manage all the memory operations for this class. Consequently, the destructor does not have any special tasks to perform. It here present merely to adhere to coding conventions.
Definition at line 90 of file PMSTHeapCache.h.
void PMSTHeapCache::popBestEntry | ( | int & | srcESTidx, | |
int & | destESTidx, | |||
float & | metric, | |||
int & | alignmentData | |||
) | [virtual] |
Obtains and removes the top-most similar entry from the MSTCache.
This method simply uses the top-most entry in the heap and populates the parameters with the appropriate value. Note that the parameters are initialized to -1, -1, -1.0f, and -1 respectively.
[out] | srcESTidx | The source EST index from where the similarity metric is being measured. The srcESTidx is already present in the MST. |
[out] | destESTidx | The destination EST index that is the best choice to be added to the MST (based on the local information). |
[out] | metric | The similarity/distance metric between the srcESTidx and the destESTidx. |
[out] | alignmentData | The alignment data associated with the srcESTidx and the destESTidx. |
Definition at line 49 of file PMSTHeapCache.cpp.
References MSTHeapCache::getBestEntry(), and MSTHeapCache::popCache().
Referenced by PMSTClusterMaker::mergeManager().