yat
0.11.3pre
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
yat
utility
DataWeight.h
1
#ifndef _theplu_yat_utility_data_weight_
2
#define _theplu_yat_utility_data_weight_
3
4
// $Id: DataWeight.h 2119 2009-12-12 23:11:43Z peter $
5
6
/*
7
Copyright (C) 2008 Jari Häkkinen, Peter Johansson
8
Copyright (C) 2009 Peter Johansson
9
10
This file is part of the yat library, http://dev.thep.lu.se/yat
11
12
The yat library is free software; you can redistribute it and/or
13
modify it under the terms of the GNU General Public License as
14
published by the Free Software Foundation; either version 3 of the
15
License, or (at your option) any later version.
16
17
The yat library is distributed in the hope that it will be useful,
18
but WITHOUT ANY WARRANTY; without even the implied warranty of
19
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20
General Public License for more details.
21
22
You should have received a copy of the GNU General Public License
23
along with yat. If not, see <http://www.gnu.org/licenses/>.
24
*/
25
26
namespace
theplu {
27
namespace
yat {
28
namespace
utility {
29
39
class
DataWeight
40
{
41
public
:
48
explicit
DataWeight
(
double
data
=0.0,
double
weight
=1.0);
49
53
double
&
data
(
void
);
54
58
const
double
&
data
(
void
)
const
;
59
63
double
&
weight
(
void
);
64
68
const
double
&
weight
(
void
)
const
;
69
private
:
70
double
data_;
71
double
weight_;
72
// using compiler generated copy
73
// DataWeight(const DataWeight&)
74
// DataWeight& operator=(const DataWeight&);
75
};
76
84
bool
operator==
(
const
DataWeight
& lhs,
const
DataWeight
& rhs);
85
93
bool
operator!=
(
const
DataWeight
&,
const
DataWeight
&);
94
104
bool
operator<
(
const
DataWeight
&,
const
DataWeight
&);
105
113
bool
operator>
(
const
DataWeight
&,
const
DataWeight
&);
114
122
bool
operator<=
(
const
DataWeight
&,
const
DataWeight
&);
123
131
bool
operator>=
(
const
DataWeight
&,
const
DataWeight
&);
132
133
134
}}}
// of namespace utility, yat, and theplu
135
136
#endif
Generated on Sat May 24 2014 03:33:05 for yat by
1.8.2