measurement.h
Go to the documentation of this file.
1 /**************************************************************************************************
2  Software License Agreement (BSD License)
3 
4  Copyright (c) 2011-2013, LAR toolkit developers - University of Aveiro - http://lars.mec.ua.pt
5  All rights reserved.
6 
7  Redistribution and use in source and binary forms, with or without modification, are permitted
8  provided that the following conditions are met:
9 
10  *Redistributions of source code must retain the above copyright notice, this list of
11  conditions and the following disclaimer.
12  *Redistributions in binary form must reproduce the above copyright notice, this list of
13  conditions and the following disclaimer in the documentation and/or other materials provided
14  with the distribution.
15  *Neither the name of the University of Aveiro nor the names of its contributors may be used to
16  endorse or promote products derived from this software without specific prior written permission.
17 
18  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
19  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
20  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
21  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
24  IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
25  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 ***************************************************************************************************/
32 #ifndef _MEASUREMENT_H_
33 #define _MEASUREMENT_H_
34 
35 #include <boost/shared_ptr.hpp>
36 #include <fstream>
37 #include <iostream>
38 #include <vector>
39 
40 #include <Eigen/Dense>
41 
42 #include <mtt/point.h>
43 #include <mtt/cluster.h>
44 
45 using namespace std;
46 
47 using Eigen::Vector2d;
48 using Eigen::Vector3d;
49 
50 class Cluster;
51 
53 typedef boost::shared_ptr<Cluster> ClusterPtr;
54 
61 {
62  public:
63 
65  vector<PointPtr> points;
69  long id;
70 
72 
74  vector<ClusterPtr> assigned_clusters;
75 
76  Measurement();
77 
78  ~Measurement();
79 
80  Measurement & operator=(const Measurement &rhs);
81 
89  bool breakPointDetector(PointPtr&pt,PointPtr&pt_m1);
90 
94  void calculateCentroid(void);
95 
96  bool operator<(Measurement&);
97  bool operator>(Measurement&);
98 
99 // friend ostream& operator<<(ostream& o, Measurement& m);
100 
101  private:
102 };
103 
105 typedef boost::shared_ptr<Measurement> MeasurementPtr;
106 
107 ostream& operator<<(ostream& o, Measurement& m);
108 ostream& operator<<(ostream& o,vector<MeasurementPtr>& m);
109 
119 
120 #endif
boost::shared_ptr< Measurement > MeasurementPtr
Definition: cluster.h:47
bool compareMeasurements(MeasurementPtr m1, MeasurementPtr m2)
This function compares two measurements just to sort them.
ostream & operator<<(ostream &o, Measurement &m)
Definition: measurement.cpp:46
Vector3d state
Definition: measurement.h:71
long id
Id of the measurement.
Definition: measurement.h:69
boost::shared_ptr< Point > PointPtr
Shared pointer to the Point class.
Definition: point.h:45
Point centroid
Centroid of the measurement.
Definition: measurement.h:67
Point class declaration.
Simple point class.
Definition: point.h:53
Measurement class type.
Definition: measurement.h:60
Eigen::Matrix< double, 3, 1 > Vector3d
boost::shared_ptr< Cluster > ClusterPtr
Shared pointer to the Cluster class.
Definition: measurement.h:50
Hypotheses cluster class.
Definition: cluster.h:55
Hypotheses cluster definition.
vector< ClusterPtr > assigned_clusters
Hypotheses cluster association vector.
Definition: measurement.h:74
vector< PointPtr > points
Vector of the support points.
Definition: measurement.h:65
boost::shared_ptr< Measurement > MeasurementPtr
Shared pointer to the Measurement class.
Definition: measurement.h:105


mtt
Author(s): Jorge Almeida
autogenerated on Mon Mar 2 2015 01:32:18