/**
* Set the precision and marks this stat to print at the end of simulation.
- * @param p The new precision
+ * @param _precision The new precision
* @return A reference to this stat.
*/
Parent &
void
reset(Info *info)
{
- total = 0;
+ total = 0.0;
last = curTick;
}
Result
total() const
{
- Result total = 0;
+ Result total = 0.0;
for (off_type i = 0; i < size(); ++i)
total += data(i)->result();
return total;
* Add a value to the distribution for the given number of times.
* @param val The value to add.
* @param number The number of times to add the value.
- * @param params The paramters of the distribution.
*/
void
sample(Counter val, int number)
* values seen by the given number.
* @param val The value to add.
* @param number The number of times to add the value.
- * @param p The parameters of this stat.
*/
void
sample(Counter val, int number)
Result
VectorDistBase<Storage>::total(off_type index) const
{
- Result total = 0;
+ Result total = 0.0;
for (off_type i = 0; i < x_size(); ++i)
total += data(i)->result();
}
total() const
{
const VResult &vec = this->result();
- Result total = 0;
+ Result total = 0.0;
for (off_type i = 0; i < size(); i++)
total += vec[i];
return total;
total() const
{
const VResult &vec = this->result();
- Result total = 0;
+ Result total = 0.0;
for (off_type i = 0; i < size(); i++)
total += vec[i];
return total;
* Return the node pointer.
* @return the node pointer.
*/
- operator NodePtr&() { return node;}
+ operator NodePtr&() { return node; }
public:
/**