Profile_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 Profile_Bin | Like_Current |
| typedef I_Bin | Like_Parent |
| Public Methods | |
| H_IID_IMPLEMENT ( Profile_Bin ) | |
| Very simple RTTI feature. | |
| Profile_Bin () | |
| Constructor. | |
| ~Profile_Bin () | |
| Destructor. | |
| double | value ( Index i = 0 ) const |
| Value associated with this bin. More... | |
| double | error ( Index i = 0 ) const |
| Error associated with this bin. More... | |
| Size | count () const |
| Count associated with this bin. = Number of entries. | |
| void | set_value ( double other, Index i = 0 ) |
| Set value identified by i to other. More... | |
| void | set_error (double , Index = 0) |
| Error cannot be set: it is computed out of L, H, E. More... | |
| 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, T_Value a_character ) |
| Put data point with weight a_weight and character value a_character. | |
| 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
Profile bin.
}
Assume data points have w as their weight and k as their character value.
Assume:
. l = SUM[ w ]
. h = SUM[ wk ]
. e = SUM[ wk*k ]
. s = sqrt(fabs( e/l - (h/l)^2 )), the spread
The value of this bin then is:
. h/l
The error of the bin can be computed in 2 different ways.
By default (when i=0) the return error is: . 0 if l==0 (l=SUM[ weight ]) . sqrt(h/(l*l)) if s==0 . s/sqrt(l) otherwise Otherwise (when i!=0) the return error is:
. 0 if l==0
. sqrt(h/l) if s==0
. s otherwise
The gravity center of this bin is its middle.
Member Typedef Documentation
**typedef Profile_Bin Profile_Bin::Like_Current
Reimplemented from I_Bin.
**typedef
I_Bin Profile_Bin::Like_Parent
Constructor & Destructor Documentation
**Profile_Bin::Profile_Bin ()
**Profile_Bin::~Profile_Bin () [inline]
Member Function Documentation
| Profile_Bin::H_IID_IMPLEMENT ( | Profile_Bin) | | ------------------------------------- | ----------------- |
Very simple RTTI feature.
| void Profile_Bin::add ( | double x) [inline, virtual] | | ---------------------------- | ----------------------------------- |
Add scalar to current bin.
Reimplemented from I_Bin.
| void Profile_Bin::add ( | const | | ---------------------------- | --------- |
Like_Parent & other) [inline]
Add other bin to current one.
| void Profile_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 Profile_Bin::count () const [inline, virtual]
Count associated with this bin. = Number of entries.
Reimplemented from I_Bin.
| void Profile_Bin::div ( | double x) [inline, virtual] | | ---------------------------- | ----------------------------------- |
Divide current bin by scalar.
Reimplemented from I_Bin.
| void Profile_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 Profile_Bin::error ( | | | -------------------------------- | |
Index i = 0) const [inline, virtual]
Error associated with this bin.
If index==0 the RMS is returned, if index==1, the Spread is returned.
Reimplemented from I_Bin.
| void Profile_Bin::make ( | const | | ----------------------------- | --------- |
Like_Parent & other) [inline]
| void Profile_Bin::mul ( | double x) [inline, virtual] | | ---------------------------- | ----------------------------------- |
Multiply current bin by scalar.
Reimplemented from I_Bin.
| void Profile_Bin::mul ( | const | | ---------------------------- | --------- |
Like_Parent & other) [inline]
Multiply current bin by other one.
| int Profile_Bin::operator== ( | const | | ---------------------------------- | --------- |
Like_Current & other) const [inline]
| void Profile_Bin::put ( | T_Value a_weight, | | --------------------------------------- | ------------------------- | | T_Value a_character) [inline] | |
Put data point with weight a_weight and character value a_character.
**void Profile_Bin::reset () [inline, virtual]
Reset bin contents to 0.
Reimplemented from I_Bin.
| void Profile_Bin::set_count ( | | | ----------------------------------- | |
Size other) [inline, virtual]
Change/set the count of the bin to other.
Reimplemented from I_Bin.
| void Profile_Bin::set_error ( | double other, | | ----------------------------------- | ------------------- | | | |
Index i = 0) [inline, virtual]
Error cannot be set: it is computed out of L, H, E.
The previous values are set with the set_value(..) method.
Reimplemented from I_Bin.
| void Profile_Bin::set_value ( | double other, | | ----------------------------------- | ------------------- | | | |
Index i = 0) [inline, virtual]
Set value identified by i to other.
i=1: set l
i=2: set h
i=3: set e
else: nothing is done.Reimplemented from I_Bin.
| void Profile_Bin::sub ( | double x) [inline, virtual] | | ---------------------------- | ----------------------------------- |
Subtract scalar from current bin.
Reimplemented from I_Bin.
| void Profile_Bin::sub ( | const | | ---------------------------- | --------- |
Like_Parent & other) [inline]
Subtract other bin from current one.
| double Profile_Bin::value ( | | | -------------------------------- | |
Index i = 0) const [inline, virtual]
Value associated with this bin.
i=1: l
i=2: h
i=3: e
i=0 or other: h/lReimplemented from I_Bin.
The documentation for this class was generated from the following file:
Generated at Fri Nov 24 09:28:27 2000 for TransientHTL by
1.1.2 written by Dimitri van Heesch, © 1997-2000