Class LinearFunction<N extends Comparable<N>>
- All Implemented Interfaces:
BasicFunction, BasicFunction.PlainUnary<Access1D<N>, N>, MultiaryFunction<N>, MultiaryFunction.Linear<N>, MultiaryFunction.TwiceDifferentiable<N>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classLinearFunction.Factory<N extends Comparable<N>>Nested classes/interfaces inherited from interface BasicFunction
BasicFunction.Differentiable<N,F>, BasicFunction.Integratable<N, F>, BasicFunction.PlainUnary<T, R> Nested classes/interfaces inherited from interface MultiaryFunction
MultiaryFunction.Affine<N>, MultiaryFunction.Constant<N>, MultiaryFunction.Convex<N>, MultiaryFunction.Linear<N>, MultiaryFunction.PureQuadratic<N>, MultiaryFunction.Quadratic<N>, MultiaryFunction.TwiceDifferentiable<N> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintarity()(package private) PhysicalStore.Factory<N, ?> factory()static <N extends Comparable<N>>
LinearFunction.Factory<N> factory(PhysicalStore.Factory<N, ?> factory) getGradient(Access1D<N> point) The gradient of a scalar field is a vector field that points in the direction of the greatest rate of increase of the scalar field, and whose magnitude is that rate of increase.getHessian(Access1D<N> point) The Hessian matrix or Hessian is a square matrix of second-order partial derivatives of a function.getLinearFactors(boolean negated) linear()static <N extends Comparable<N>>
LinearFunction<N> wrap(PhysicalStore<N> coefficients) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface MultiaryFunction
andThenMethods inherited from interface MultiaryFunction.TwiceDifferentiable
toFirstOrderApproximation, toSecondOrderApproximation
-
Field Details
-
myCoefficients
-
-
Constructor Details
-
LinearFunction
LinearFunction(MatrixStore<N> coefficients)
-
-
Method Details
-
factory
public static <N extends Comparable<N>> LinearFunction.Factory<N> factory(PhysicalStore.Factory<N, ?> factory) -
wrap
-
arity
public int arity()- Specified by:
arityin interfaceMultiaryFunction<N extends Comparable<N>>
-
getGradient
Description copied from interface:MultiaryFunction.TwiceDifferentiableThe gradient of a scalar field is a vector field that points in the direction of the greatest rate of increase of the scalar field, and whose magnitude is that rate of increase.
The Jacobian is a generalization of the gradient. Gradients are only defined on scalar-valued functions, but Jacobians are defined on vector- valued functions. When f is real-valued (i.e., f : Rn → R) the derivative Df(x) is a 1 × n matrix, i.e., it is a row vector. Its transpose is called the gradient of the function: ∇f(x) = Df(x)T , which is a (column) vector, i.e., in Rn. Its components are the partial derivatives of f:
The first-order approximation of f at a point x ∈ int dom f can be expressed as (the affine function of z) f(z) = f(x) + ∇f(x)T (z − x).
- Specified by:
getGradientin interfaceMultiaryFunction.TwiceDifferentiable<N extends Comparable<N>>
-
getHessian
Description copied from interface:MultiaryFunction.TwiceDifferentiableThe Hessian matrix or Hessian is a square matrix of second-order partial derivatives of a function. It describes the local curvature of a function of many variables. The Hessian is the Jacobian of the gradient.
The second-order approximation of f, at or near x, is the quadratic function of z defined by f(z) = f(x) + ∇f(x)T (z − x) + (1/2)(z − x)T ∇2f(x)(z − x)
- Specified by:
getHessianin interfaceMultiaryFunction.TwiceDifferentiable<N extends Comparable<N>>
-
getLinearFactors
- Specified by:
getLinearFactorsin interfaceMultiaryFunction.TwiceDifferentiable<N extends Comparable<N>>- Returns:
- The gradient at origin (0-vector), negated or not
-
invoke
- Specified by:
invokein interfaceBasicFunction.PlainUnary<Access1D<N extends Comparable<N>>, N extends Comparable<N>>- Specified by:
invokein interfaceMultiaryFunction<N extends Comparable<N>>
-
linear
- Specified by:
linearin interfaceMultiaryFunction.Linear<N extends Comparable<N>>
-
factory
PhysicalStore.Factory<N,?> factory()
-