本文整理汇总了C++中Observation::active方法的典型用法代码示例。如果您正苦于以下问题:C++ Observation::active方法的具体用法?C++ Observation::active怎么用?C++ Observation::active使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Observation
的用法示例。
在下文中一共展示了Observation::active方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: revision_observations
void LocalNetwork::revision_observations()
{
if (!tst_redbod_) revision_points();
{
const LocalRevision local_rev(PD);
for (ObservationData::iterator i=OD.begin(), e=OD.end(); i!=e; ++i)
{
Observation* m = *i;
if (!m->revision(&local_rev)) m->set_passive();
}
}
// test cycle for StandPoint clusters with single direction
ClusterList& clusters = OD.clusters;
for (ClusterList::iterator cit=clusters.begin(); cit!=clusters.end(); ++cit)
{
if (StandPoint* sp = dynamic_cast<StandPoint*>(*cit))
{
// 1.3.08 *** check for directions pointing to the same targer
set<PointID> targets;
int active_directions = 0;
for (ObservationList::iterator i=sp->observation_list.begin();
i != sp->observation_list.end(); ++i)
{
if (const Direction* d = dynamic_cast<const Direction*>(*i))
if (d->active())
{
set<PointID>::const_iterator s = targets.find( d->to() );
if (s == targets.end())
{
active_directions++;
targets.insert( d->to() );
}
}
}
if (active_directions < 2)
{
for (ObservationList::iterator
i = sp->observation_list.begin();
i != sp->observation_list.end(); ++i)
if (Direction* d = dynamic_cast<Direction*>(*i))
d->set_passive();
}
}
(*cit)->update();
}
RSM.clear();
removed_obs.clear();
for (ObservationData::iterator i=OD.begin(), e=OD.end(); i!=e; ++i)
{
Observation* m = *i;
if (m->active()) RSM.push_back(m);
else removed_obs.push_back(m);
}
pocmer_ = RSM.size();
tst_redmer_ = true;
update(Residuals);
}