yat  0.14.5pre
DataLookupWeighted1D.h
1 #ifndef _theplu_yat_classifier_dataLookup_weighted_1D_
2 #define _theplu_yat_classifier_dataLookup_weighted_1D_
3 
4 // $Id: DataLookupWeighted1D.h 3330 2014-10-14 08:03:25Z peter $
5 
6 /*
7  Copyright (C) 2006 Jari Häkkinen, Peter Johansson
8  Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson, Markus Ringnér
9  Copyright (C) 2009 Peter Johansson
10 
11  This file is part of the yat library, http://dev.thep.lu.se/yat
12 
13  The yat library is free software; you can redistribute it and/or
14  modify it under the terms of the GNU General Public License as
15  published by the Free Software Foundation; either version 3 of the
16  License, or (at your option) any later version.
17 
18  The yat library is distributed in the hope that it will be useful,
19  but WITHOUT ANY WARRANTY; without even the implied warranty of
20  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21  General Public License for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with yat. If not, see <http://www.gnu.org/licenses/>.
25 */
26 
27 #include "MatrixLookupWeighted.h"
28 #include "yat/utility/Container2DIterator.h"
29 #include "yat/utility/StrideIterator.h"
30 
31 #include <utility>
32 #include <vector>
33 
34 namespace theplu {
35 namespace yat {
36 namespace classifier {
37 
44  {
45 
46  public:
53 
60 
63 
72  DataLookupWeighted1D(const MatrixLookupWeighted& m, const size_t index,
73  const bool row_vector);
74 
79 
84  DataLookupWeighted1D(const size_t size, double value=0, double weight=1);
85 
89  virtual ~DataLookupWeighted1D();
90 
94  const_iterator begin() const;
95 
99  double data(const size_t i) const;
100 
104  const_iterator end() const;
105 
109  size_t size(void) const;
110 
114  double weight(const size_t i) const;
115 
119  const_reference operator()(const size_t i) const;
120 
121  private:
122  const DataLookupWeighted1D& operator=(const DataLookupWeighted1D&);
123 
124  const bool column_vector_;
125  const size_t index_;
126  const MatrixLookupWeighted* matrix_;
127  const bool owner_;
128 
129  };
130 
136  double sum_weight(const DataLookupWeighted1D&);
137 
138 }}} // of namespace classifier, yat, and theplu
139 
140 #endif
DataLookupWeighted1D(const MatrixLookupWeighted &m, const size_t index, const bool row_vector)
boost::permutation_iterator< utility::MatrixWeighted::const_row_iterator, utility::Index::const_iterator > const_row_iterator
Definition: MatrixLookupWeighted.h:98
const_reference operator()(const size_t i) const
access operator
utility::DataWeight value_type
Definition: DataLookupWeighted1D.h:52
double weight(const size_t i) const
const utility::DataWeight const_reference
Definition: DataLookupWeighted1D.h:59
double data(const size_t i) const
Holds a pair of data and associated weight.
Definition: DataWeight.h:39
MatrixLookupWeighted::const_row_iterator const_iterator
&#39;Read Only&#39; iterator
Definition: DataLookupWeighted1D.h:62
General view into utility::MatrixWeighted.
Definition: MatrixLookupWeighted.h:63
double sum_weight(const DataLookupWeighted1D &)
Class for general weighted vector view.
Definition: DataLookupWeighted1D.h:43

Generated on Tue Sep 26 2017 02:33:29 for yat by  doxygen 1.8.5