yat  0.8.3pre
DataWeight.h
00001 #ifndef _theplu_yat_utility_data_weight_
00002 #define _theplu_yat_utility_data_weight_ 
00003 
00004 // $Id: DataWeight.h 2119 2009-12-12 23:11:43Z peter $
00005 
00006 /*
00007   Copyright (C) 2008 Jari Häkkinen, Peter Johansson
00008   Copyright (C) 2009 Peter Johansson
00009 
00010   This file is part of the yat library, http://dev.thep.lu.se/yat
00011 
00012   The yat library is free software; you can redistribute it and/or
00013   modify it under the terms of the GNU General Public License as
00014   published by the Free Software Foundation; either version 3 of the
00015   License, or (at your option) any later version.
00016 
00017   The yat library is distributed in the hope that it will be useful,
00018   but WITHOUT ANY WARRANTY; without even the implied warranty of
00019   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00020   General Public License for more details.
00021 
00022   You should have received a copy of the GNU General Public License
00023   along with yat. If not, see <http://www.gnu.org/licenses/>.
00024 */
00025 
00026 namespace theplu {
00027 namespace yat {
00028 namespace utility {
00029 
00039   class DataWeight
00040   {
00041   public:
00048     explicit DataWeight(double data=0.0, double weight=1.0);
00049 
00053     double& data(void);
00054 
00058     const double& data(void) const;
00059 
00063     double& weight(void);
00064 
00068     const double& weight(void) const;
00069   private:
00070     double data_;
00071     double weight_;
00072     // using compiler generated copy
00073     // DataWeight(const DataWeight&)
00074     // DataWeight& operator=(const DataWeight&);
00075   };
00076 
00084   bool operator==(const DataWeight& lhs, const DataWeight& rhs);
00085 
00093   bool operator!=(const DataWeight&, const DataWeight&);
00094 
00104   bool operator<(const DataWeight&, const DataWeight&);
00105 
00113   bool operator>(const DataWeight&, const DataWeight&);
00114 
00122   bool operator<=(const DataWeight&, const DataWeight&);
00123 
00131   bool operator>=(const DataWeight&, const DataWeight&);
00132 
00133 
00134 }}} // of namespace utility, yat, and theplu
00135 
00136 #endif

Generated on Thu Dec 20 2012 03:12:58 for yat by  doxygen 1.8.0-20120409