本文整理汇总了C++中Observation::from方法的典型用法代码示例。如果您正苦于以下问题:C++ Observation::from方法的具体用法?C++ Observation::from怎么用?C++ Observation::from使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Observation
的用法示例。
在下文中一共展示了Observation::from方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: observations
//.........这里部分代码省略.........
double m = h->value();
ostr << " <obs>" << m << "</obs>";
m += v(i)/1000;
ostr << " <adj>" << m << "</adj>";
}
else if (Xdiff* dx = dynamic_cast<Xdiff*>(pm))
{
out << "<" << (tag="dx") << ">";
ostr.precision(linear);
double m = dx->value();
ostr << " <obs>" << m << "</obs>";
m += v(i)/1000;
ostr << " <adj>" << m << "</adj>";
}
else if (Ydiff* dy = dynamic_cast<Ydiff*>(pm))
{
out << "<" << (tag="dy") << ">";
ostr.precision(linear);
double m = dy->value();
ostr << " <obs>" << y_sign*m << "</obs>";
m += v(i)/1000;
ostr << " <adj>" << y_sign*m << "</adj>";
}
else if (Zdiff* dz = dynamic_cast<Zdiff*>(pm))
{
out << "<" << (tag="dz") << ">";
ostr.precision(linear);
double m = dz->value();
ostr << " <obs>" << m << "</obs>";
m += v(i)/1000;
ostr << " <adj>" << m << "</adj>";
}
else
{
throw GaMaLib::Exception("review/adjusted_observations.h - "
"unknown observation type");
}
if (u)
{
out << " <from>" << u->from() << "</from>"
<< " <left>" << u->bs() << "</left>"
<< " <right>" << u->fs() << "</right>\n";
}
else if (xyz)
{
out << " <id>" << pm->from() << "</id>\n";
}
else
{
out << " <from>" << pm->from() << "</from>"
<< " <to>" << pm->to() << "</to>\n";
}
out << " " << ostr.str();
out.setf(ios_base::fixed, ios_base::floatfield);
out.precision(3);
out.width(7);
double ml = netinfo->stdev_obs(i);
if (dynamic_cast<Direction*>(pm))
ml *= scale;
else if (dynamic_cast<Angle*>(pm))
ml *= scale;
else if (dynamic_cast<Z_Angle*>(pm))
ml *= scale;
out << " <stdev>" << ml << "</stdev>\n";
// weight coefficient of the residual
double qrr = netinfo->wcoef_res(i);
out << " <qrr>" << qrr << "</qrr>";
double f = netinfo->obs_control(i);
out << " <f>" << f << "</f>";
double sc=scale;
if (f >= 0.1)
{
using namespace std;
double no = fabs(netinfo->studentized_residual(i));
out << " <std-residual>" << no << "</std-residual>";
if ( (pm->ptr_cluster())->covariance_matrix.bandWidth() == 0 &&
(f >=5 || (f >= 0.1 && no > kki)))
{
double em = v(i)/(netinfo->wcoef_res(i)*netinfo->weight_obs(i));
out << "\n <err-obs>" << em*sc << "</err-obs>";
double ev = em - v(i);
out << " <err-adj>" << ev*sc << "</err-adj>";
}
}
out << "\n </" << tag << ">\n";
}
out << "\n</observations>\n";
}