Returns a delegate that symbolically evaluates the gradient and returns the value of a multivariate function.
Namespace:
Extreme.Mathematics
Assembly:
Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.1
public static Func<Vector<double>, Vector<double>, double> GetFunctionAndGradient(
Expression<Func<Vector<double>, double>> function
)
Public Shared Function GetFunctionAndGradient (
function As Expression(Of Func(Of Vector(Of Double), Double))
) As Func(Of Vector(Of Double), Vector(Of Double), Double)
public:
static Func<Vector<double>^, Vector<double>^, double>^ GetFunctionAndGradient(
Expression<Func<Vector<double>^, double>^>^ function
)
static member GetFunctionAndGradient :
function : Expression<Func<Vector<float>, float>> -> Func<Vector<float>, Vector<float>, float>
Parameters
- function
- Type: System.Linq.ExpressionsExpressionFuncVectorDouble, Double
A lambda expression that represents a multivariate function.
Return Value
Type:
FuncVectorDouble,
VectorDouble,
DoubleA delegate that represents a multivariate function returning a vector in its second argument.
The partial derivatives are calculated symbolically from the supplied lambda expression.
The expression must not contain loops or blocks. If functions are encountered for
which no symbolic derivative is available, a numerical approximation is used.
Reference