Calculates the gradient of this functional using a central difference methods.
Deriving classes may override this method.
Namespace:
CenterSpace.NMath.CoreAssembly: NMath (in NMath.dll) Version: 5.1.0.0
Syntax
| C# |
|---|
public virtual void Gradient( DoubleVector x, DoubleVector grad ) |
| Visual Basic (Declaration) |
|---|
Public Overridable Sub Gradient ( _ x As DoubleVector, _ grad As DoubleVector _ ) |
| Visual C++ |
|---|
public: virtual void Gradient( DoubleVector^ x, DoubleVector^ grad ) |
Parameters
- x
- Type: CenterSpace.NMath.Core..::.DoubleVector
The point at which to evaluate the gradient.
- grad
- Type: CenterSpace.NMath.Core..::.DoubleVector
The vector into which to place the gradient.
Exceptions
| Exception | Condition |
|---|---|
| CenterSpace.NMath.Core..::.InvalidArgumentException | Thrown if the gradient or x vector does not have length equal to the dimension of the domain of the functional. |