autodiff:

* fix namespace issue
* simplify Jacobian code
* fix issue with "Dynamic derivatives"
This commit is contained in:
Gael Guennebaud
2009-10-15 18:43:15 +02:00
parent 0927ba1fd3
commit 1503043981
3 changed files with 110 additions and 53 deletions

View File

@@ -46,12 +46,12 @@ struct TestFunc1
typedef Matrix<Scalar,InputsAtCompileTime,1> InputType;
typedef Matrix<Scalar,ValuesAtCompileTime,1> ValueType;
typedef Matrix<Scalar,ValuesAtCompileTime,InputsAtCompileTime> JacobianType;
int m_inputs, m_values;
TestFunc1() : m_inputs(InputsAtCompileTime), m_values(ValuesAtCompileTime) {}
TestFunc1(int inputs, int values) : m_inputs(inputs), m_values(values) {}
int inputs() const { return m_inputs; }
int values() const { return m_values; }
@@ -142,7 +142,7 @@ void test_autodiff_scalar()
std::cerr << foo<AutoDiffScalar<Vector2f> >(ax,ay).value() << " <> "
<< foo<AutoDiffScalar<Vector2f> >(ax,ay).derivatives().transpose() << "\n\n";
}
void test_autodiff_jacobian()
{
for(int i = 0; i < g_repeat; i++) {