com.numericalmethod.suanshu.analysis.differentiation.multivariate
Class Gradient
java.lang.Object
com.numericalmethod.suanshu.matrix.doubles.matrixtype.MatrixMathImpl<T>
com.numericalmethod.suanshu.matrix.doubles.matrixtype.MatrixStorageImpl<DenseMatrix>
com.numericalmethod.suanshu.matrix.doubles.matrixtype.dense.DenseMatrix
com.numericalmethod.suanshu.analysis.differentiation.multivariate.Gradient
- All Implemented Interfaces:
- DeepCopyable, AbelianGroup<Matrix>, Monoid<Matrix>, Ring<Matrix>, Matrix, MatrixAccessor, MatrixRing, Densifiable, MatrixDimension
public class Gradient
- extends DenseMatrix
The gradient of a scalar field is a vector field which
points in the direction of the greatest rate of increase of the scalar field,
and of which the magnitude is the greatest rate of change.
Mathematically, the gradient of a scalar function is a 1xn matrix,
where n is the domain dimension of f.
∂f ∂f
gf = [----, ..., ----]
∂x1 ∂x2
The gradient matrix is computed numerically using the finite difference method.
- See Also:
FiniteDifference,
Wikipedia: Gradient
|
Constructor Summary |
Gradient(RealScalarFunction f,
double... x)
Construct a gradient row matrix for a multivariate function f at point x. |
| Methods inherited from class com.numericalmethod.suanshu.matrix.doubles.matrixtype.dense.DenseMatrix |
add, deepCopy, getColumn, getColumn, getMatrixData, getRow, getRow, getSample, minus, multiply, multiply, ONE, overwrite, scaled, t, toDense, ZERO |
| Methods inherited from class com.numericalmethod.suanshu.matrix.doubles.matrixtype.MatrixMathImpl |
add, call, minus, multiply, nCols, nRows, opposite, setColumn, setColumn, setRow, setRow, toString |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Gradient
public Gradient(RealScalarFunction f,
double... x)
- Construct a gradient row matrix for a multivariate function
f at point x.
- Parameters:
f - a multivariate functionx - the point to evaluate the gradient of f at
Copyright © 2011 Numerical Method Inc. Ltd. All Rights Reserved.