public static double S(Set Set, string[] new_partition, List <string[]> Structurings, GenericDistances aGenericDistance)
        {
            string[] _tempNewPartition = new_partition;
            new_partition = new string[Structurings[0].Length];

            for (int i = 0; i < _tempNewPartition.Length; i++)
            {
                for (int j = 0; j < Set[i].Values.Count; j++)
                {
                    Element _e = (Element)Set[i].Values[j];
                    new_partition[_e.Index] = _tempNewPartition[i];
                }
            }

            double _result = 0;

            for (int i = 0; i < Structurings.Count; i++)
            {
                _result += aGenericDistance.CalculateDistanceWithLabels(new_partition, Structurings[i], Set);
            }

            new_partition = _tempNewPartition;

            return(_result);
        }
Пример #2
0
        public static double S(Set Set, string[] new_partition, List <string[]> Structurings, GenericDistances aGenericDistance)
        {
            double _result = 0;

            for (int i = 0; i < Structurings.Count; i++)
            {
                _result += aGenericDistance.CalculateDistanceWithLabels(new_partition, Structurings[i], Set);
            }

            return(_result);
        }