public Segment(NewKmeans.XY p1, NewKmeans.XY p2) { P1 = p1; P2 = p2; }
private const double Exp = 2; // 2=euclid, 1=manhatten //Minkowski dist public static double Distance(NewKmeans.XY a, NewKmeans.XY b) { return(Math.Pow(Math.Pow(Math.Abs(a.X - b.X), Exp) + Math.Pow(Math.Abs(a.Y - b.Y), Exp), 1.0 / Exp)); }