46template <base::concepts::real_scalar Value>
75template <base::concepts::real_scalar_dense_vector ValueVector>
77 Eigen::Matrix<variable<typename ValueVector::Scalar, ValueVector>,
78 ValueVector::RowsAtCompileTime, 1, Eigen::ColMajor,
79 ValueVector::MaxRowsAtCompileTime, 1>;
90template <base::concepts::real_scalar_dense_vector ValueVector>
97 using diff_type =
typename ValueVector::PlainMatrix;
104 Eigen::Matrix<
variable_type, ValueVector::RowsAtCompileTime, 1,
105 Eigen::ColMajor, ValueVector::MaxRowsAtCompileTime, 1>;
143template <base::concepts::real_scalar_dense_vector ValueVector>
145 const Eigen::MatrixBase<ValueVector>& value_vec)
146 -> Eigen::CwiseNullaryOp<
149 ValueVector>::result_type> {
151 "create_diff_variable_vector function requires a vector as the "
155 ValueVector>::result_type;
156 return result_type::NullaryExpr(value_vec.rows(), 1,
158 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.
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.
create_diff_variable_vector_functor(const ValueVector &value_vec)
Constructor.
typename ValueVector::Scalar value_type
Type of values.
typename ValueVector::PlainMatrix diff_type
Type of differential coefficients.
Eigen::Matrix< variable_type, ValueVector::RowsAtCompileTime, 1, Eigen::ColMajor, ValueVector::MaxRowsAtCompileTime, 1 > result_type
Type of resulting differential coefficients.
variable< value_type, diff_type > variable_type
Type of variables.
const ValueVector & value_vec_
Values of the vector.
Class of variables in forward-mode automatic differentiation kubota1998.
Concept of Eigen's dense vectors with real scalars.
Definition of exceptions.
Definition of variable class.
Definition of index_type type.
Definition of macros for logging.
Namespace of forward-mode automatic differentiation.
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.
auto create_diff_variable(const Value &value) -> variable< Value >
Create a variable by which functions will be differentiated (for scalar differential coefficients).
Eigen::Matrix< variable< typename ValueVector::Scalar, ValueVector >, 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.