diff include/testutils.hpp @ 201:f7ddfc4aeb1e

added tests for graphs
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Mon, 05 Mar 2012 01:52:56 -0500
parents aeab0b88c9b6
children 045d05cef9d0
line wrap: on
line diff
--- a/include/testutils.hpp	Fri Mar 02 19:32:54 2012 -0500
+++ b/include/testutils.hpp	Mon Mar 05 01:52:56 2012 -0500
@@ -7,14 +7,15 @@
 
 #include <boost/shared_ptr.hpp>
 
-inline boost::shared_ptr<FeatureTrajectory> createFeatureTrajectory(const int& firstInstant, const int& lastInstant, const cv::Point2f& firstPosition, const cv::Point2f& velocity) {
+inline boost::shared_ptr<FeatureTrajectory> createFeatureTrajectory(const unsigned int& id, const unsigned int& firstInstant, const unsigned int& lastInstant, const cv::Point2f& firstPosition, const cv::Point2f& velocity) {
   cv::Mat emptyHomography;
   boost::shared_ptr<FeatureTrajectory> t = boost::shared_ptr<FeatureTrajectory>(new FeatureTrajectory(firstInstant, firstPosition, emptyHomography));
   cv::Point2f p = firstPosition;
-  for (int i=firstInstant+1; i<=lastInstant; ++i) {
+  for (unsigned int i=firstInstant+1; i<=lastInstant; ++i) {
     p = p+velocity;
     t->addPoint(i, p, emptyHomography);
   }
+  t->setId(id);
   return t;
 }