00001 #ifndef CACHED_EST_INFO_H 00002 #define CACHED_EST_INFO_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 to be cached about ESTs. 00038 00039 This class represents the final (atomic) entry in the MSTCache 00040 data structure. This class is meant to serve just as an 00041 encapsulation class. Consequently, it is very straightfoward and 00042 exposes all the fields in it directly. 00043 00044 \note This class is meant to be used only by the MSTCache. 00045 */ 00046 class CachedESTInfo { 00047 public: 00048 /** The default constructor. 00049 00050 This class is heavily used in conjunction with STL containers 00051 (such as std::vector). Consequently, the default constructor 00052 is called very frequently when entries are added to the 00053 MSTCache. Therefore the constructor is very straightfoward to 00054 the point that it does absolutely nothing and is merely 00055 present to adhere to coding conventions. 00056 */ 00057 CachedESTInfo() {} 00058 00059 /** A convenience all parameter constructor. 00060 00061 This is a convenience constructor that is used to set up all 00062 the instance variables to corresponding values specified by 00063 the parameters. 00064 00065 \param[in] refESTidxValue The zero-based index of the EST that 00066 was used as the reference EST which which EST at index \c 00067 estIdxValue was compared/analyzed to generate the \c 00068 metricValue. 00069 00070 \param[in] estIdxValue The zero-based index of the EST that 00071 was compared against the EST at index \c refESTidx to generate 00072 \c metricValue. 00073 00074 \param[in] metricValue The similarity/distance metric value to 00075 be stored in this object. 00076 00077 \param[in] alignmentDataValue Additional alignment information 00078 to be stored in this class. 00079 00080 \param[in] directionDataValue A integer value indicating the 00081 direction in which the information is to be 00082 considered. Positive values indicate normal comparison while 00083 negative values indicate reverse compliment comparison. 00084 */ 00085 CachedESTInfo(const int refESTidxValue, const int estIdxValue, 00086 const float metricValue, const int alignmentDataValue, 00087 const int directionDataValue) : 00088 refESTidx(refESTidxValue), estIdx(estIdxValue), metric(metricValue), 00089 alignmentData(alignmentDataValue), directionData(directionDataValue) {} 00090 00091 /** The destructor. 00092 00093 This class does not contain any members that utilize dynamic 00094 memory to hold data. Consequently, the destructor has no 00095 special tasks to perform and is merely present to adhere to 00096 coding conventions. 00097 */ 00098 ~CachedESTInfo() {} 00099 00100 /** The zero-based index of the reference EST. 00101 00102 This instance variable is used to store the zero-based index 00103 of the reference EST against which the EST at \c estIdx was 00104 analyzed to generate the \c metric and \c alginmentData. 00105 */ 00106 int refESTidx; 00107 00108 /** The index of the EST for which this data is relevant. 00109 00110 This instance variable is used to store the index of one of 00111 the ESTs for which the remainder of the information has been 00112 stored. 00113 */ 00114 int estIdx; 00115 00116 /** The distance/similarity metric value. 00117 00118 This instance variable is used to maintain the 00119 similarity/distance metric corresponding to the EST referred 00120 by estIdx. Note that this class does not contain the index of 00121 the reference EST as this information is maintained in the 00122 MSTCache directly. 00123 */ 00124 float metric; 00125 00126 /** The alignment information for this EST. 00127 00128 This instance variable is used to maintain the alignment data 00129 (if any) associated with the EST indicated by estIdx. 00130 */ 00131 int alignmentData; 00132 00133 /** The direction information for this EST. 00134 00135 This instance variable is used to maintain the direction data 00136 (if any) associated with the EST indicated by estIdx. 00137 */ 00138 int directionData; 00139 00140 protected: 00141 // Currently this class does not have any protected members. 00142 00143 private: 00144 // Currently this class does not have any private members. 00145 }; 00146 00147 #endif