Beispiel #1
0
        /// <summary>
        /// Конвертация VSettingCLKNP в SettingCLKNP.
        /// </summary>
        private static SettingCLKNP ConvertVSettingCLKNPToSettingCLKMeans(VSettingCLKNP vsetting)
        {
            SettingCLKNP setting = new SettingCLKNP
            {
                MaxDegreeOfParallelism = vsetting.MaxDegreeOfParallelism,
            };

            return(setting);
        }
Beispiel #2
0
        /// <summary>
        /// Конвертация SettingCLKNP в IVSettingCL.
        /// </summary>
        private static IVSettingCL ConvertSettingClKNPToIVSettingCL(SettingCLKNP setting)
        {
            IVSettingCL vsetting = new VSettingCLKNP()
            {
                MaxDegreeOfParallelism = setting.MaxDegreeOfParallelism,
            };

            return(vsetting);
        }
Beispiel #3
0
        private IVSettingCL GetIVSettingCL()
        {
            string algoritm = ComboBoxAlgoritm.SelectionBoxItem.ToString();

            switch (algoritm)
            {
            case "K - средних":
            {
                VSettingCLKMeans setting = new VSettingCLKMeans
                {
                    Seeding                = VSeedings.Random,
                    MaxItarations          = Convert.ToInt32(TextBoxMaxItarations.Text),
                    MaxDegreeOfParallelism = Convert.ToInt32(TextBoxMaxDegreeOfParallelism.Text)
                };
                return(setting);
            }

            case "Кр. незамкнутый путь":
            {
                VSettingCLKNP setting = new VSettingCLKNP
                {
                    MaxDegreeOfParallelism = Convert.ToInt32(TextBoxMaxDegreeOfParallelism.Text)
                };
                return(setting);
            }

            default:
            {
                VSettingCLKMeans setting = new VSettingCLKMeans
                {
                    Seeding                = VSeedings.Random,
                    MaxItarations          = Convert.ToInt32(TextBoxMaxItarations.Text),
                    MaxDegreeOfParallelism = Convert.ToInt32(TextBoxMaxDegreeOfParallelism.Text)
                };
                return(setting);
            }
            }
        }