Drake
drakeGradientUtil.h File Reference

THIS FILE IS DEPRECATED. More...

#include <array>
#include <cmath>
#include <stdexcept>
#include <vector>
#include <Eigen/Core>
#include <Eigen/Dense>
#include <unsupported/Eigen/AutoDiff>
#include "drake/math/gradient.h"
#include "drake/common/drake_assert.h"
Include dependency graph for drakeGradientUtil.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  MatGradMultMat< DerivedA, DerivedB, DerivedDA >
 
struct  MatGradMult< DerivedDA, DerivedB >
 
struct  GetSubMatrixGradientArray< QSubvectorSize, Derived, NRows, NCols >
 
struct  GetSubMatrixGradientSingleElement< QSubvectorSize, Derived >
 
struct  ResizeDerivativesToMatchScalarImpl< Derived, Scalar >
 
struct  ResizeDerivativesToMatchScalarImpl< Derived, Eigen::AutoDiffScalar< DerivType > >
 

Namespaces

 Drake
 NOTE: The contents of this class are for the most part direct ports of drake/systems/plants//inverseKinBackend.m from Matlab to C++; many methods and variables follow Matlab conventions and are documented in that file.
 
 Drake::internal
 

Functions

template<std::size_t Size>
std::array< int, Size > intRange (int start)
 
template<typename Derived >
Derived::PlainObject transposeGrad (const Eigen::MatrixBase< Derived > &dX, typename Derived::Index rows_X)
 
template<typename DerivedA , typename DerivedB , typename DerivedDA , typename DerivedDB >
MatGradMultMat< DerivedA, DerivedB, DerivedDA >::type matGradMultMat (const Eigen::MatrixBase< DerivedA > &A, const Eigen::MatrixBase< DerivedB > &B, const Eigen::MatrixBase< DerivedDA > &dA, const Eigen::MatrixBase< DerivedDB > &dB)
 
template<typename DerivedDA , typename DerivedB >
MatGradMult< DerivedDA, DerivedB >::type matGradMult (const Eigen::MatrixBase< DerivedDA > &dA, const Eigen::MatrixBase< DerivedB > &B)
 
template<typename Derived >
Eigen::Matrix< typename Derived::Scalar, Eigen::Dynamic, Eigen::Dynamic > getSubMatrixGradient (const Eigen::MatrixBase< Derived > &dM, const std::vector< int > &rows, const std::vector< int > &cols, typename Derived::Index M_rows, int q_start=0, typename Derived::Index q_subvector_size=-1)
 
template<int QSubvectorSize, typename Derived , std::size_t NRows, std::size_t NCols>
GetSubMatrixGradientArray< QSubvectorSize, Derived, NRows, NCols >::type getSubMatrixGradient (const Eigen::MatrixBase< Derived > &dM, const std::array< int, NRows > &rows, const std::array< int, NCols > &cols, typename Derived::Index M_rows, int q_start=0, typename Derived::Index q_subvector_size=QSubvectorSize)
 
template<int QSubvectorSize, typename Derived >
GetSubMatrixGradientSingleElement< QSubvectorSize, Derived >::type getSubMatrixGradient (const Eigen::MatrixBase< Derived > &dM, int row, int col, typename Derived::Index M_rows, typename Derived::Index q_start=0, typename Derived::Index q_subvector_size=QSubvectorSize)
 
template<typename DerivedA , typename DerivedB >
void setSubMatrixGradient (Eigen::MatrixBase< DerivedA > &dM, const Eigen::MatrixBase< DerivedB > &dM_submatrix, const std::vector< int > &rows, const std::vector< int > &cols, typename DerivedA::Index M_rows, typename DerivedA::Index q_start=0, typename DerivedA::Index q_subvector_size=-1)
 
template<int QSubvectorSize, typename DerivedA , typename DerivedB , std::size_t NRows, std::size_t NCols>
void setSubMatrixGradient (Eigen::MatrixBase< DerivedA > &dM, const Eigen::MatrixBase< DerivedB > &dM_submatrix, const std::array< int, NRows > &rows, const std::array< int, NCols > &cols, typename DerivedA::Index M_rows, typename DerivedA::Index q_start=0, typename DerivedA::Index q_subvector_size=QSubvectorSize)
 
