00001 #ifndef PARTITION_DATA_H 00002 #define PARTITION_DATA_H 00003 00004 //-------------------------------------------------------------------- 00005 // 00006 // This file is part of PEACE. 00007 // 00008 // PEACE is free software: you can redistribute it and/or modify it 00009 // under the terms of the GNU General Public License as published by 00010 // the Free Software Foundation, either version 3 of the License, or 00011 // (at your option) any later version. 00012 // 00013 // PEACE is distributed in the hope that it will be useful, but 00014 // WITHOUT ANY WARRANTY; without even the implied warranty of 00015 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 // General Public License for more details. 00017 // 00018 // You should have received a copy of the GNU General Public License 00019 // along with PEACE. If not, see <http://www.gnu.org/licenses/>. 00020 // 00021 // Miami University makes no representations or warranties about the 00022 // suitability of the software, either express or implied, including 00023 // but not limited to the implied warranties of merchantability, 00024 // fitness for a particular purpose, or non-infringement. Miami 00025 // University shall not be liable for any damages suffered by licensee 00026 // as a result of using, result of using, modifying or distributing 00027 // this software or its derivatives. 00028 // 00029 // By using or copying this Software, Licensee agrees to abide by the 00030 // intellectual property laws, and all other applicable laws of the 00031 // U.S., and the terms of GNU General Public License (version 3). 00032 // 00033 // Authors: Dhananjai M. Rao raodm@muohio.edu 00034 // 00035 //--------------------------------------------------------------------- 00036 00037 /** A simple class to encapsulate data regarding a partition in the 00038 PMSTClusterMaker owned by a particular process. A partition is a 00039 subset of the EST data set. 00040 00041 \note This class is meant to be used only by the PMSTClusterMaker. 00042 */ 00043 class PartitionData { 00044 public: 00045 /** The constructor. 00046 00047 This constructor simply sets all the instance variables to 00048 corresponding values specified by the parameters. 00049 00050 \param[in] startESTidxValue The zero-based index of the EST 00051 that marks the beginning of this partition. 00052 00053 \param[in] estCountValue The count of ESTs belonging to this 00054 partition. 00055 */ 00056 PartitionData(const int startESTidxValue, const int estCountValue) : 00057 startESTidx(startESTidxValue), estCount(estCountValue), 00058 ownedESTCount(estCountValue) {} 00059 00060 /** The constructor. 00061 00062 This constructor simply sets all the instance variables to 00063 corresponding values specified by the parameters. 00064 00065 \param[in] startESTidxValue The zero-based index of the EST 00066 that marks the beginning of this partition. 00067 00068 \param[in] estCountValue The count of ESTs belonging to this 00069 partition. 00070 00071 \param[in] ownedESTCountValue The count of ESTs owned by this 00072 partition. 00073 */ 00074 PartitionData(const int startESTidxValue, const int estCountValue, 00075 const int ownedESTCountValue) : 00076 startESTidx(startESTidxValue), estCount(estCountValue), 00077 ownedESTCount(ownedESTCountValue) {} 00078 00079 /** The destructor. 00080 00081 This class does not contain any members that utilize dynamic 00082 memory to hold data. Consequently, the destructor has no 00083 special tasks to perform and is merely present to adhere to 00084 coding conventions. 00085 */ 00086 virtual ~PartitionData() {} 00087 00088 virtual int getPartitionManager() const 00089 { return -1; } 00090 00091 virtual int getWorkerCount() const 00092 { return 0; } 00093 00094 /** The zero-based index of the first EST in the partition. 00095 00096 */ 00097 int startESTidx; 00098 00099 /** The count of ESTs belonging to the partition. 00100 00101 */ 00102 int estCount; 00103 00104 /** The count of ESTs which are owned by this process. 00105 00106 */ 00107 int ownedESTCount; 00108 00109 protected: 00110 // Currently this class does not have any protected members. 00111 00112 private: 00113 // Currently this class does not have any private members. 00114 }; 00115 00116 #endif