49 o<<
"measurement: "<<m.
id<<
" clusters: ";
72 for(uint i=0;i<rhs.
points.size();i++)
89 double d = sqrt( pow(pt->x-pt_m1->x,2) + pow(pt->y-pt_m1->y,2));
101 for(uint i=0;i<
points.size();i++)
109 cout<<
"calling this function"<<endl;
110 return this->
id<m.
id;
115 return this->
id>m.
id;
119 ostream& operator<<(ostream& o,vector<MeasurementPtr>& m)
121 for(uint i=0;i<m.size();++i)
123 o<<
"measurement: "<<m[i]->id<<
" = ";
125 if(m[i]->assigned_clusters.size()==0)
128 for(uint c=0;c<m[i]->assigned_clusters.size();++c)
130 o<<m[i]->assigned_clusters[c];
131 if(c<m[i]->assigned_clusters.size()-1)
void setZero()
Set all the point fields to zero.
long id
Id of the measurement.
boost::shared_ptr< Point > PointPtr
Shared pointer to the Point class.
Point centroid
Centroid of the measurement.
Measurement & operator=(const Measurement &rhs)
bool operator<(Measurement &)
Measurement class declaration.
ostream & operator<<(ostream &o, Measurement &m)
bool breakPointDetector(PointPtr &pt, PointPtr &pt_m1)
Break point detection used as clustering criterion.
void calculateCentroid(void)
Calculate the centroid of the cluster.
bool operator>(Measurement &)
void scale(double val)
Scale all point values by a factor.
vector< ClusterPtr > assigned_clusters
Hypotheses cluster association vector.
vector< PointPtr > points
Vector of the support points.