我尝试按照以下过程设置一些条件
public float GetSimilarity(int doc_i, int doc_j)
{
float[] vector1 = GetTermVector(doc_i);
float[] vector2 = GetTermVector(doc_j);
if (checkbox1.checked == true )
return Similarties.ComputeDiceSimilarity(vector1, vector2);
else if (checkbox2.checked == true )
return Similarties.ComputeCosineSimilarity(vector1, vector2);
else
return Similarties.ComputeJaccardSimilarity(vector1, vector2);
}
,但问题是在类中无法识别复选框。请问如何克服这个问题?. 抱歉编程不佳,并在此先感谢。