The StaticMat struct was always meant as a placeholder until a more performant alternative is available.
nalgebra provides statically allocated vectors and matrices. It is well maintained, more feature complete, and more performant.
As a consequence the derive api is not possible for vectors anymore. In this PR it is replaced with more explicit functions for, e.g., gradients, Hessians and Jacobians. Of course, it is still possible to construct dual numbers from their real and dual parts.
Some disadvantages
The dependency tree is exploding and compile times are up.
the string representation of dual numbers is a bit wonky (maybe override it by hand?).
Due to the somewhat stringent trait bounds in nalgebra, the trait bounds in num-dual also have to be tightened. This has no effect on applications of dual numbers.
Overall, this should be an advantage with regard to the maintainability, though.
The
StaticMat
struct was always meant as a placeholder until a more performant alternative is available.nalgebra provides statically allocated vectors and matrices. It is well maintained, more feature complete, and more performant.
As a consequence the
derive
api is not possible for vectors anymore. In this PR it is replaced with more explicit functions for, e.g., gradients, Hessians and Jacobians. Of course, it is still possible to construct dual numbers from their real and dual parts.Some disadvantages
Overall, this should be an advantage with regard to the maintainability, though.