Commit d7ca0bde authored by Maksim Shabunin's avatar Maksim Shabunin

text: do not calculate mean for empty angles list

parent db3d7e85
......@@ -2687,7 +2687,8 @@ double MaxMeaningfulClustering::probability(vector<int> &cluster)
//for (int kk=0; kk<angles.size(); kk++)
// cout << angles[kk] << " ";
//cout << endl;
if (angles.empty() || edge_distances.empty())
return 0;
meanStdDev( angles, mean, std );
sample.push_back((float)std[0]);
sample.push_back((float)mean[0]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment