1#ifndef __JTOOLS__JSTATS__
2#define __JTOOLS__JSTATS__
64 template<
class JElement_t,
class JAllocator_t>
67 const double w = 1.0) :
85 xmin = std::numeric_limits<double>::max();
86 xmax = std::numeric_limits<double>::lowest();
87 wmin = std::numeric_limits<double>::max();
88 wmax = std::numeric_limits<double>::lowest();
119 void put(
const double x,
const double w = 1.0)
132 const double new_sigma =
sigma + w * (x -
mean) * (x - new_mean);
153 template<
class JElement_t,
class JAllocator_t>
155 const double w = 1.0)
157 for (
typename array_type<JElement_t, JAllocator_t>::const_iterator i = buffer.begin(); i != buffer.end(); ++i) {
320 std::ostream&
print(std::ostream& out,
bool lpr =
true)
const
327 out << setw(nc) << left <<
" " <<
' '
328 << setw(12) << left <<
" mean" <<
' '
329 << setw(12) << left <<
" STD" <<
' '
330 << setw(12) << left <<
" deviation" << endl;
333 out << setw(nc) << left <<
getTitle() <<
' '
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
bool getLongprint(std::ostream &out)
Get long print option.
Base class for data structures with artithmetic capabilities.
Auxiliary methods to convert data members or return values of member methods of a set of objects to a...
Exception for division by zero.
Auxiliary class for title.
const std::string & getTitle() const
Get title.
const array_type< JValue_t > & make_array(const JValue_t(&array)[N])
Method to create array of values.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary data structure for return type of make methods.
Auxiliary base class for aritmetic operations of derived class types.
Auxiliary data structure for floating point format specification.