One Dimensional Optimizer.Find Maximum Method
Definition
Namespace: Numerics.NET.Optimization
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
Overload List
Find | Computes a maximum of the specified function. |
Find | Computes a maximum of the specified function. |
FindMaximum(Func<Double, Double>, Double)
Computes a maximum of the specified function.
public double FindMaximum(
Func<double, double> objectiveFunction,
double initialGuess
)
Parameters
- objectiveFunction Func<Double, Double>
- A delegate that represents a function of one variable that specifies the objective function.
- initialGuess Double
- An initial guess for the maximum.
Return Value
DoubleA local maximum of objectiveFunction.
Exceptions
Convergence | The algorithm failed to converge and ThrowExceptionOnFailure is set to true. |
FindMaximum(Func<Double, Double>, Double, Double)
Computes a maximum of the specified function.
public double FindMaximum(
Func<double, double> objectiveFunction,
double lowerBound,
double upperBound
)
Parameters
- objectiveFunction Func<Double, Double>
- A delegate that represents a function of one variable that specifies the objective function.
- lowerBound Double
- The lower bound of the interval where a maximum is to be located.
- upperBound Double
- The upper bound of the interval where a maximum is to be located.
Return Value
DoubleA local maximum of objectiveFunction.
Exceptions
Convergence | The algorithm failed to converge and ThrowExceptionOnFailure is set to true. |