public List <double> ReadRow(int countOfNumbers) { var text = Console.ReadLine(); if (text != null || text != "") { var matches = AhpBuilder.GetMatches(AhpBuilder.numMatcher, text); if (matches.Count != countOfNumbers) { Console.Write("Values not correct"); return(new List <double>()); } return(AhpBuilder.ConvertMatchesToDoubles(matches)); } else { Console.WriteLine("Exit program and enter again"); } return(new List <double>()); }
static void AhpBuilder() { var builder = new AhpBuilder(); var creteria2dArr = builder.BuildCriteriasMultidimentionalArray(); List <double[, ]> choicesList = builder.BuildAndGetAllChoicesList(); var ahpmodel = new AhpModel(); ahpmodel .CriteriaMatrixStatisticsJob(creteria2dArr); ahpmodel.AddChoiceList(choicesList); var Gvect = ahpmodel.GetGlobalVector(); Console.WriteLine(Gvect); var alternatives = builder.AlternativesList; ahpmodel.PrintAlternativesNumbers(alternatives); }