public virtual IterationResults Solve() { Init(); int iteration = 1; Vector point = (Vector)InitialPoint.Clone(); do { point = SolveIteration(point, iteration).CurrentPoint; ++iteration; }while (!ShouldEnd()); return(iterations.Last()); }
protected override void Init() { double fvalue = Task.Cost.Function(InitialPoint); iterations = new List <IterationResults>(MaxIterations * Task.Dim + 1) { new IterationResults() { Iteration = 0, CurrentPoint = InitialPoint, CurrentFunction = fvalue, CurrentCost = fvalue, LastFunuctionChange = Math.Abs(fvalue), LastPointChange = InitialPoint.L2Norm(), MaxConstraintValue = 0.0 } }; }