yat  0.14.5pre
DataLookup1D.h
1 #ifndef _theplu_yat_classifier_dataLookup1D_
2 #define _theplu_yat_classifier_dataLookup1D_
3 
4 // $Id: DataLookup1D.h 2119 2009-12-12 23:11:43Z peter $
5 
6 /*
7  Copyright (C) 2005 Peter Johansson
8  Copyright (C) 2006 Jari Häkkinen, Peter Johansson, Markus Ringnér
9  Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson
10  Copyright (C) 2009 Peter Johansson
11 
12  This file is part of the yat library, http://dev.thep.lu.se/yat
13 
14  The yat library is free software; you can redistribute it and/or
15  modify it under the terms of the GNU General Public License as
16  published by the Free Software Foundation; either version 3 of the
17  License, or (at your option) any later version.
18 
19  The yat library is distributed in the hope that it will be useful,
20  but WITHOUT ANY WARRANTY; without even the implied warranty of
21  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22  General Public License for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with yat. If not, see <http://www.gnu.org/licenses/>.
26 */
27 
28 #include "MatrixLookup.h"
29 
30 #include <iosfwd>
31 #include <vector>
32 
33 namespace theplu {
34 namespace yat {
35 namespace utility {
36  class VectorBase;
37 }
38 namespace classifier {
39 
44  {
45  public:
52 
59 
62 
71  DataLookup1D(const MatrixLookup& m, const size_t index,
72  const bool row_vector);
73 
77  DataLookup1D(const DataLookup1D&);
78 
83  DataLookup1D(const size_t size, const double value=0);
84 
93  const std::vector<size_t>& index);
94 
102  DataLookup1D(const utility::VectorBase& vec);
103 
107  virtual ~DataLookup1D();
108 
112  const_iterator begin() const;
113 
117  const_iterator end() const;
118 
122  size_t size(void) const;
123 
127  double operator()(const size_t i) const;
128 
132  double operator*(const DataLookup1D&) const;
133 
134  private:
135  // assignment no allowed
136  const DataLookup1D& operator=(const DataLookup1D&);
137 
138  const bool column_vector_;
139  const size_t index_;
140  const MatrixLookup* matrix_;
141  const bool owner_;
142 
143  };
144 
148 
160  std::ostream& operator<<(std::ostream& s, const DataLookup1D& v);
161 
162 }}} // of namespace classifier, yat, and theplu
163 
164 #endif
MatrixLookup::const_row_iterator const_iterator
&#39;Read Only&#39; iterator
Definition: DataLookup1D.h:61
General view into utility::Matrix.
Definition: MatrixLookup.h:70
virtual ~DataLookup1D()
Destructor deletes underlying MatrixLookup if object is owner.
Class for general vector view.
Definition: DataLookup1D.h:43
DataLookup1D(const MatrixLookup &m, const size_t index, const bool row_vector)
utility::Matrix::value_type value_type
Definition: MatrixLookup.h:78
utility::Matrix::const_reference const_reference
Definition: MatrixLookup.h:85
This is the yat interface to GSL vector.
Definition: VectorBase.h:52
MatrixLookup::const_reference const_reference
Definition: DataLookup1D.h:58
const_column_iterator const_row_iterator
Definition: MatrixLookup.h:102
double operator*(const DataLookup1D &) const
MatrixLookup::value_type value_type
Definition: DataLookup1D.h:51
double operator()(const size_t i) const
access operator

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