コード例 #1
0
        public double FindDistance2(MLDataPoint pt)
        {
            double distance  = 0;
            int    dimension = this.Dimension;

            for (int i = 0; i < dimension; ++i)
            {
                double d = (this[i] - pt[i]);
                distance += (d * d);
            }
            return(System.Math.Sqrt(distance));
        }
コード例 #2
0
 public void addSample(MLDataPoint input, MLDataPoint target)
 {
     m_inputs.Add(input);
     m_targets.Add(target);
 }