Ignore:
Timestamp:
Mar 19, 2011, 12:30:51 AM (11 years ago)
Author:
Peter
Message:

fixes #660

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/0.7-stable/yat/statistics/Percentiler.h

    r2263 r2444  
    3434#include <algorithm>
    3535#include <cmath>
     36#include <limits>
    3637#include <numeric>
    3738#include <stdexcept>
     
    99100      BOOST_CONCEPT_ASSERT((boost::RandomAccessIterator<RandomAccessIterator>));
    100101      BOOST_CONCEPT_ASSERT((utility::DataIteratorConcept<RandomAccessIterator>));
     102      if (first==last)
     103        return std::numeric_limits<double>::quiet_NaN();
    101104      return calculate(first, last, sorted_,
    102105       typename utility::weighted_iterator_traits<RandomAccessIterator>::type());
Note: See TracChangeset for help on using the changeset viewer.