Weighted_Bin Class Reference (original) (raw)
This website is no longer maintained. Its content may be obsolete.
Please visit https://home.cern/ for current CERN information.
| Public Types | |
|---|---|
| typedef Weighted_Bin | Like_Current |
| typedef I_Bin | Like_Parent |
| Public Methods | |
| H_IID_IMPLEMENT ( Weighted_Bin ) | |
| Very simple RTTI feature. | |
| Weighted_Bin () | |
| Constructor. | |
| ~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. More... | |
| void | binomial_div ( const Like_Parent &other ) |
| Divide binomially current bin by other one If other.value()==0 then new value is 0. More... | |
| 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. |
Detailed Description
Weighted Bin for any 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.
Member Typedef Documentation
**typedef Weighted_Bin Weighted_Bin::Like_Current
Reimplemented from I_Bin.
**typedef
I_Bin Weighted_Bin::Like_Parent
Constructor & Destructor Documentation
**Weighted_Bin::Weighted_Bin ()
**Weighted_Bin::~Weighted_Bin () [inline]
Member Function Documentation
| Weighted_Bin::H_IID_IMPLEMENT ( | Weighted_Bin) | | -------------------------------------- | ------------------ |
Very simple RTTI feature.
| void Weighted_Bin::add ( | double x) [inline, virtual] | | ----------------------------- | ----------------------------------- |
Add scalar to current bin.
Reimplemented from I_Bin.
| void Weighted_Bin::add ( | const | | ----------------------------- | --------- |
Like_Parent & other) [inline]
Add other bin to current one.
| void Weighted_Bin::binomial_div ( | const | | --------------------------------------- | --------- |
Like_Parent & other) [inline]
Divide binomially current bin by other one If other.value()==0 then new value is 0.
If other.error()==0 then new error is 0.
Size Weighted_Bin::count () const [inline, virtual]
Count associated with this bin. = Number of entries.
Reimplemented from I_Bin.
| void Weighted_Bin::div ( | double x) [inline, virtual] | | ----------------------------- | ----------------------------------- |
Divide current bin by scalar.
Reimplemented from I_Bin.
| void Weighted_Bin::div ( | const | | ----------------------------- | --------- |
Like_Parent & other) [inline]
Divide current bin by other one If other.value()==0 then new value is 0.
If other.error()==0 then new error is 0.
| double Weighted_Bin::error ( | | | --------------------------------- | |
Index i = 0) const [inline, virtual]
Error associated with this bin.
Reimplemented from I_Bin.
| void Weighted_Bin::make ( | const | | ------------------------------ | --------- |
Like_Parent & other) [inline]
| void Weighted_Bin::mul ( | double x) [inline, virtual] | | ----------------------------- | ----------------------------------- |
Multiply current bin by scalar.
Reimplemented from I_Bin.
| void Weighted_Bin::mul ( | const | | ----------------------------- | --------- |
Like_Parent & other) [inline]
Multiply current bin by other one.
| int Weighted_Bin::operator== ( | const | | ----------------------------------- | --------- |
Like_Current & other) const [inline]
| void Weighted_Bin::put ( | T_Value a_weight) [inline] | | ----------------------------- | ------------------------------------ |
Put data point with weight a_weight.
**void Weighted_Bin::reset () [inline, virtual]
Reset bin contents to 0.
Reimplemented from I_Bin.
| void Weighted_Bin::set_count ( | | | ------------------------------------ | |
Size other) [inline, virtual]
Change/set the count of the bin to other.
Reimplemented from I_Bin.
| void Weighted_Bin::set_error ( | double other, | | ------------------------------------ | ------------------- | | | |
Index i = 0) [inline, virtual]
Change/set the error of the bin to other.
Reimplemented from I_Bin.
| void Weighted_Bin::set_value ( | double other, | | ------------------------------------ | ------------------- | | | |
Index i = 0) [inline, virtual]
Change/set the value of the bin to other.
Reimplemented from I_Bin.
| void Weighted_Bin::sub ( | double x) [inline, virtual] | | ----------------------------- | ----------------------------------- |
Subtract scalar from current bin.
Reimplemented from I_Bin.
| void Weighted_Bin::sub ( | const | | ----------------------------- | --------- |
Like_Parent & other) [inline]
Subtract other bin from current one.
| double Weighted_Bin::value ( | | | --------------------------------- | |
Index i = 0) const [inline, virtual]
Value associated with this bin.
Reimplemented from I_Bin.
The documentation for this class was generated from the following file:
Generated at Fri Nov 24 09:28:39 2000 for TransientHTL by
1.1.2 written by Dimitri van Heesch, © 1997-2000