template<int QSubvectorSize, typename DerivedDM , typename DerivedDMSub >
void setSubMatrixGradient (Eigen::MatrixBase< DerivedDM > &dM, const Eigen::MatrixBase< DerivedDMSub > &dM_submatrix, int row, int col, typename DerivedDM::Index M_rows, typename DerivedDM::Index q_start=0, typename DerivedDM::Index q_subvector_size=QSubvectorSize)
 
template<typename DerivedGradient , typename DerivedAutoDiff >
void gradientMatrixToAutoDiff (const Eigen::MatrixBase< DerivedGradient > &gradient, Eigen::MatrixBase< DerivedAutoDiff > &auto_diff_matrix)
 
template<typename Derived >
void resizeDerivativesToMatchScalar (Eigen::MatrixBase< Derived > &mat, const typename Derived::Scalar &scalar)
 Resize derivatives vector of each element of a matrix to to match the size of the derivatives vector of a given scalar. More...
 

Detailed Description

THIS FILE IS DEPRECATED.

Its contents are moving into drake/math.

Function Documentation

Eigen::Matrix<typename Derived::Scalar, Eigen::Dynamic, Eigen::Dynamic> getSubMatrixGradient ( const Eigen::MatrixBase< Derived > &  dM,
const std::vector< int > &  rows,
const std::vector< int > &  cols,
typename Derived::Index  M_rows,
int  q_start = 0,
typename Derived::Index  q_subvector_size = -1 
)
GetSubMatrixGradientArray<QSubvectorSize, Derived, NRows, NCols>::type getSubMatrixGradient ( const Eigen::MatrixBase< Derived > &  dM,
const std::array< int, NRows > &  rows,
const std::array< int, NCols > &  cols,
typename Derived::Index  M_rows,
int  q_start = 0,
typename Derived::Index  q_subvector_size = QSubvectorSize 
)
GetSubMatrixGradientSingleElement<QSubvectorSize, Derived>::type getSubMatrixGradient ( const Eigen::MatrixBase< Derived > &  dM,
int  row,
int  col,
typename Derived::Index  M_rows,
typename Derived::Index  q_start = 0,
typename Derived::Index  q_subvector_size = QSubvectorSize 
)
void gradientMatrixToAutoDiff ( const Eigen::MatrixBase< DerivedGradient > &  gradient,
Eigen::MatrixBase< DerivedAutoDiff > &  auto_diff_matrix 
)

Here is the caller graph for this function:

std::array<int, Size> intRange ( int  start)
MatGradMult<DerivedDA, DerivedB>::type matGradMult ( const Eigen::MatrixBase< DerivedDA > &  dA,
const Eigen::MatrixBase< DerivedB > &  B 
)

Here is the caller graph for this function:

MatGradMultMat<DerivedA, DerivedB, DerivedDA>::type matGradMultMat ( const Eigen::MatrixBase< DerivedA > &  A,
const Eigen::MatrixBase< DerivedB > &  B,
const Eigen::MatrixBase< DerivedDA > &  dA,
const Eigen::MatrixBase< DerivedDB > &  dB 
)

Here is the caller graph for this function:

void setSubMatrixGradient ( Eigen::MatrixBase< DerivedA > &  dM,
const Eigen::MatrixBase< DerivedB > &  dM_submatrix,
const std::vector< int > &  rows,
const std::vector< int > &  cols,
typename DerivedA::Index  M_rows,
typename DerivedA::Index  q_start = 0,
typename DerivedA::Index  q_subvector_size = -1 
)
void setSubMatrixGradient ( Eigen::MatrixBase< DerivedA > &  dM,
const Eigen::MatrixBase< DerivedB > &  dM_submatrix,
const std::array< int, NRows > &  rows,
const std::array< int, NCols > &  cols,
typename DerivedA::Index  M_rows,
typename DerivedA::Index  q_start = 0,
typename DerivedA::Index  q_subvector_size = QSubvectorSize 
)
void setSubMatrixGradient ( Eigen::MatrixBase< DerivedDM > &  dM,
const Eigen::MatrixBase< DerivedDMSub > &  dM_submatrix,
int  row,
int  col,
typename DerivedDM::Index  M_rows,
typename DerivedDM::Index  q_start = 0,
typename DerivedDM::Index  q_subvector_size = QSubvectorSize 
)
Derived::PlainObject transposeGrad ( const Eigen::MatrixBase< Derived > &  dX,
typename Derived::Index  rows_X 
)

Here is the caller graph for this function: