42template <base::concepts::real_scalar Scalar>
53template <base::concepts::real_scalar_dense_vector ValueVector>
55 Eigen::Matrix<variable<typename ValueVector::Scalar>,
56 ValueVector::RowsAtCompileTime, 1, Eigen::ColMajor,
57 ValueVector::MaxRowsAtCompileTime, 1>;
68template <
typename ValueVector>
79 Eigen::Matrix<
variable_type, ValueVector::RowsAtCompileTime, 1,
80 Eigen::ColMajor, ValueVector::MaxRowsAtCompileTime, 1>;
117template <base::concepts::real_scalar_dense_vector ValueVector>
119 const Eigen::MatrixBase<ValueVector>& value_vec)
120 -> Eigen::CwiseNullaryOp<
123 ValueVector>::result_type> {
125 "create_diff_variable_vector function requires a vector as the "
129 ValueVector>::result_type;
130 return result_type::NullaryExpr(value_vec.rows(), 1,
132 value_vec.derived()));
Definition of assertion macros.
#define NUM_COLLECT_DEBUG_ASSERT(CONDITION)
Macro to check whether a condition is satisfied in debug build only.
Definition of node class.
Class of functor to create a vector of variables by which functions will be differentiated.
auto operator()(index_type row, index_type col) const -> variable_type
Get an element of the vector.
variable< scalar_type > variable_type
Type of variables.
typename ValueVector::Scalar scalar_type
Type of scalars.
const ValueVector & value_vec_
Values of the vector.
create_diff_variable_vector_functor(const ValueVector &value_vec)
Constructor.
Eigen::Matrix< variable_type, ValueVector::RowsAtCompileTime, 1, Eigen::ColMajor, ValueVector::MaxRowsAtCompileTime, 1 > result_type
Type of resulting differential coefficients.
Class of variables in backward-mode automatic differentiation kubota1998.
Definition of exceptions.
Definition of index_type type.
Definition of macros for logging.
Namespace of backward-mode automatic differentiation.
auto create_diff_variable(const Scalar &value) -> variable< Scalar >
Create a variable by which functions will be differentiated.
auto create_diff_variable_vector(const Eigen::MatrixBase< ValueVector > &value_vec) -> Eigen::CwiseNullaryOp< impl::create_diff_variable_vector_functor< ValueVector >, typename impl::create_diff_variable_vector_functor< ValueVector >::result_type >
Create a vector of variables.
Eigen::Matrix< variable< typename ValueVector::Scalar >, ValueVector::RowsAtCompileTime, 1, Eigen::ColMajor, ValueVector::MaxRowsAtCompileTime, 1 > variable_vector_type
Get type of vectors of variables.
std::ptrdiff_t index_type
Type of indices in this library.
Definition of NUM_COLLECT_PRECONDITION macro.
#define NUM_COLLECT_PRECONDITION(CONDITION,...)
Check whether a precondition is satisfied and throw an exception if not.
Definition of real_scalar concept.
Definition of real_scalar_dense_vector concept.
Tag class to specify variables.