Anaphe Home Page Reference Documentation

Main Page     Namespaces     Classes     Source Code    

Float_Weighted_Bin Class Reference

#include <Float_Weighted_Bin.h>

Inheritance diagram for Float_Weighted_Bin:

I_Bin List of all members.

Detailed Description

Unlike the standard weighted bin, the values are stored in float variables to reduce memory usage on large histograms.

The value of this bin is:
         value = SUM[ weight ]
The error of this bin is:
         error = sqrt( SUM[ weight*weight ] )

By default the gravity center of all the data points in this bin
is the middle of the bin.

Definition at line 26 of file Float_Weighted_Bin.h.

Public Types

typedef Float_Weighted_Bin Like_Current
typedef I_Bin Like_Parent

Public Methods

 H_IID_IMPLEMENT (Float_Weighted_Bin)
 Very simple RTTI feature.

 Float_Weighted_Bin ()
 Constructor.

 ~Float_Weighted_Bin ()
 Destructor.

double value (Index=0) const
 Value associated with this bin.

double error (Index=0) const
 Error associated with this bin.

Size count () const
 Count associated with this bin (number of entries).

void set_value (double other, Index=0)
 Change/set the value of the bin to other.

void set_error (double other, Index=0)
 Change/set the error of the bin to other.

void set_count (Size other)
 Change/set the count of the bin to other.

void reset ()
 Reset bin contents to 0.

void put (T_Value a_weight)
 Put data point with weight a_weight.

int operator== (const Like_Current &other) const
 Comparison operator.

void make (const Like_Parent &other)
 Override bin content.

void add (const Like_Parent &other)
 Add other bin to current one.

void sub (const Like_Parent &other)
 Subtract other bin from current one.

void mul (const Like_Parent &other)
 Multiply current bin by other one.

void div (const Like_Parent &other)
 Divide current bin by other one If other.value()==0 then new value is 0.

void binomial_div (const Like_Parent &other)
 Divide binomially current bin by other one If other.value()==0 then new value is 0.

void add (double x)
 Add scalar to current bin.

void sub (double x)
 Subtract scalar from current bin.

void mul (double x)
 Multiply current bin by scalar.

void div (double x)
 Divide current bin by scalar.


Member Typedef Documentation

typedef Float_Weighted_Bin Float_Weighted_Bin::Like_Current
 

Reimplemented from I_Bin.

Definition at line 31 of file Float_Weighted_Bin.h.

typedef I_Bin Float_Weighted_Bin::Like_Parent
 

Definition at line 32 of file Float_Weighted_Bin.h.


Constructor & Destructor Documentation

Float_Weighted_Bin::Float_Weighted_Bin   [inline]
 

Definition at line 35 of file Float_Weighted_Bin.h.

Float_Weighted_Bin::~Float_Weighted_Bin   [inline]
 

Definition at line 37 of file Float_Weighted_Bin.h.


Member Function Documentation

void Float_Weighted_Bin::add double    x [inline, virtual]
 

Implements I_Bin.

Definition at line 169 of file Float_Weighted_Bin.h.

References T_Value.

void Float_Weighted_Bin::add const Like_Parent   other [inline]
 

Definition at line 93 of file Float_Weighted_Bin.h.

References I_Bin::count(), I_Bin::error(), T_Value, and I_Bin::value().

void Float_Weighted_Bin::binomial_div const Like_Parent   other [inline]
 

If other.error()==0 then new error is 0.

Definition at line 146 of file Float_Weighted_Bin.h.

References I_Bin::count(), I_Bin::error(), HTL_ERR, T_Value, and I_Bin::value().

Size Float_Weighted_Bin::count   const [inline, virtual]
 

Implements I_Bin.

Definition at line 46 of file Float_Weighted_Bin.h.

References Size.

Referenced by operator==().

void Float_Weighted_Bin::div double    x [inline, virtual]
 

Implements I_Bin.

Definition at line 175 of file Float_Weighted_Bin.h.

References HTL_ERR, and T_Value.

void Float_Weighted_Bin::div const Like_Parent   other [inline]
 

If other.error()==0 then new error is 0.

Definition at line 121 of file Float_Weighted_Bin.h.

References I_Bin::count(), I_Bin::error(), HTL_ERR, T_Value, and I_Bin::value().

double Float_Weighted_Bin::error Index    = 0 const [inline, virtual]
 

Implements I_Bin.

Definition at line 43 of file Float_Weighted_Bin.h.

References Index.

Referenced by operator==().

Float_Weighted_Bin::H_IID_IMPLEMENT Float_Weighted_Bin   
 

void Float_Weighted_Bin::make const Like_Parent   other [inline]
 

Definition at line 85 of file Float_Weighted_Bin.h.

References I_Bin::count(), I_Bin::error(), T_Value, and I_Bin::value().

void Float_Weighted_Bin::mul double    x [inline, virtual]
 

Implements I_Bin.

Definition at line 173 of file Float_Weighted_Bin.h.

References T_Value.

void Float_Weighted_Bin::mul const Like_Parent   other [inline]
 

Definition at line 109 of file Float_Weighted_Bin.h.

References I_Bin::count(), I_Bin::error(), T_Value, and I_Bin::value().

int Float_Weighted_Bin::operator== const Like_Current   other const [inline]
 

Definition at line 75 of file Float_Weighted_Bin.h.

References count(), error(), T_Value, and value().

void Float_Weighted_Bin::put T_Value    a_weight [inline]
 

Definition at line 64 of file Float_Weighted_Bin.h.

References T_Value.

Referenced by T_Histo2DF::fill().

void Float_Weighted_Bin::reset   [inline, virtual]
 

Implements I_Bin.

Definition at line 58 of file Float_Weighted_Bin.h.

References T_Value.

void Float_Weighted_Bin::set_count Size    other [inline, virtual]
 

Implements I_Bin.

Definition at line 55 of file Float_Weighted_Bin.h.

References Size.

void Float_Weighted_Bin::set_error double    other,
Index    = 0
[inline, virtual]
 

Implements I_Bin.

Definition at line 52 of file Float_Weighted_Bin.h.

References Index, and T_Value.

void Float_Weighted_Bin::set_value double    other,
Index    = 0
[inline, virtual]
 

Implements I_Bin.

Definition at line 49 of file Float_Weighted_Bin.h.

References Index, and T_Value.

void Float_Weighted_Bin::sub double    x [inline, virtual]
 

Implements I_Bin.

Definition at line 171 of file Float_Weighted_Bin.h.

References T_Value.

void Float_Weighted_Bin::sub const Like_Parent   other [inline]
 

Definition at line 101 of file Float_Weighted_Bin.h.

References I_Bin::count(), I_Bin::error(), T_Value, and I_Bin::value().

double Float_Weighted_Bin::value Index    = 0 const [inline, virtual]
 

Implements I_Bin.

Definition at line 40 of file Float_Weighted_Bin.h.

Referenced by operator==().


The documentation for this class was generated from the following file:

Anaphe documentation generated by Doxygen (www.doxygen.org)