LinearGradient

class LinearGradient(*args)

Linear numerical math gradient implementation.

Parameters:
centerPoint

The center point.

constantMatrix

The constant term of the gradient.

linearSymmetricTensor

The linear coefficients of the gradient.

Methods

getCallsNumber()

Accessor to the number of times the gradient has been called.

getCenter()

Accessor to the center point.

getClassName()

Accessor to the object's name.

getConstant()

Accessor to the constant term.

getInputDimension()

Accessor to the number of the inputs.

getLinear()

Accessor to the linear coefficients.

getMarginal(*args)

Accessor to the gradient implementation of a specific output.

getName()

Accessor to the object's name.

getOutputDimension()

Accessor to the number of the outputs.

getParameter()

Accessor to the parameter values.

gradient(*args)

Return the Jacobian transposed matrix of the implementation at a point or sample.

hasName()

Test if the object is named.

isActualImplementation()

Accessor to the validity flag.

setName(name)

Accessor to the object's name.

setParameter(parameter)

Accessor to the parameter values.

__init__(*args)
getCallsNumber()

Accessor to the number of times the gradient has been called.

Returns:
calls_numberint

Integer that counts the number of times the gradient has been called since its creation.

getCenter()

Accessor to the center point.

Returns:
centerPoint

The center point

getClassName()

Accessor to the object’s name.

Returns:
class_namestr

The object class name (object.__class__.__name__).

getConstant()

Accessor to the constant term.

Returns:
constantMatrix

The constant term of the gradient

getInputDimension()

Accessor to the number of the inputs.

Returns:
number_inputsint

Number of inputs.

getLinear()

Accessor to the linear coefficients.

Returns:
linearSymmetricTensor

The linear coefficients of the gradient

getMarginal(*args)

Accessor to the gradient implementation of a specific output.

Parameters:
iint

Integer corresponding to the output (Care: it starts at 0).

indicessequence of integer

The set of indices for which the outputs are extracted.

Returns:
gradientImplementationGradientImplementation

A gradient implementation restricted to its components functions which indices are i or indices.

getName()

Accessor to the object’s name.

Returns:
namestr

The name of the object.

getOutputDimension()

Accessor to the number of the outputs.

Returns:
number_outputsint

Number of outputs.

getParameter()

Accessor to the parameter values.

Returns:
parameterPoint

The parameter values.

gradient(*args)

Return the Jacobian transposed matrix of the implementation at a point or sample.

Parameters:
pointsequence of float or 2-d sequence of float

Point or sample where the Jacobian transposed matrix is calculated.

Returns:
gradientMatrix or Sample

The Jacobian transposed matrix of the function at point. For a sample input, the flattened gradient matrices in column-major order.

hasName()

Test if the object is named.

Returns:
hasNamebool

True if the name is not empty.

isActualImplementation()

Accessor to the validity flag.

Returns:
is_implbool

Whether the implementation is valid.

setName(name)

Accessor to the object’s name.

Parameters:
namestr

The name of the object.

setParameter(parameter)

Accessor to the parameter values.

Parameters:
parametersequence of float

The parameter values.