Changeset 1210 for trunk/test/distance_test.cc
 Timestamp:
 Mar 6, 2008, 5:00:44 PM (14 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/test/distance_test.cc
r1121 r1210 60 60 statistics::EuclideanDistance eucl_dist; 61 61 double dist=eucl_dist(a.begin(),a.end(),b.begin()); 62 if( fabs(dist2.23607)>tolerance) {62 if(std::abs(dist2.23607)>tolerance) { 63 63 *error << "Error in unweighted Euclidean distance " << std::endl; 64 64 ok=false; … … 67 67 statistics::PearsonDistance pear_dist; 68 68 dist=pear_dist(a.begin(),a.end(),b.begin()); 69 if( fabs(dist1.5)>tolerance) {69 if(std::abs(dist1.5)>tolerance) { 70 70 *error << "Error in unweighted Pearson distance " << std::endl; 71 71 ok=false; … … 86 86 dist=eucl_dist(aw.begin(),aw.end(),bw.begin()); 87 87 88 if( fabs(distsqrt(6))>tolerance) {88 if(std::abs(distsqrt(6))>tolerance) { 89 89 *error << "Error in weighted Euclidean distance " << std::endl; 90 90 ok=false; … … 93 93 dist=pear_dist(aw.begin(),aw.end(),bw.begin()); 94 94 95 if( fabs(dist2)>tolerance) {95 if(std::abs(dist2)>tolerance) { 96 96 *error << "Error in weighted Pearson distance " << std::endl; 97 97 ok=false; … … 106 106 107 107 dist=eucl_dist(sa.begin(),sa.end(),sb.begin()); 108 if( fabs(dist2.23607)>tolerance) {108 if(std::abs(dist2.23607)>tolerance) { 109 109 *error << "Error in distance for std::vector " << std::endl; 110 110 ok=false; … … 115 115 std::copy(sa.begin(),sa.end(),std::back_inserter<std::list<double> >(la)); 116 116 dist=eucl_dist(la.begin(),la.end(),sb.begin()); 117 if( fabs(dist2.23607)>tolerance) {117 if(std::abs(dist2.23607)>tolerance) { 118 118 *error << "Error in distance for std::list " << std::endl; 119 119 ok=false;
Note: See TracChangeset
for help on using the changeset viewer.