MCPcopy Create free account
hub / github.com/PX4/eigen / Functor

Class Functor

unsupported/test/NumericalDiff.cpp:13–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11// Generic functor
12template<typename _Scalar, int NX=Dynamic, int NY=Dynamic>
13struct Functor
14{
15 typedef _Scalar Scalar;
16 enum {
17 InputsAtCompileTime = NX,
18 ValuesAtCompileTime = NY
19 };
20 typedef Matrix<Scalar,InputsAtCompileTime,1> InputType;
21 typedef Matrix<Scalar,ValuesAtCompileTime,1> ValueType;
22 typedef Matrix<Scalar,ValuesAtCompileTime,InputsAtCompileTime> JacobianType;
23
24 int m_inputs, m_values;
25
26 Functor() : m_inputs(InputsAtCompileTime), m_values(ValuesAtCompileTime) {}
27 Functor(int inputs, int values) : m_inputs(inputs), m_values(values) {}
28
29 int inputs() const { return m_inputs; }
30 int values() const { return m_values; }
31
32};
33
34struct my_functor : Functor<double>
35{

Callers 1

fdjac1Function · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected