Skip to content

Commit

Permalink
cleanup: use typename T in polynomial classes (RobotLocomotion#12948)
Browse files Browse the repository at this point in the history
instead of CoefficientType and a multitude of typedefs; now closer to comforming to drake standard notation.
  • Loading branch information
RussTedrake authored Mar 26, 2020
1 parent 6ad0e15 commit 139f56c
Show file tree
Hide file tree
Showing 12 changed files with 379 additions and 407 deletions.
6 changes: 3 additions & 3 deletions bindings/pydrake/polynomial_py.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ namespace pydrake {

PYBIND11_MODULE(polynomial, m) {
{
using CoefficientType = double;
using Class = Polynomial<CoefficientType>;
using T = double;
using Class = Polynomial<T>;
constexpr auto& cls_doc = pydrake_doc.Polynomial;
py::class_<Class>(m, "Polynomial", cls_doc.doc)
.def(py::init<>(), cls_doc.ctor.doc_0args)
.def(py::init<const CoefficientType&>(), cls_doc.ctor.doc_1args_scalar)
.def(py::init<const T&>(), cls_doc.ctor.doc_1args_scalar)
.def(py::init<const Eigen::Ref<const Eigen::VectorXd>&>(),
cls_doc.ctor.doc_1args_constEigenMatrixBase)
.def("GetNumberOfCoefficients", &Class::GetNumberOfCoefficients,
Expand Down
Loading

0 comments on commit 139f56c

Please sign in to comment.