/// <summary> /// Calculates the dot-product or cos(angle) between two vectors, /// using the square roots of the values in the vectors. /// </summary> /// <param name="s">The other vector</param> /// <returns>Dot-Product of square roots of values in vectors</returns> public double AngleSqrt(Statistics s) { var listNormal1 = new List <double>(_list); listNormal1 = listNormal1.ConvertAll(val => Math.Sqrt(val)); var stat1 = new Statistics(listNormal1.ToArray()); var listNormal2 = new List <double>(s._list); listNormal2 = listNormal2.ConvertAll(val => Math.Sqrt(val)); var stat2 = new Statistics(listNormal2.ToArray()); return(stat1.Angle(stat2)); }
/// <summary> /// Calculates the dot-product or cos(angle) between two vectors, /// using the square roots of the values in the vectors. /// </summary> /// <param name="s">The other vector</param> /// <returns>Dot-Product of square roots of values in vectors</returns> public double AngleSqrt(Statistics s) { var listNormal1 = new List<double>(_list); listNormal1 = listNormal1.ConvertAll(val => Math.Sqrt(val)); var stat1 = new Statistics(listNormal1.ToArray()); var listNormal2 = new List<double>(s._list); listNormal2 = listNormal2.ConvertAll(val => Math.Sqrt(val)); var stat2 = new Statistics(listNormal2.ToArray()); return stat1.Angle(stat2); }