/// <summary> /// Выделение из полной целевой функции нужных коэффициентов по декомпозиции /// </summary> private static ObjectiveFunction ConvertToShortObjectiveFunction(Decomposition decomposition, ObjectiveFunction objectiveFunction) { var shortObjectiveFunction = new List<Fraction>(); for (var i = 0; i < objectiveFunction.Count(); i++) { if (decomposition.FreeVariables.Contains(i)) shortObjectiveFunction.Add(objectiveFunction[i]); } shortObjectiveFunction.Add(objectiveFunction.Last()); return new ObjectiveFunction(shortObjectiveFunction); }