Changeset 826 for trunk/yat/classifier/MatrixLookup.h
 Timestamp:
 Mar 19, 2007, 6:45:30 PM (15 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/yat/classifier/MatrixLookup.h
r767 r826 49 49 /// to a row and a column in the Kernel, respectively. This design 50 50 /// allow for fast creation of submatrices, which is a common 51 /// operation in most traning/validation procedures. 51 /// operation in most traning/validation procedures. The views are 52 /// const views in the sense that they cannot modify underlying 53 /// matrix. 52 54 /// 53 55 /// A MatrixLookup can be created directly from a matrix or from an … … 57 59 /// 58 60 /// There is a possibility to set the MatrixLookup as owner of the 59 /// underlying matrix. 61 /// underlying matrix. This implies that underlying data is deleted 62 /// in destructor of MatrixLookup, but only if there is no other 63 /// owner of the underlying data. A reference counter is used to 64 /// keep track of number of owners. Ownership is copied in copy 65 /// constructors and assignments. 60 66 /// 61 67 class MatrixLookup : public DataLookup2D … … 68 74 /// Constructor creating a lookup into the entire @a matrix. 69 75 /// @param own if true MatrixLookup owns its underlying @a matrix 76 /// 77 /// @note If \a own is true and \a matrix is already owned by some 78 /// other object, this will lead to \a matrix having multiple 79 /// owners without the owners being aware of each 80 /// other. Consequently multiple deletion will occur. 70 81 /// 71 82 /// @note If @a matrix goes out of scope or is deleted, the … … 115 126 /// @brief Copy constructor. 116 127 /// 117 /// @note If underlying matrix goes out of scope or is deleted, the 118 /// MatrixLookup becomes invalid and the result of further use is 119 /// undefined. 120 /// 121 MatrixLookup(const MatrixLookup&); 122 123 /// 124 /// Creates a subMatrixLookup. The Lookup is independent of 128 /// If \a other is owner of underlying data, constructed 129 /// MatrixLookup will also be set as owner of underlying data. 130 /// 131 /// @note If underlying matrix goes out of scope or is deleted, the 132 /// MatrixLookup becomes invalid and the result of further use is 133 /// undefined. 134 /// 135 MatrixLookup(const MatrixLookup& other); 136 137 /// 138 /// @brief Create a subMatrixLookup. 139 /// 140 /// The Lookup is independent of 125 141 /// MatrixLookup @a ml. The MatrixLookup is created to look 126 142 /// directly into the underlying matrix to avoid multiple lookups. 127 143 /// 144 /// If \a ml is owner of underlying data, constructed 145 /// MatrixLookup will also be set as owner of underlying data. 146 /// 128 147 /// The @a row and @a column define what submatrix to look into, 129 148 /// in other words, the created MatrixLookup will fullfill the 130 /// following: \f$ MatrixLookup(i,j)=ml(row[i],column[j]) \f$. This149 /// following: MatrixLookup(i,j)=ml(row[i],column[j]). This 131 150 /// also means that number of rows in created MatrixLookup is 132 151 /// equal to size of vector @a row, and number of columns is equal 133 152 /// to size of vector @a column. 134 153 /// 154 /// If \a ml is owner of underlying data, constructed 155 /// MatrixLookup will also be set as owner of underlying data. 156 /// 135 157 /// @note If underlying matrix goes out of scope or is deleted, the 136 158 /// MatrixLookup becomes invalid and the result of further use is … … 148 170 /// of the row vectors defined by @a index. This means that the 149 171 /// created MatrixLookup will fullfill: 150 /// \f$ MatrixLookup(i,j)=ml(i,index[j])\f$172 /// MatrixLookup(i,j)=ml(i,index[j]) 151 173 /// 152 174 /// If @a row_vectors is false the new MatrixLookup will consist … … 154 176 /// created MatrixLookup will fullfill: 155 177 /// \f$ MatrixLookup(i,j) = ml(index[i],j) \f$ 178 /// 179 /// If \a ml is owner of underlying data, constructed 180 /// MatrixLookup will also be set as owner of underlying data. 156 181 /// 157 182 /// @note If underlying matrix goes out of scope or is deleted, the … … 181 206 182 207 /// 183 /// Destructor. 208 /// @brief Destructor. 209 /// 210 /// If ownership is set true and there is no other owner of 211 /// underlying data, underlying data is deleted. 184 212 /// 185 213 virtual ~MatrixLookup(); … … 244 272 /// 245 273 /// Does only change MatrixLookup not the underlying matrix 246 /// object. However if the MatrixLookup is owner of its underlying 274 /// object. However if the MatrixLookup is owner (and the only owner) 275 /// of its underlying 247 276 /// matrix, that matrix will be deleted here. 248 277 ///
Note: See TracChangeset
for help on using the changeset viewer.