Ejemplo n.º 1
0
        public static float5[] Zip(float[] in1, float[] in2, float[] in3, float[] in4, float[] in5)
        {
            float5[] Zipped = new float5[in1.Length];
            for (int i = 0; i < Zipped.Length; i++)
                Zipped[i] = new float5(in1[i], in2[i], in3[i], in4[i], in5[i]);

            return Zipped;
        }
Ejemplo n.º 2
0
        public static float5 Mean(IEnumerable <float5> data)
        {
            float5 Sum = new float5(0, 0, 0, 0, 0);

            foreach (var p in data)
            {
                Sum += p;
            }

            return(Sum / data.Count());
        }
Ejemplo n.º 3
0
        public static float RMSD(float5[] points)
        {
            float5 Mean   = MathHelper.Mean(points);
            float  Result = 0;

            for (int i = 0; i < points.Length; i++)
            {
                Result += (points[i] - Mean).LengthSq();
            }
            Result = (float)Math.Sqrt(Result / points.Length);

            return(Result);
        }