Sleipnir Python API
Loading...
Searching...
No Matches
sleipnir.autodiff.Jacobian Class Reference

Public Member Functions

None __init__ (self, Real|float expression, Real|float wrt)
 
None __init__ (self, Real|float expression, Matrix|Submatrix wrt)
 
None __init__ (self, Matrix|Submatrix expressions, Matrix|Submatrix wrt)
 
Matrix get (self)
 
scipy.sparse.csc_matrix[numpy.float64] value (self)
 

Detailed Description

This class calculates the Jacobian of a vector of expressions with
respect to a vector of variables.

The Jacobian is only recomputed if the expression is quadratic or
higher order, or if it's linear with coefficients that depend on
parameters.

Template Args:
    Scalar: Scalar type.

Constructor & Destructor Documentation

◆ __init__() [1/3]

None sleipnir.autodiff.Jacobian.__init__ (   self,
Real | float  expression,
Real | float  wrt 
)

◆ __init__() [2/3]

None sleipnir.autodiff.Jacobian.__init__ (   self,
Real | float  expression,
Matrix | Submatrix  wrt 
)

◆ __init__() [3/3]

None sleipnir.autodiff.Jacobian.__init__ (   self,
Matrix | Submatrix  expressions,
Matrix | Submatrix  wrt 
)
Constructs a Jacobian object.

Args:
    expression: Expression of which to compute the Jacobian.
    wrt: Variable with respect to which to compute the Jacobian.

Member Function Documentation

◆ get()

Matrix sleipnir.autodiff.Jacobian.get (   self)
Returns the Jacobian as a Matrix.

This is useful when constructing optimization problems with
derivatives in them.

Returns:
    The Jacobian as a Matrix.

◆ value()

scipy.sparse.csc_matrix[numpy.float64] sleipnir.autodiff.Jacobian.value (   self)
Evaluates the Jacobian at wrt's value.

Returns:
    The Jacobian at wrt's value.

The documentation for this class was generated from the following file: