예제 #1
0
        public double GetDistance(Vector vector)
        {
            if (this.values.Count() != vector.values.Count())
            {
                throw new InvalidOperationException("Not the same count of attributes");
            }

            ILArray <double> result = this.values - vector.values;

            result = result * result;

            return(Math.Sqrt(result.Sum()));
        }