yat
0.11.3pre
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
yat
classifier
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
43
class
DataLookup1D
44
{
45
public
:
51
typedef
MatrixLookup::value_type
value_type
;
52
58
typedef
MatrixLookup::const_reference
const_reference
;
59
61
typedef
MatrixLookup::const_row_iterator
const_iterator
;
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
92
DataLookup1D
(
const
utility::VectorBase
& vec,
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
Generated on Sat May 24 2014 03:33:04 for yat by
1.8.2