新手linksys E3200首刷tomato.求教gae设置
发布网友
发布时间:2022-04-19 09:52
我来回答
共1个回答
热心网友
时间:2023-08-17 19:25
if (clusters[i] != null)
{
string[] pointsNum = r.Split(clusters[i]);
for (int j = 0; j < pointsNum.Length - 1; j++)
{
centers[i].X = centers[i].X + lp[Convert.ToInt32(pointsNum[j])].X;
centers[i].Y = centers[i].Y + lp[Convert.ToInt32(pointsNum[j])].Y;
}
centers[i].X = Convert.ToDouble(centers[i].X) / (pointsNum.Length - 1);
centers[i].Y = Convert.ToDouble(centers[i].Y) / (pointsNum.Length - 1);
}
}
stop = true;
for (int i = 0; i < k; i++)
{
if (preCenters[i].X != centers[i].X || preCenters[i].Y != centers[i].Y) stop = false;
}
}
listBox1.Items.Clear();
for (int i = 0; i < k; i++)//输出每个簇中数据所在的位置
{
string[] nums = r.Split(clusters[i]);
for (int j = 0; j < nums.Length - 1; j++)
{
//Console.Write("({0},{1}) ", lp[Convert.ToInt32(nums[j])].X, lp[Convert.ToInt32(nums[j])].Y);
listBox1.Items.Add(lp[Convert.ToInt32(nums[j])].X+","+lp[Convert.ToInt32(nums[j])].Y);
}
//Console.Write('\n');
}
//Console.Read();
}