bin.h

Go to the documentation of this file.
00001 // Copyright 2007, Massachusetts Institute of Technology.
00002 // The use of this code is permitted for research only. There is
00003 // absolutely no warranty for this software.
00004 //
00005 // Author: John Lee (jjl@mit.edu)
00006 //
00007 #ifndef HISTOGRAMS_BIN_H
00008 #define HISTOGRAMS_BIN_H
00009 
00010 #include <iostream>
00011 #include "util/sparse-vector.h"
00012 #include "util/tree-node.h"
00013 
00014 namespace libpmk {
00016 
00020 class Bin : public TreeNode {
00021  public:
00022    Bin();
00023    Bin(const LargeIndex& index);
00024    virtual ~Bin() { }
00025 
00027    double SetSize(double size);
00028 
00030    double GetSize() const;
00031 
00033    double IncrementCount();
00034 
00036    double DecrementCount();
00037 
00039    double SetCount(double count);
00040 
00042    double GetCount() const;
00043 
00044    virtual void ReadData(istream& input_stream);
00045    virtual void WriteData(ostream& output_stream) const;
00046 
00048 
00052    virtual void Combine(const TreeNode& other);
00053 
00054  private:
00055    double size_;
00056    double count_;
00057 };
00058 }  // namespace libpmk
00059 #endif  // HISTOGRAMS_BIN_H

Generated on Wed May 2 11:17:12 2007 for libpmk by  doxygen 1.5.1