本文整理汇总了C++中TimeSeries::data方法的典型用法代码示例。如果您正苦于以下问题:C++ TimeSeries::data方法的具体用法?C++ TimeSeries::data怎么用?C++ TimeSeries::data使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TimeSeries
的用法示例。
在下文中一共展示了TimeSeries::data方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LOG
TimeSeries<double> MLGDao::getSignal( oid_t nodeId, oid_t bottomLayer, oid_t topLayer )
{
#ifdef MLD_SAFE
if( bottomLayer == Objects::InvalidOID
|| topLayer == Objects::InvalidOID
|| nodeId == Objects::InvalidOID ) {
LOG(logERROR) << "MLGDao::getSignal: invalid ids";
return TimeSeries<double>();
}
#endif
// Use as less overhead as possible
TimeSeries<double> res;
oid_t layer = bottomLayer;
type_t oType = m_link->olinkType();
Value v;
while( layer != topLayer ) {
oid_t eid = findEdge(oType, layer, nodeId);
m_g->GetAttribute(eid, m_g->FindAttribute(oType, Attrs::V[OLinkAttr::WEIGHT]), v);
res.data().push_back(v.GetDouble());
layer = m_layer->parent(layer);
}
// Don't forget last layer, it is inclusive
oid_t eid = findEdge(oType, layer, nodeId);
m_g->GetAttribute(eid, m_g->FindAttribute(oType, Attrs::V[OLinkAttr::WEIGHT]), v);
res.data().push_back(v.GetDouble());
res.clamp();
return res;
}