Пример #1
0
 public override double EvaluateIteration()
 {
     try
     {
         DhbVector start;
         start = new DhbVector(_result);
         int n = _projections.Length;
         for (int i = 0; i < n; i++)
         {
             _projections[i].SetOrigin(_result);
             _unidimensionalFinder.Function     = _projections[i];
             _unidimensionalFinder.InitialValue = 0;
             _unidimensionalFinder.Evaluate();
             _result = _projections[i].ArgumentAt(
                 _unidimensionalFinder.Result).ToComponents();
         }
         RotateDirections();
         AdjustLastDirection(start);
         return(ComputePrecision(start.ToComponents()));
     }
     catch (OverflowException) { return(double.NaN); }
     catch (DhbIllegalDimension) { return(double.NaN); };
 }
Пример #2
0
 /// @return DhbOptimizing.OptimizingVector
 /// @param v DhbVector
 /// @param f IManyVariableFunction
 public OptimizingVector CreateVector(DhbVector v, IManyVariableFunction f)
 {
     return(CreateVector(v.ToComponents(), f));
 }