55 const ::cluster::ClusterParamsAlg &cluster2)
58 if( (cluster1.GetHitVector().size() <
_min_hits) ||
59 (cluster2.GetHitVector().size() <
_min_hits) )
62 if( (cluster1.GetHitVector().size() >
_max_hits) ||
63 (cluster2.GetHitVector().size() >
_max_hits) )
67 if ( (cluster1.GetParams().PolyObject.Size() < 2) or
68 (cluster2.GetParams().PolyObject.Size() < 2) ){
77 unsigned int npoints1 = cluster1.GetParams().PolyObject.Size();
78 unsigned int npoints2 = cluster2.GetParams().PolyObject.Size();
80 for(
unsigned int i = 0; i < npoints1; ++i){
81 float pt1w = cluster1.GetParams().PolyObject.Point(i).first;
82 float pt1t = cluster1.GetParams().PolyObject.Point(i).second;
84 for(
unsigned int j = 0; j < npoints2; ++j){
85 float pt2w = cluster2.GetParams().PolyObject.Point(j).first;
86 float pt2t = cluster2.GetParams().PolyObject.Point(j).second;
87 double distsqrd = pow(pt2w-pt1w,2)+pow(pt2t-pt1t,2);
92 std::cout<<
"two polygon points dist2 is "<<distsqrd<<std::endl;
Class def header for a class CBAlgoPolyShortestDist.
BEGIN_PROLOG could also be cout