~ubuntu-branches/debian/wheezy/abyss/wheezy

« back to all changes in this revision

Viewing changes to Common/Histogram.h

  • Committer: Package Import Robot
  • Author(s): Shaun Jackman
  • Date: 2012-05-31 11:39:13 UTC
  • mfrom: (1.1.5)
  • Revision ID: package-import@ubuntu.com-20120531113913-39atrfritvjevhv6
Tags: 1.3.4-1
* New upstream release.
* debian/copyright: Add CityHash, which has an Expat license.
* debian/control: Bump Standards-Version to 3.9.3.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
132
132
        /** Return the specified percentile. */
133
133
        T percentile(float p) const
134
134
        {
135
 
                size_type x = ceil(p * size());
 
135
                size_type x = (size_type)ceil(p * size());
136
136
                size_type n = 0;
137
137
                for (Map::const_iterator it = m_map.begin();
138
138
                                it != m_map.end(); ++it) {
152
152
        /** Return the specified weighted percentile. */
153
153
        T weightedPercentile(float p) const
154
154
        {
155
 
                accumulator x = ceil(p * sum());
 
155
                accumulator x = (accumulator)ceil(p * sum());
156
156
                accumulator total = 0;
157
157
                for (Map::const_iterator it = m_map.begin();
158
158
                                it != m_map.end(); ++it) {