|
| template<typename F, typename T> |
| constexpr int | detect_arity () |
| | Detect the arity of a callable when invoked with arguments of type T.
|
| template<typename Func, typename Scalar> |
| constexpr int | arity_of () |
| | Get the detected arity of a callable for a given scalar type.
|
| template<typename Func, typename Scalar> |
| auto | invoke (Func &&f, const std::vector< Scalar > &args) |
| | Invoke a callable with N arguments unpacked from a vector.
|
| template<typename T> |
| Eigen::VectorXd | to_numeric_vector (const T &val) |
| | Normalize a scalar or vector return to Eigen::VectorXd.
|
| template<typename T> |
| std::vector< SymbolicArg > | to_symbolic_output_args (const T &val) |
| | Normalize a symbolic scalar or vector return to a vector of SymbolicArg.
|
| std::string | format_point (const std::vector< double > &point) |
| | Format a test point as a string for diagnostics.
|
| std::string | format_matrix (const Eigen::MatrixXd &m) |
| | Format an Eigen matrix as a string for diagnostics.
|
template<typename F, typename T>
| int metis::diff_test::detail::detect_arity |
( |
| ) |
|
|
constexpr |
Detect the arity of a callable when invoked with arguments of type T.
Checks from 1 to 8 arguments and returns the first arity that compiles. For generic lambdas like [](auto x, auto y) { ... }, std::is_invocable_v correctly returns false for wrong arities.