Drake
eigen_autodiff_types.h
Go to the documentation of this file.
1 #pragma once
2 
7 
8 #include <type_traits>
9 
10 #include <Eigen/Dense>
11 
15 
16 namespace drake {
17 
19 using AutoDiffUpTo73d = Eigen::AutoDiffScalar<VectorUpTo73d>;
20 
22 using AutoDiffXd = Eigen::AutoDiffScalar<Eigen::VectorXd>;
23 
24 // TODO(hongkai-dai): Recursive template to get arbitrary gradient order.
25 
27 template <int num_vars>
28 using AutoDiffd = Eigen::AutoDiffScalar<Eigen::Matrix<double, num_vars, 1> >;
29 
31 template <int num_vars, int rows>
32 using AutoDiffVecd = Eigen::Matrix<AutoDiffd<num_vars>, rows, 1>;
33 
37 
38 } // namespace drake
Eigen::AutoDiffScalar< Eigen::VectorXd > AutoDiffXd
An autodiff variable with a dynamic number of partials.
Definition: eigen_autodiff_types.h:22
Eigen::AutoDiffScalar< Eigen::Matrix< double, num_vars, 1 > > AutoDiffd
An autodiff variable with num_vars partials.
Definition: eigen_autodiff_types.h:28
This file contains abbreviated definitions for certain specializations of Eigen::Matrix that are comm...
Eigen::AutoDiffScalar< VectorUpTo73d > AutoDiffUpTo73d
An autodiff variable with a dynamic number of partials, up to 73 maximum.
Definition: eigen_autodiff_types.h:19
Definition: automotive_demo.cc:88
Overloads for STL mathematical operations on AutoDiffScalar.
AutoDiffVecd< Eigen::Dynamic, Eigen::Dynamic > AutoDiffVecXd
A dynamic-sized vector of autodiff variables, each with a dynamic-sized vector of partials...
Definition: eigen_autodiff_types.h:36
Eigen::Matrix< AutoDiffd< num_vars >, rows, 1 > AutoDiffVecd
A vector of rows autodiff variables, each with num_vars partials.
Definition: eigen_autodiff_types.h:32