mongo::Histogram Class Reference

#include <histogram.h>

List of all members.

Classes

struct  Options

Public Member Functions

boost::uint32_t getBoundary (boost::uint32_t bucket) const
boost::uint32_t getBucketsNum () const
boost::uint64_t getCount (boost::uint32_t bucket) const
 Histogram (const Options &opts)
void insert (boost::uint32_t element)
string toHTML () const
 ~Histogram ()

Private Member Functions

boost::uint32_t _findBucket (boost::uint32_t element) const
 Histogram (const Histogram &)
Histogramoperator= (const Histogram &)

Private Attributes

boost::uint32_t * _boundaries
boost::uint64_t * _buckets
boost::uint32_t _initialValue
boost::uint32_t _numBuckets

Detailed Description

A histogram for a 32-bit integer range.

Definition at line 33 of file histogram.h.


Constructor & Destructor Documentation

mongo::Histogram::Histogram ( const Options opts  )  [explicit]
mongo::Histogram::~Histogram (  ) 
mongo::Histogram::Histogram ( const Histogram  )  [private]

Member Function Documentation

boost::uint32_t mongo::Histogram::_findBucket ( boost::uint32_t  element  )  const [private]

Returns the bucket where 'element' should fall into. Currently assumes that 'element' is greater than the minimum 'inialValue'.

boost::uint32_t mongo::Histogram::getBoundary ( boost::uint32_t  bucket  )  const

Return the maximum element that would fall in the 'bucket'-th bucket.

boost::uint32_t mongo::Histogram::getBucketsNum (  )  const

Return the number of buckets in this histogram.

boost::uint64_t mongo::Histogram::getCount ( boost::uint32_t  bucket  )  const

Return the count for the 'bucket'-th bucket.

void mongo::Histogram::insert ( boost::uint32_t  element  ) 

Find the bucket that 'element' falls into and increment its count.

Histogram& mongo::Histogram::operator= ( const Histogram  )  [private]
string mongo::Histogram::toHTML (  )  const

Render the histogram as string that can be used inside an HTML doc.


Member Data Documentation

boost::uint32_t* mongo::Histogram::_boundaries [private]

Definition at line 119 of file histogram.h.

boost::uint64_t* mongo::Histogram::_buckets [private]

Definition at line 120 of file histogram.h.

boost::uint32_t mongo::Histogram::_initialValue [private]

Definition at line 115 of file histogram.h.

boost::uint32_t mongo::Histogram::_numBuckets [private]

Definition at line 116 of file histogram.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


mongodb
Author(s): Nate Koenig
autogenerated on Fri Jan 11 12:15:55 2013