当前位置: 首页>>代码示例>>C++>>正文


C++ SpReliabilitySingleModelInterface类代码示例

本文整理汇总了C++中SpReliabilitySingleModelInterface的典型用法代码示例。如果您正苦于以下问题:C++ SpReliabilitySingleModelInterface类的具体用法?C++ SpReliabilitySingleModelInterface怎么用?C++ SpReliabilitySingleModelInterface使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了SpReliabilitySingleModelInterface类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: getReliability

  double DEGU_CORNER::getReliability(SpMObject mobile, Datapool& datapool) {
      //Add reliability measure according to minimal corner distance
      SpReliabilitySingleModelInterface m = mobile->getSubModel("BaseModel");
      if(m.isNull())
          return 0;

      return (m->dynamics.dynamics["X"].att.VR.RC + m->dynamics.dynamics["Y"].att.VR.RC)/2.0;

  }
开发者ID:dcardenasnl,项目名称:Test,代码行数:9,代码来源:LearningAttributesSpecification.cpp

示例2: sqrt

  double V2D::getValue(SpMObject  mobile, Datapool& datapool) {
      SpReliabilitySingleModelInterface m = mobile->getSubModel("BaseModel");
      if(m.isNull())
          return 0;

      double VX = m->dynamics.dynamics["X"].V.value,
             VY = m->dynamics.dynamics["Y"].V.value;
      return sqrt(VX*VX+VY*VY);
  }
开发者ID:dcardenasnl,项目名称:Test,代码行数:9,代码来源:LearningAttributesSpecification.cpp

示例3: displayShowRMMMobile

void setMultiModelObjects::displayShowRMMMobile(QPainter &painter, std::deque<SpReliabilitySingleModelInterface> &models) {
    if(models.empty())
        return;
    int i, s = models.size();
    SpReliabilitySingleModelInterface current;
    for(i=s-1; i>=0; i--) {
        current = models[i];
        current->draw(painter, 0, 255, 255);
    }


}
开发者ID:dcardenasnl,项目名称:Test,代码行数:12,代码来源:setMultiModelObjects.cpp

示例4: getValue

  std::string DEGU_CORNER::getValue(SpMObject mobile, Datapool& datapool) {
      if(checked) {
         checked = true;
         valid = true;
         //First check zones
         std::vector< QSharedPointer<world::ZoneH> > &zones = datapool.sceneModel->ZonesH;
         if (zones.empty())
             valid = false;
         else {
            int num = 0;
            std::vector< QSharedPointer<world::ZoneH> >::iterator zone_it, zone_end = zones.end();
            for(zone_it = zones.begin(); zone_it != zone_end; zone_it++ ) {
                if(values.count((*zone_it)->name.toStdString()) == 1) {
                    num++;
                    DEGU_CORNER::zones[(*zone_it)->name.toStdString()] = (*zone_it);
                }
            }
            if(num != values.size() - 1)
                valid = false;
         }
      }

      SpReliabilitySingleModelInterface m = mobile->getSubModel("BaseModel");
      if(m.isNull())
          return "NONE";

      if(valid) {
          double dist, X, Y, min_dist = DBL_MAX;
          std::string nearest;
          if(datapool.sceneModel->hmatrix_filled) {
            datapool.sceneModel->imgToHomographyCoords(datapool.sceneModel->h_matrix,
                                                       nearbyint(m->dynamics.dynamics["X"].att.value),
                                                       nearbyint(m->dynamics.dynamics["Y"].att.value),
                                                       &X, &Y);
            QSharedPointer<world::ZoneH> z;
            std::map< std::string, QSharedPointer<world::ZoneH> >::iterator it, it_end = zones.end();
            for(it = zones.begin();it != it_end; it++) {
                z = (*it).second;
                if(z->pointInZone(X,Y)) {
                    dist = z->distanceToCenter(X,Y);
                    if(dist < min_dist) {
                        min_dist = dist;
                        nearest = (*it).first;
                    }
                }
            }
            if(min_dist < DBL_MAX)
                return nearest;
         }
      }
      return "NONE";
  }
开发者ID:dcardenasnl,项目名称:Test,代码行数:52,代码来源:LearningAttributesSpecification.cpp

示例5: getValue

 double VX::getValue(SpMObject  mobile, Datapool& datapool) {
     SpReliabilitySingleModelInterface m = mobile->getSubModel("Blob2DFromBGSubstractionModel");
     if(m.isNull())
         return 0;
     return m->dynamics.dynamics["X"].V.value;
 }
开发者ID:cacunas,项目名称:VAT,代码行数:6,代码来源:LearningAttributesSpecification.cpp

示例6: getReliability

 double Y::getReliability(SpMObject  mobile, Datapool& datapool) {
     SpReliabilitySingleModelInterface m = mobile->getSubModel("Blob2DFromBGSubstractionModel");
     if(m.isNull())
         return 0;
     return m->dynamics.dynamics["Y"].att.VR.RC;
 }
开发者ID:cacunas,项目名称:VAT,代码行数:6,代码来源:LearningAttributesSpecification.cpp


注:本文中的SpReliabilitySingleModelInterface类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。