24 #include <QtCore/QDataStream>
29 const QString
typeNames[] = {
"WhiteNoise",
"MarkovProcess",
"RandomWalk"};
31 const QString
modeNames[] = {
"None",
"Global",
"Arc",
"Local",
"PWL",
"Stochastic"};
42 return "SgParameterCfg";
49 double arcStep,
double stocAPriori,
double breakNoise,
double tau,
50 double whiteNoise,
double pwlStep,
double pwlAPriori,
int pwlNumOfPolynomials,
51 double scale,
const QString& scaleName)
97 if (s.status() != QDataStream::Ok)
100 ": saveIntermediateResults(): error writting data");
103 return s.status() == QDataStream::Ok;
111 QString name, scaleName;
112 unsigned int attributes, pMode, sType;
113 double scale, convAPriori, arcStep, pwlAPriori, pwlStep, stocAPriori;
114 double breakNoise, tau, whiteNoise;
115 int pwlNumOfPolynomials;
117 s >> name >> attributes >> pMode >> sType >> scale >> scaleName
118 >> convAPriori >> arcStep >> pwlAPriori >> pwlStep >> pwlNumOfPolynomials >> stocAPriori
119 >> breakNoise >> tau >> whiteNoise;
121 if (s.status() != QDataStream::Ok)
124 ": loadIntermediateResults(): error reading data: " +
125 (s.status()==QDataStream::ReadPastEnd?
"read past end of the file":
"read corrupt data"));
131 ": loadIntermediateResults(): error reading data: wrong order, names mismatch: got [" + name +
132 "], expected [" +
name_ +
"]");
150 return s.status()==QDataStream::Ok;
const QString modeNames[]
const QString typeNames[]
void setAttributes(unsigned int a)
unsigned int getAttributes() const
virtual void write(LogLevel, quint32, const QString &, bool=false)
bool saveIntermediateResults(QDataStream &) const
double scale_
Value of the scale factor.
static const QString & type2String(SType)
bool loadIntermediateResults(QDataStream &)
int pwlNumOfPolynomials_
number of polynomials in the PWL model
double arcStep_
a step for arc parameter
double whiteNoise_
psd of ruled white noise
static const QString className()
QString scaleName_
Name of the scale factor.
double breakNoise_
psd of noise process used for "breaks"
static const QString & mode2String(PMode)
double stocAPriori_
a priori std. deviation (stochastic pars)
double pwlStep_
a step for modelling by picewise linear function
double tau_
time of relaxation
double pwlAPriori_
a priori std. deviation (for pisewice linear B-coeffs)
double convAPriori_
a priori std. deviation (conventional pars)