Exemplo n.º 1
0
    return loadFromYAML(doc);
  }
  catch(YAML::Exception& e)
  {
    ROS_ERROR_STREAM(e.what());
    return FeatureVector::empty;
  }
}

FeatureVector FeatureVectorFactory::loadFromYAML(const YAML::Node& feature_space_root)
{
  try
  {
    // Read a feature vector from the root node.
    FeatureVector ret;
    feature_space_root >> ret;
    return ret;
  }
  catch(YAML::Exception& e)
  {
    ROS_ERROR_STREAM(e.what());
    return FeatureVector::empty;
  }
}

//static
const FeatureVector& FeatureVector::empty = FeatureVector(std::vector<Feature>());

} /* namespace pomdp */
Exemplo n.º 2
0
void VectorDataSet::addPattern(const std::vector<double>& featureValue)
{
  X.push_back(FeatureVector(featureValue));
}