}
Derived &
- ysubname(off_type index, const std::string subname)
+ ysubname(off_type index, const std::string &subname)
{
Derived &self = this->self();
Info *info = this->info();
info->y_subnames[index] = subname.c_str();
return self;
}
+
+ std::string
+ ysubname(off_type i) const
+ {
+ return this->info()->y_subnames[i];
+ }
+
};
//////////////////////////////////////////////////////////////////////
return self;
}
- std::string ysubname(off_type i) const { return (*this->y_subnames)[i]; }
-
Proxy
operator[](off_type index)
{
bool
zero() const
{
- return false;
-#if 0
for (off_type i = 0; i < size(); ++i)
if (!data(i)->zero())
return false;
return true;
-#endif
}
void
*/
void reset() { }
};
-/*
-template <class Derived, class Stor>
-inline typename VectorDistBase<Derived, Stor>::Proxy
-VectorDistBase<Derived, Stor>::operator[](off_type index)
-{
- assert (index >= 0 && index < size());
- typedef typename VectorDistBase<Derived, Stor>::Proxy Proxy;
- return Proxy(this->self(), index);
-}
-*/
-
-#if 0
-template <class Storage>
-Result
-VectorDistBase<Storage>::total(off_type index) const
-{
- Result total = 0.0;
- for (off_type i = 0; i < x_size(); ++i)
- total += data(i)->result();
-}
-#endif
//////////////////////////////////////////////////////////////////////
//
*/
StandardDeviation()
{
+ SampleStor::Params *params = new SampleStor::Params;
this->doInit();
+ this->setParams(params);
}
};
*/
AverageDeviation()
{
+ AvgSampleStor::Params *params = new AvgSampleStor::Params;
this->doInit();
+ this->setParams(params);
}
};
VectorStandardDeviation &
init(size_type size)
{
+ SampleStor::Params *params = new SampleStor::Params;
this->doInit(size);
+ this->setParams(params);
return this->self();
}
};
VectorAverageDeviation &
init(size_type size)
{
+ AvgSampleStor::Params *params = new AvgSampleStor::Params;
this->doInit(size);
+ this->setParams(params);
return this->self();
}
};
#include "base/stats/text.hh"
#include "base/stats/mysql.hh"
#include "base/types.hh"
+#include "sim/stat_control.hh"
using namespace std;
using namespace Stats;
main(int argc, char *argv[])
{
bool descriptions = false;
- bool compat = false;
bool text = false;
#if USE_MYSQL
progname = argv[0];
while ((c = getopt(argc, argv, "cD:dh:P:p:s:tu:")) != -1) {
switch (c) {
- case 'c':
- compat = true;
- break;
case 'd':
descriptions = true;
break;
}
}
- if (!text && (compat || descriptions))
+ if (!text && descriptions)
usage();
+ initSimStats();
+
Scalar s1;
Scalar s2;
Average s3;
f4 += s5[3];
f5 = constant(1);
- check();
+ enable();
reset();
s16[1][0] = 1;
s12.sample(100);
+ prepare();
+
if (text) {
Text out(cout);
out.descriptions = descriptions;
- out.compat = compat;
out();
}