コード例 #1
0
 /// <summary>Compute cosine distance between two column vectors.</summary>
 public static double Cosine(SimpleMatrix vector1, SimpleMatrix vector2)
 {
     return(Dot(vector1, vector2) / (vector1.NormF() * vector2.NormF()));
 }