Hi everyone,
In the preprocessor, I have applied (in r2787) a change suggested by Pablo Winant: it consists in optimizing the way that the sparse matrices for 2nd and 3rd derivatives (g2 and g3) are constructed in dynamic (and sometimes static) model files. Thanks to Pablo for his very helpful patch.
First, note that this breaks the USE_DLL option at order 2. Since we are going to drop this option in the future, I'm not planning to fix this.
Second, a change needs to be made in the k-order library: the matrix for 2nd order derivatives of the dynamic model, as returned by the MEX file, has changed. It is now a 3 columns matrix, which contain only the non-null derivatives of the Hessian. Each line represents a non-zero element: column 1 is the row index of the non-zero element in the Hessian, column 2 is its column index, and column 3 is its value. Note that this is the format required by Matlab sparse() function.
Best,