2862 |
03 Oct 12 |
peter |
1 |
#ifndef _theplu_yat_classifier_matrix_lookup_weighted_ |
2862 |
03 Oct 12 |
peter |
2 |
#define _theplu_yat_classifier_matrix_lookup_weighted_ |
595 |
28 Aug 06 |
peter |
3 |
|
616 |
31 Aug 06 |
jari |
// $Id$ |
616 |
31 Aug 06 |
jari |
5 |
|
675 |
10 Oct 06 |
jari |
6 |
/* |
2119 |
12 Dec 09 |
peter |
Copyright (C) 2006 Jari Häkkinen, Peter Johansson, Markus Ringnér |
2119 |
12 Dec 09 |
peter |
Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson |
4019 |
06 Nov 20 |
peter |
Copyright (C) 2009, 2010, 2012, 2020 Peter Johansson |
595 |
28 Aug 06 |
peter |
10 |
|
1437 |
25 Aug 08 |
peter |
This file is part of the yat library, http://dev.thep.lu.se/yat |
675 |
10 Oct 06 |
jari |
12 |
|
675 |
10 Oct 06 |
jari |
The yat library is free software; you can redistribute it and/or |
675 |
10 Oct 06 |
jari |
modify it under the terms of the GNU General Public License as |
1486 |
09 Sep 08 |
jari |
published by the Free Software Foundation; either version 3 of the |
675 |
10 Oct 06 |
jari |
License, or (at your option) any later version. |
675 |
10 Oct 06 |
jari |
17 |
|
675 |
10 Oct 06 |
jari |
The yat library is distributed in the hope that it will be useful, |
675 |
10 Oct 06 |
jari |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
675 |
10 Oct 06 |
jari |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
675 |
10 Oct 06 |
jari |
General Public License for more details. |
675 |
10 Oct 06 |
jari |
22 |
|
675 |
10 Oct 06 |
jari |
You should have received a copy of the GNU General Public License |
1487 |
10 Sep 08 |
jari |
along with yat. If not, see <http://www.gnu.org/licenses/>. |
675 |
10 Oct 06 |
jari |
25 |
*/ |
675 |
10 Oct 06 |
jari |
26 |
|
1110 |
19 Feb 08 |
peter |
27 |
#include "yat/utility/Container2DIterator.h" |
1549 |
06 Oct 08 |
peter |
28 |
#include "yat/utility/DataWeight.h" |
2223 |
19 Mar 10 |
peter |
29 |
#include "yat/utility/deprecate.h" |
1170 |
27 Feb 08 |
peter |
30 |
#include "yat/utility/Index.h" |
1589 |
17 Oct 08 |
peter |
31 |
#include "yat/utility/MatrixWeighted.h" |
1090 |
14 Feb 08 |
peter |
32 |
#include "yat/utility/StrideIterator.h" |
675 |
10 Oct 06 |
jari |
33 |
|
1589 |
17 Oct 08 |
peter |
34 |
#include <boost/iterator/permutation_iterator.hpp> |
1589 |
17 Oct 08 |
peter |
35 |
|
2076 |
06 Oct 09 |
peter |
36 |
#include <iosfwd> |
4019 |
06 Nov 20 |
peter |
37 |
#include <memory> |
1090 |
14 Feb 08 |
peter |
38 |
#include <utility> |
757 |
19 Feb 07 |
jari |
39 |
#include <vector> |
595 |
28 Aug 06 |
peter |
40 |
|
595 |
28 Aug 06 |
peter |
41 |
namespace theplu { |
680 |
11 Oct 06 |
jari |
42 |
namespace yat { |
2862 |
03 Oct 12 |
peter |
43 |
namespace classifier { |
595 |
28 Aug 06 |
peter |
44 |
|
1035 |
05 Feb 08 |
peter |
45 |
class MatrixLookup; |
1035 |
05 Feb 08 |
peter |
46 |
|
595 |
28 Aug 06 |
peter |
47 |
/// |
1588 |
17 Oct 08 |
peter |
/// @brief General view into utility::MatrixWeighted |
767 |
22 Feb 07 |
peter |
49 |
/// |
1588 |
17 Oct 08 |
peter |
/// A MatrixLookupWeighted can be created directly from a |
1588 |
17 Oct 08 |
peter |
/// utility::MatrixWeighted or from another MatrixLookupWeighted. In |
1588 |
17 Oct 08 |
peter |
/// the latter case, the resulting MatrixLookupWeighted is looking |
1588 |
17 Oct 08 |
peter |
/// directly into the underlying matrix to avoid multiple lookups. |
595 |
28 Aug 06 |
peter |
54 |
/// |
596 |
28 Aug 06 |
peter |
/// There is a possibility to set the MatrixLookupWeighted as owner |
1588 |
17 Oct 08 |
peter |
/// of the underlying utility::MatrixWeighted. This implies that |
1588 |
17 Oct 08 |
peter |
/// underlying data is deleted in destructor of |
1588 |
17 Oct 08 |
peter |
/// MatrixLookupWeighted, but only if there is no other owner of the |
1588 |
17 Oct 08 |
peter |
/// underlying data. |
595 |
28 Aug 06 |
peter |
60 |
/// |
1588 |
17 Oct 08 |
peter |
/// \see MatrixLookup |
1588 |
17 Oct 08 |
peter |
62 |
/// |
1170 |
27 Feb 08 |
peter |
63 |
class MatrixLookupWeighted |
595 |
28 Aug 06 |
peter |
64 |
{ |
595 |
28 Aug 06 |
peter |
65 |
public: |
1549 |
06 Oct 08 |
peter |
66 |
/** |
1549 |
06 Oct 08 |
peter |
value_type is DataWeight |
1549 |
06 Oct 08 |
peter |
68 |
|
1549 |
06 Oct 08 |
peter |
\since New in yat 0.5 |
1549 |
06 Oct 08 |
peter |
70 |
*/ |
1549 |
06 Oct 08 |
peter |
71 |
typedef utility::DataWeight value_type; |
1549 |
06 Oct 08 |
peter |
72 |
|
1549 |
06 Oct 08 |
peter |
73 |
/** |
1549 |
06 Oct 08 |
peter |
const_reference type is const DataWeight |
1549 |
06 Oct 08 |
peter |
75 |
|
1549 |
06 Oct 08 |
peter |
\since New in yat 0.5 |
1549 |
06 Oct 08 |
peter |
77 |
*/ |
1588 |
17 Oct 08 |
peter |
78 |
typedef const utility::DataWeight& const_reference; |
1549 |
06 Oct 08 |
peter |
79 |
|
1090 |
14 Feb 08 |
peter |
/// 'Read Only' iterator |
1090 |
14 Feb 08 |
peter |
81 |
typedef utility::StrideIterator< |
2862 |
03 Oct 12 |
peter |
82 |
utility::Container2DIterator<const MatrixLookupWeighted, |
2374 |
12 Dec 10 |
peter |
83 |
const value_type, const_reference> > |
1090 |
14 Feb 08 |
peter |
84 |
const_iterator; |
595 |
28 Aug 06 |
peter |
85 |
|
1125 |
22 Feb 08 |
peter |
86 |
/** |
1125 |
22 Feb 08 |
peter |
'Read only' iterator used to iterate over a column |
1125 |
22 Feb 08 |
peter |
88 |
*/ |
1589 |
17 Oct 08 |
peter |
89 |
typedef boost::permutation_iterator< |
1589 |
17 Oct 08 |
peter |
90 |
utility::MatrixWeighted::const_column_iterator, |
1589 |
17 Oct 08 |
peter |
91 |
utility::Index::const_iterator> const_column_iterator; |
1125 |
22 Feb 08 |
peter |
92 |
|
1125 |
22 Feb 08 |
peter |
93 |
/** |
1125 |
22 Feb 08 |
peter |
'Read only' iterator used to iterate over a row |
1125 |
22 Feb 08 |
peter |
95 |
*/ |
1589 |
17 Oct 08 |
peter |
96 |
typedef boost::permutation_iterator< |
1589 |
17 Oct 08 |
peter |
97 |
utility::MatrixWeighted::const_row_iterator, |
1589 |
17 Oct 08 |
peter |
98 |
utility::Index::const_iterator> const_row_iterator; |
1105 |
18 Feb 08 |
peter |
99 |
|
1482 |
09 Sep 08 |
peter |
100 |
/** |
1482 |
09 Sep 08 |
peter |
\brief Create a lookup into \a matrix. |
1482 |
09 Sep 08 |
peter |
102 |
|
1482 |
09 Sep 08 |
peter |
The created lookup, mlw, will fullfil: mlw(i,j) = |
1482 |
09 Sep 08 |
peter |
matrix(rows(i), columns(j)) |
1482 |
09 Sep 08 |
peter |
105 |
*/ |
1482 |
09 Sep 08 |
peter |
106 |
MatrixLookupWeighted(const utility::MatrixWeighted& matrix, |
1482 |
09 Sep 08 |
peter |
107 |
const utility::Index& rows, |
1482 |
09 Sep 08 |
peter |
108 |
const utility::Index& columns); |
1482 |
09 Sep 08 |
peter |
109 |
|
1482 |
09 Sep 08 |
peter |
110 |
/** |
1482 |
09 Sep 08 |
peter |
\brief Create a lookup into entire \a matrix. |
1482 |
09 Sep 08 |
peter |
112 |
*/ |
1581 |
15 Oct 08 |
peter |
113 |
explicit MatrixLookupWeighted(const utility::MatrixWeighted& matrix, |
1581 |
15 Oct 08 |
peter |
114 |
bool owner=false); |
1482 |
09 Sep 08 |
peter |
115 |
|
1035 |
05 Feb 08 |
peter |
116 |
/** |
1035 |
05 Feb 08 |
peter |
Constructor creating a MatrixLookupWeighted from a MatrixLookup. A |
1035 |
05 Feb 08 |
peter |
weight matrix with unitary weights are created internally. |
1035 |
05 Feb 08 |
peter |
119 |
|
1035 |
05 Feb 08 |
peter |
\note no check for nan is performed. |
2862 |
03 Oct 12 |
peter |
121 |
|
1587 |
17 Oct 08 |
peter |
@note from yat 0.5 data is copied and further modifications in |
1587 |
17 Oct 08 |
peter |
\a matrix will not be reflected in MatrixLookupWeighted. |
1035 |
05 Feb 08 |
peter |
124 |
*/ |
1484 |
09 Sep 08 |
peter |
125 |
explicit MatrixLookupWeighted(const MatrixLookup& matrix); |
1035 |
05 Feb 08 |
peter |
126 |
|
1035 |
05 Feb 08 |
peter |
127 |
|
638 |
06 Sep 06 |
markus |
128 |
/// |
826 |
19 Mar 07 |
peter |
/// @brief Copy constructor. |
595 |
28 Aug 06 |
peter |
130 |
/// |
826 |
19 Mar 07 |
peter |
/// If \a other is owner of underlying data, constructed |
826 |
19 Mar 07 |
peter |
/// MatrixLookup will also be set as owner of underlying data. |
595 |
28 Aug 06 |
peter |
133 |
/// |
595 |
28 Aug 06 |
peter |
/// @note If underlying matrix goes out of scope or is deleted, the |
595 |
28 Aug 06 |
peter |
/// MatrixLookupWeighted becomes invalid and the result of further use is |
595 |
28 Aug 06 |
peter |
/// undefined. |
595 |
28 Aug 06 |
peter |
137 |
/// |
826 |
19 Mar 07 |
peter |
138 |
MatrixLookupWeighted(const MatrixLookupWeighted& other); |
595 |
28 Aug 06 |
peter |
139 |
|
595 |
28 Aug 06 |
peter |
140 |
/// |
595 |
28 Aug 06 |
peter |
/// Creates a sub-MatrixLookupWeighted. The Lookup is independent of |
595 |
28 Aug 06 |
peter |
/// MatrixLookupWeighted @a ml. The MatrixLookupWeighted is created to look |
595 |
28 Aug 06 |
peter |
/// directly into the underlying matrix to avoid multiple lookups. |
595 |
28 Aug 06 |
peter |
144 |
/// |
595 |
28 Aug 06 |
peter |
/// The @a row and @a column define what sub-matrix to look into, |
595 |
28 Aug 06 |
peter |
/// in other words, the created MatrixLookupWeighted will fullfill the |
595 |
28 Aug 06 |
peter |
/// following: \f$ MatrixLookupWeighted(i,j)=ml(row[i],column[j]) \f$. This |
595 |
28 Aug 06 |
peter |
/// also means that number of rows in created MatrixLookupWeighted is |
595 |
28 Aug 06 |
peter |
/// equal to size of vector @a row, and number of columns is equal |
595 |
28 Aug 06 |
peter |
/// to size of vector @a column. |
595 |
28 Aug 06 |
peter |
151 |
/// |
826 |
19 Mar 07 |
peter |
/// If \a ml is owner of underlying data, constructed |
826 |
19 Mar 07 |
peter |
/// MatrixLookup will also be set as owner of underlying data. |
826 |
19 Mar 07 |
peter |
154 |
/// |
595 |
28 Aug 06 |
peter |
/// @note If underlying matrix goes out of scope or is deleted, the |
595 |
28 Aug 06 |
peter |
/// MatrixLookupWeighted becomes invalid and the result of further use is |
595 |
28 Aug 06 |
peter |
/// undefined. |
595 |
28 Aug 06 |
peter |
158 |
/// |
2862 |
03 Oct 12 |
peter |
159 |
MatrixLookupWeighted(const MatrixLookupWeighted& ml, |
2862 |
03 Oct 12 |
peter |
160 |
const utility::Index& row, |
1134 |
23 Feb 08 |
peter |
161 |
const utility::Index& column); |
595 |
28 Aug 06 |
peter |
162 |
|
595 |
28 Aug 06 |
peter |
163 |
/// |
595 |
28 Aug 06 |
peter |
/// Constructor creating a lookup into a sub-matrix of |
595 |
28 Aug 06 |
peter |
/// @a ml. The MatrixLookupWeighted is created to look directly into the |
595 |
28 Aug 06 |
peter |
/// underlying matrix to avoid multiple lookups. |
595 |
28 Aug 06 |
peter |
167 |
/// |
746 |
11 Feb 07 |
peter |
/// If @a row_vectors is true the new MatrixLookupWeighted will consist |
595 |
28 Aug 06 |
peter |
/// of the row vectors defined by @a index. This means that the |
595 |
28 Aug 06 |
peter |
/// created MatrixLookupWeighted will fullfill: |
595 |
28 Aug 06 |
peter |
/// \f$ MatrixLookupWeighted(i,j)=ml(i,index[j])\f$ |
595 |
28 Aug 06 |
peter |
172 |
/// |
746 |
11 Feb 07 |
peter |
/// If @a row_vectors is false the new MatrixLookupWeighted will consist |
595 |
28 Aug 06 |
peter |
/// of the rolumn vectors defined by @a index. This means that the |
595 |
28 Aug 06 |
peter |
/// created MatrixLookupWeighted will fullfill: |
595 |
28 Aug 06 |
peter |
/// \f$ MatrixLookupWeighted(i,j) = ml(index[i],j) \f$ |
595 |
28 Aug 06 |
peter |
177 |
/// |
826 |
19 Mar 07 |
peter |
/// If \a ml is owner of underlying data, constructed |
826 |
19 Mar 07 |
peter |
/// MatrixLookup will also be set as owner of underlying data. |
826 |
19 Mar 07 |
peter |
180 |
/// |
595 |
28 Aug 06 |
peter |
/// @note If underlying matrix goes out of scope or is deleted, the |
595 |
28 Aug 06 |
peter |
/// MatrixLookupWeighted becomes invalid and the result of further use is |
595 |
28 Aug 06 |
peter |
/// undefined. |
595 |
28 Aug 06 |
peter |
184 |
/// |
2223 |
19 Mar 10 |
peter |
/// \deprecated Provided for backward compatibility with the 0.6 |
2223 |
19 Mar 10 |
peter |
/// API. Use MatrixLookupWeighted(const MatrixLookupWeighted&, |
2223 |
19 Mar 10 |
peter |
/// const utility::Index&, const utility::Index&) |
2223 |
19 Mar 10 |
peter |
188 |
/// |
2862 |
03 Oct 12 |
peter |
189 |
MatrixLookupWeighted(const MatrixLookupWeighted& ml, |
2862 |
03 Oct 12 |
peter |
190 |
const utility::Index&, |
2223 |
19 Mar 10 |
peter |
191 |
const bool row_vectors) YAT_DEPRECATE; |
595 |
28 Aug 06 |
peter |
192 |
|
595 |
28 Aug 06 |
peter |
193 |
/// |
595 |
28 Aug 06 |
peter |
/// Constructor creating a MatrixLookupWeighted with @a rows rows, @a |
595 |
28 Aug 06 |
peter |
/// columns columns, and all values are set to @a value. Created |
595 |
28 Aug 06 |
peter |
/// MatrixLookupWeighted owns its underlying matrix. |
595 |
28 Aug 06 |
peter |
197 |
/// |
2862 |
03 Oct 12 |
peter |
198 |
MatrixLookupWeighted(const size_t rows, const size_t columns, |
624 |
05 Sep 06 |
peter |
199 |
const double value=0, const double weight=1); |
595 |
28 Aug 06 |
peter |
200 |
|
595 |
28 Aug 06 |
peter |
201 |
/// |
595 |
28 Aug 06 |
peter |
/// @brief The istream constructor. |
595 |
28 Aug 06 |
peter |
203 |
/// |
595 |
28 Aug 06 |
peter |
/// In construction the underlying matrix is created from |
595 |
28 Aug 06 |
peter |
/// stream. The MatrixLookupWeighted will be owner of the underlying |
595 |
28 Aug 06 |
peter |
/// matrix. |
595 |
28 Aug 06 |
peter |
207 |
/// |
1587 |
17 Oct 08 |
peter |
/// @see utility::MatrixWeighted(istream&) for details. |
595 |
28 Aug 06 |
peter |
209 |
/// |
595 |
28 Aug 06 |
peter |
210 |
MatrixLookupWeighted(std::istream&, char sep='\0'); |
595 |
28 Aug 06 |
peter |
211 |
|
595 |
28 Aug 06 |
peter |
212 |
/// |
826 |
19 Mar 07 |
peter |
/// Destructor. If MatrixLookup is owner (and the only owner) of |
826 |
19 Mar 07 |
peter |
/// underlying matrix, the matrices are destroyed. |
595 |
28 Aug 06 |
peter |
215 |
/// |
595 |
28 Aug 06 |
peter |
216 |
virtual ~MatrixLookupWeighted(); |
595 |
28 Aug 06 |
peter |
217 |
|
1091 |
14 Feb 08 |
peter |
218 |
/** |
1091 |
14 Feb 08 |
peter |
Iterator iterates along a row. When end of row is reached it |
1091 |
14 Feb 08 |
peter |
jumps to beginning of next row. |
1091 |
14 Feb 08 |
peter |
221 |
|
1091 |
14 Feb 08 |
peter |
\return const_iterator pointing to upper-left element. |
1091 |
14 Feb 08 |
peter |
223 |
*/ |
1091 |
14 Feb 08 |
peter |
224 |
const_iterator begin(void) const; |
1091 |
14 Feb 08 |
peter |
225 |
|
1091 |
14 Feb 08 |
peter |
226 |
/** |
1091 |
14 Feb 08 |
peter |
Iterator iterates along a column. |
1091 |
14 Feb 08 |
peter |
228 |
|
1091 |
14 Feb 08 |
peter |
\return iterator pointing to first element of column \a i. |
1091 |
14 Feb 08 |
peter |
230 |
*/ |
1105 |
18 Feb 08 |
peter |
231 |
const_column_iterator begin_column(size_t) const; |
1091 |
14 Feb 08 |
peter |
232 |
|
1091 |
14 Feb 08 |
peter |
233 |
/** |
1091 |
14 Feb 08 |
peter |
Iterator iterates along a column. |
1091 |
14 Feb 08 |
peter |
235 |
|
1091 |
14 Feb 08 |
peter |
\return const_iterator pointing to first element of column \a i. |
1091 |
14 Feb 08 |
peter |
237 |
*/ |
1105 |
18 Feb 08 |
peter |
238 |
const_row_iterator begin_row(size_t) const; |
1091 |
14 Feb 08 |
peter |
239 |
|
1170 |
27 Feb 08 |
peter |
240 |
/** |
1170 |
27 Feb 08 |
peter |
\return number of columns |
1170 |
27 Feb 08 |
peter |
242 |
*/ |
1170 |
27 Feb 08 |
peter |
243 |
size_t columns(void) const; |
1170 |
27 Feb 08 |
peter |
244 |
|
595 |
28 Aug 06 |
peter |
245 |
/// |
624 |
05 Sep 06 |
peter |
/// @return data value of element (@a row, @a column) |
624 |
05 Sep 06 |
peter |
247 |
/// |
720 |
26 Dec 06 |
jari |
248 |
double data(size_t row, size_t column) const; |
624 |
05 Sep 06 |
peter |
249 |
|
826 |
19 Mar 07 |
peter |
250 |
/** |
1091 |
14 Feb 08 |
peter |
\return const_iterator pointing to end of matrix |
1091 |
14 Feb 08 |
peter |
252 |
*/ |
1091 |
14 Feb 08 |
peter |
253 |
const_iterator end(void) const; |
1091 |
14 Feb 08 |
peter |
254 |
|
1091 |
14 Feb 08 |
peter |
255 |
/** |
1091 |
14 Feb 08 |
peter |
\return const_iterator pointing to end of column \a i |
1091 |
14 Feb 08 |
peter |
257 |
*/ |
1105 |
18 Feb 08 |
peter |
258 |
const_column_iterator end_column(size_t) const; |
1091 |
14 Feb 08 |
peter |
259 |
|
1091 |
14 Feb 08 |
peter |
260 |
/** |
1091 |
14 Feb 08 |
peter |
\return const_iterator pointing to end of row \a i |
1091 |
14 Feb 08 |
peter |
262 |
*/ |
1105 |
18 Feb 08 |
peter |
263 |
const_row_iterator end_row(size_t) const; |
1091 |
14 Feb 08 |
peter |
264 |
|
1170 |
27 Feb 08 |
peter |
265 |
/** |
1170 |
27 Feb 08 |
peter |
\return number of rows |
1170 |
27 Feb 08 |
peter |
267 |
*/ |
1170 |
27 Feb 08 |
peter |
268 |
size_t rows(void) const; |
1170 |
27 Feb 08 |
peter |
269 |
|
604 |
29 Aug 06 |
peter |
270 |
/// |
624 |
05 Sep 06 |
peter |
/// @return weight value of element (@a row, @a column) |
624 |
05 Sep 06 |
peter |
272 |
/// |
720 |
26 Dec 06 |
jari |
273 |
double weight(size_t row, size_t column) const; |
624 |
05 Sep 06 |
peter |
274 |
|
624 |
05 Sep 06 |
peter |
275 |
/// |
631 |
05 Sep 06 |
peter |
/// @return true |
631 |
05 Sep 06 |
peter |
277 |
/// |
631 |
05 Sep 06 |
peter |
278 |
bool weighted(void) const; |
631 |
05 Sep 06 |
peter |
279 |
|
631 |
05 Sep 06 |
peter |
280 |
/// |
595 |
28 Aug 06 |
peter |
/// Access operator |
595 |
28 Aug 06 |
peter |
282 |
/// |
1193 |
29 Feb 08 |
peter |
/// @return data-weight pair (@a row, @a column) |
595 |
28 Aug 06 |
peter |
284 |
/// |
1552 |
06 Oct 08 |
peter |
285 |
const_reference operator()(const size_t row, const size_t column) const; |
595 |
28 Aug 06 |
peter |
286 |
|
595 |
28 Aug 06 |
peter |
287 |
/// |
595 |
28 Aug 06 |
peter |
/// @brief assigment operator |
595 |
28 Aug 06 |
peter |
289 |
/// |
826 |
19 Mar 07 |
peter |
/// Does only change MatrixLookupWeighted not the underlying |
826 |
19 Mar 07 |
peter |
/// matrix object. However if the MatrixLookupWeighted is owner |
826 |
19 Mar 07 |
peter |
/// (and the only owner) of its underlying data, those data will |
826 |
19 Mar 07 |
peter |
/// be deleted here. |
595 |
28 Aug 06 |
peter |
294 |
/// |
595 |
28 Aug 06 |
peter |
295 |
const MatrixLookupWeighted& operator=(const MatrixLookupWeighted&); |
2862 |
03 Oct 12 |
peter |
296 |
|
595 |
28 Aug 06 |
peter |
297 |
private: |
4019 |
06 Nov 20 |
peter |
298 |
typedef std::shared_ptr<const utility::MatrixWeighted> MatrixWP; |
1170 |
27 Feb 08 |
peter |
299 |
utility::Index column_index_; |
1587 |
17 Oct 08 |
peter |
300 |
MatrixWP data_; |
1170 |
27 Feb 08 |
peter |
301 |
utility::Index row_index_; |
1170 |
27 Feb 08 |
peter |
302 |
|
1170 |
27 Feb 08 |
peter |
// for assertions |
1170 |
27 Feb 08 |
peter |
304 |
bool validate(void) const; |
2862 |
03 Oct 12 |
peter |
305 |
}; |
2862 |
03 Oct 12 |
peter |
306 |
|
595 |
28 Aug 06 |
peter |
307 |
/// |
2862 |
03 Oct 12 |
peter |
/// The output operator MatrixLookupWeighted |
595 |
28 Aug 06 |
peter |
309 |
/// |
826 |
19 Mar 07 |
peter |
/// For eacd data element data(i,j) is printed except those being |
826 |
19 Mar 07 |
peter |
/// associated with a zero weight for which nothing is printed. |
826 |
19 Mar 07 |
peter |
312 |
/// |
1883 |
31 Mar 09 |
peter |
/// \relates MatrixLookupWeighted |
1883 |
31 Mar 09 |
peter |
314 |
/// |
595 |
28 Aug 06 |
peter |
315 |
std::ostream& operator<< (std::ostream& s, const MatrixLookupWeighted&); |
595 |
28 Aug 06 |
peter |
316 |
|
680 |
11 Oct 06 |
jari |
317 |
}}} // of namespace classifier, yat, and theplu |
595 |
28 Aug 06 |
peter |
318 |
|
595 |
28 Aug 06 |
peter |
319 |
#endif |