TVM  0.9.4
checkFunction.h
Go to the documentation of this file.
1 
3 #pragma once
4 
5 #include <tvm/api.h>
6 #include <tvm/defs.h>
7 
8 #include <optional>
9 #include <vector>
10 
11 namespace tvm
12 {
13 
14 namespace utils
15 {
16 
32 {
33 public:
48  {
49  std::optional<Eigen::VectorXd> value = std::nullopt;
50  std::optional<Eigen::VectorXd> velocity = std::nullopt;
51  std::optional<Eigen::VectorXd> acceleration = std::nullopt;
52  size_t samples = 1;
53  };
54 
55  CheckOptions() : step(1e-7), prec(1e-6), verbose(true) {}
56  CheckOptions(double s, double p, bool v) : step(s), prec(p), verbose(v) {}
57  double step;
58  double prec;
59  bool verbose;
60  size_t samples = 0;
61  std::vector<CheckConfiguration> configs = {};
62 };
63 
68 
72 bool TVM_DLLAPI checkVelocity(FunctionPtr f, CheckOptions opt = CheckOptions());
73 
80 bool TVM_DLLAPI checkNormalAcceleration(FunctionPtr f, CheckOptions opt = CheckOptions());
81 
85 bool TVM_DLLAPI checkFunction(FunctionPtr f, CheckOptions opt = CheckOptions());
87 } // namespace utils
88 
89 } // namespace tvm
#define TVM_DLLAPI
Definition: api.h:35
Definition: checkFunction.h:32
CheckOptions(double s, double p, bool v)
Definition: checkFunction.h:56
size_t samples
Definition: checkFunction.h:52
std::vector< CheckConfiguration > configs
Definition: checkFunction.h:61
double step
Definition: checkFunction.h:57
std::optional< Eigen::VectorXd > velocity
Definition: checkFunction.h:50
bool TVM_DLLAPI checkJacobian(FunctionPtr f, CheckOptions opt=CheckOptions())
CheckOptions()
Definition: checkFunction.h:55
size_t samples
Definition: checkFunction.h:60
std::optional< Eigen::VectorXd > value
Definition: checkFunction.h:49
std::optional< Eigen::VectorXd > acceleration
Definition: checkFunction.h:51
double prec
Definition: checkFunction.h:58
bool verbose
Definition: checkFunction.h:59
Definition: Clock.h:12
std::shared_ptr< function::abstract::Function > FunctionPtr
Definition: defs.h:57
Definition: checkFunction.h:48