TestSetGenerator.hpp
Go to the documentation of this file.
1 
18 #pragma once
19 
20 #include <utility>
21 #include <vector>
22 #include <boost/shared_ptr.hpp>
23 #include <boost/random.hpp>
24 #include <boost/random/variate_generator.hpp>
25 #include <boost/random/uniform_real.hpp>
26 #include <boost/random/mersenne_twister.hpp>
27 #include <boost/random/normal_distribution.hpp>
28 
29 #include <Eigen/Geometry>
30 
31 #include <mutex>
32 
34 #include "common_type/Tracks.hpp"
35 
36 #include "ObjectSetValidator.hpp"
37 #include "ObjectRelation.hpp"
38 #include "ImplicitShapeModel.hpp"
39 #include "utility/LogHelper.hpp"
40 
41 namespace ISM {
42 
43 typedef std::map<std::string, std::vector<ISM::ObjectSetPtr> > TestSet;
44 typedef boost::mt19937 ENG; // Mersenne Twister
45 typedef boost::uniform_int<> DIST; // Normal Distribution
46 typedef boost::variate_generator<ENG,DIST> GEN; // Variate generator
47 
48 
50 {
51  public:
52  TestSetGenerator(const std::map<std::string, ISM::ObjectRelations> allObjectRelationsPerPattern,
53  ObjectSetValidatorPtr &objectSetValidator)
54  : mAllObjectRelationsPerPattern(allObjectRelationsPerPattern)
55  , mObjectSetValidator(objectSetValidator)
56  {}
57 
58  std::pair<std::vector<ObjectSetPtr>, std::vector<ObjectSetPtr>> generateTestSets(const std::string &patternName,
59  const TracksPtr& tracks, const IsmPtr ism, unsigned int testSetCount);
60 
61  private:
62  const std::map<std::string, ISM::ObjectRelations> mAllObjectRelationsPerPattern;
64 
65 
67  const std::string& pattern, GEN &gen);
68 
69 }; typedef boost::shared_ptr<TestSetGenerator> TestSetGeneratorPtr;
70 
71 }
72 
const std::map< std::string, ISM::ObjectRelations > mAllObjectRelationsPerPattern
std::string patternName
boost::shared_ptr< ObjectSetValidator > ObjectSetValidatorPtr
boost::uniform_int DIST
boost::shared_ptr< ImplicitShapeModel > IsmPtr
TestSetGenerator(const std::map< std::string, ISM::ObjectRelations > allObjectRelationsPerPattern, ObjectSetValidatorPtr &objectSetValidator)
boost::shared_ptr< ObjectSet > ObjectSetPtr
Definition: ObjectSet.hpp:53
boost::shared_ptr< Tracks > TracksPtr
Definition: Tracks.hpp:42
ISM::ObjectSetValidatorPtr mObjectSetValidator
boost::shared_ptr< TestSetGenerator > TestSetGeneratorPtr
boost::mt19937 ENG
this namespace contains all generally usable classes.
ObjectSetPtr generateRandomObjectSetFromTracks(const ISM::TracksPtr &allTracks, const std::string &pattern, GEN &gen)
std::pair< std::vector< ObjectSetPtr >, std::vector< ObjectSetPtr > > generateTestSets(const std::string &patternName, const TracksPtr &tracks, const IsmPtr ism, unsigned int testSetCount)
std::map< std::string, std::vector< ISM::ObjectSetPtr > > TestSet
boost::variate_generator< ENG, DIST > GEN


asr_lib_ism
Author(s): Hanselmann Fabian, Heller Florian, Heizmann Heinrich, Kübler Marcel, Mehlhaus Jonas, Meißner Pascal, Qattan Mohamad, Reckling Reno, Stroh Daniel
autogenerated on Wed Jan 8 2020 04:02:41