Overloads for STL mathematical operations on AutoDiffScalar.
Used via argument-dependent lookup (ADL). These functions appear in the Eigen namespace so that ADL can automatically choose between the STL version and the overloaded version to match the type of the arguments. The proper use would be e.g.
{}
#include <cmath>
#include <limits>
#include "drake/common/cond.h"
#include "drake/common/drake_assert.h"
#include "drake/common/dummy_value.h"
Namespaces | |
drake | |
Functions | |
template<typename DerType > | |
double | ExtractDoubleOrThrow (const Eigen::AutoDiffScalar< DerType > &scalar) |
Returns the autodiff scalar's value() as a double. More... | |
template<typename DerType , int RowsAtCompileTime, int ColsAtCompileTime, int Options, int MaxRowsAtCompileTime, int MaxColsAtCompileTime> | |
auto | ExtractDoubleOrThrow (const Eigen::MatrixBase< Eigen::Matrix< Eigen::AutoDiffScalar< DerType >, RowsAtCompileTime, ColsAtCompileTime, Options, MaxRowsAtCompileTime, MaxColsAtCompileTime >> &matrix) |
Returns matrix as an Eigen::Matrix<double, ...> with the same size allocation as matrix . More... | |
template<typename DerType1 , typename DerType2 > | |
Eigen::AutoDiffScalar< typename Eigen::internal::remove_all< DerType1 >::type::PlainObject > | if_then_else (bool f_cond, const Eigen::AutoDiffScalar< DerType1 > &x, const Eigen::AutoDiffScalar< DerType2 > &y) |
Provides if-then-else expression for Eigen::AutoDiffScalar type. More... | |
template<typename DerType , typename... Rest> | |
Eigen::AutoDiffScalar< typename Eigen::internal::remove_all< DerType >::type::PlainObject > | cond (bool f_cond, const Eigen::AutoDiffScalar< DerType > &e_then, Rest... rest) |
Provides special case of cond expression for Eigen::AutoDiffScalar type. More... | |