コード例 #1
0
        public void AddDimension(double[] p)
        {
            double[] a = new double[1];

            for (int i = 0; i < schwerpunkte.Length; ++i)
            {
                a[0] = Math.Pow(MatrixMafs.ArrMinusArr(p, schwerpunkte[i]).Average(), 2);
                p    = p.Concat(a).ToArray();
            }
        }
コード例 #2
0
        public void AddDimension()
        {
            double[] schwerpunkt = GetVectorSchwerpunkt(points.ToArray());
            double[] a           = new double[1];

            for (int i = 0; i < points.Count; ++i)
            {
                a[0]      = Math.Pow(MatrixMafs.ArrMinusArr(points[i], schwerpunkt).Average(), 2);
                points[i] = points[i].Concat(a).ToArray();
            }
        }
コード例 #3
0
        public static double[][] AddDimension(double[][] p)
        {
            double[] schwerpunkt = GetVectorSchwerpunkt(p);
            double[] a           = new double[1];

            for (int i = 0; i < p.Length; ++i)
            {
                a[0] = Math.Pow(MatrixMafs.ArrMinusArr(p[i], schwerpunkt).Average(), 2);
                p[i] = p[i].Concat(a).ToArray();
            }

            return(p);
        }