Exemple #1
0
        private double GetWDC(AssesmentsSegment[] segments, IColorSheme colorSheme)
        {
            double wcd = 0;

            for (int i = 0; i < segments.Length; i++)
            {
                for (int j = 0; j < segments[i].Length; j++)
                {
                    wcd += colorSheme.AssessmentsDifference(segments[i].points[j], segments[i].center) / segments[i].Length;
                }
            }

            return(wcd / segments.Length);
        }
        internal override double GeAssessment(AssesmentsSegment[] segments, IColorSheme colorSheme)
        {
            double distance = 0;
            int    k        = segments.Length;

            for (int j = 0; j < k; j++)
            {
                for (int l = 0; l < segments[j].Length; l++)
                {
                    distance += Math.Pow(colorSheme.AssessmentsDifference(segments[j].points[l], segments[j].center), 2);
                }
            }
            //distance += colorSheme.AssessmentsDifference(segments[j].points[l], segments[j].center);

            return(distance);
        }
        internal override double GeAssessment(AssesmentsSegment[] segments, IColorSheme colorSheme)
        {
            double distance = 0;
            int    k        = segments.Length;

            for (int j = 0; j < k; j++)
            {
                for (int l = 0; l < segments[j].Length - 1; l++)
                {
                    for (int h = l + 1; h < segments[j].Length; h++)
                    {
                        distance += colorSheme.AssessmentsDifference(segments[j].points[l], segments[j].points[h]);
                    }
                }
            }

            return(distance);
        }
Exemple #4
0
        private double GetBDC(AssesmentsSegment[] segments, IColorSheme colorSheme)
        {
            int N = segments.Sum(s => s.points.Count);

            Vector v = new Vector(new double[3]);

            for (int i = 0; i < segments.Length; i++)
            {
                v += new Vector(segments[i].center);
            }

            v /= segments.Length;

            double[] centerOfCenters = v.GetCloneOfData();

            double bcd = 0;

            for (int i = 0; i < segments.Length; i++)
            {
                bcd += colorSheme.AssessmentsDifference(segments[i].center, centerOfCenters) * segments[i].Length;
            }

            return(bcd / (N * segments.Length));
        }