Ignore:
Timestamp:
Jan 16, 2009, 8:20:57 PM (12 years ago)
Author:
Peter
Message:

Added some docs. Also modified the comparison operators to return what
the corresponding double operator returns for data(). This was always
true before when the comparisons included NaN.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/utility/DataWeight.cc

    r1534 r1734  
    22
    33/*
    4   Copyright (C) 2008 Peter Johansson
     4  Copyright (C) 2008, 2009 Peter Johansson
    55
    66  This file is part of the yat library, http://dev.thep.lu.se/yat
     
    6161  bool operator!=(const DataWeight& lhs, const DataWeight& rhs)
    6262  {
    63     return ! (lhs == rhs);
     63    return lhs.data() != rhs.data();
    6464  }
    6565
     
    7373  bool operator>(const DataWeight& lhs, const DataWeight& rhs)
    7474  {
    75     return rhs < lhs;
     75    return lhs.data() > rhs.data();
    7676  }
    7777
     
    7979  bool operator<=(const DataWeight& lhs, const DataWeight& rhs)
    8080  {
    81     return !(lhs > rhs);
     81    return lhs.data() <= rhs.data();
    8282  }
    8383
     
    8585  bool operator>=(const DataWeight& lhs, const DataWeight& rhs)
    8686  {
    87     return !(lhs < rhs);
     87    return lhs.data() >= rhs.data();
    8888  }
    8989
Note: See TracChangeset for help on using the changeset viewer.