PrimitivesTrait and implementers
- macro for generation of fixed size implementers
To allow the use of custom numerical types, we should define a Primitives trait that specify as associated types all the numerical values used for double precision, vectors and matrices.
Such primitives should require trait bounds from num-traits or other widely adopted numerical interface in rust.
The Primitives trait should be implemented by unit structs acting as a sort of phantomdata so that, passed as turbofish in all the solvers, they would tell which primitives to use . A DefaultMath struct should implement f64 and standard linear algebra types: this struct should be the default il all the solvers, so that the average user doesn't have to specify the turbofish all the time.
One could use a macro for creating several combinations of implementers using different kind of lengths, to optimize performance
PrimitivesTraitand implementersTo allow the use of custom numerical types, we should define a
Primitivestrait that specify as associated types all the numerical values used for double precision, vectors and matrices.Such primitives should require trait bounds from
num-traitsor other widely adopted numerical interface in rust.The
Primitivestrait should be implemented by unit structs acting as a sort of phantomdata so that, passed as turbofish in all the solvers, they would tell which primitives to use . ADefaultMathstruct should implementf64and standard linear algebra types: this struct should be the default il all the solvers, so that the average user doesn't have to specify the turbofish all the time.One could use a macro for creating several combinations of implementers using different kind of lengths, to optimize performance