C++ boost ublas + units dimension constraints -


I am seeking advice on design / general thinking that the compulsions of matrix dimension on matrix matrix / vector how possibly the use of Boost units Can do

For example, in the Matrix A, the time x is the dimension of the force (for example)

dimension does not have x, time x force and compulsive time x is not . Matrix & lt; Double & gt; a; //Something like this? Dimensions & lt; Time, force, matrix & lt; Double & gt; & Gt; a; Dimensions & lt; Force, time, matrix & lt; Double & gt; & Gt; B = Trans (A); // Perhaps the custom layout, though to make sure the dimension becomes difficult between the matrix? Matrix & lt; Double, dimension & lt; Time, force & gt; & Gt; a;

Have you done something like this or do you have some good ideas about organizing such obstacles?

I have gone through the ublas archives, there are some discussions, but some are not concrete.

Thanks

Check out this good boost tutorial which is using template-metaprogramming Introducing the dimensional analysis capability:

For this, you will need to create a complete set of template specialists for every dimension in your app, but the result is worth it - it gives you mistakes Will not allow to create or add ambiguity in dimensions.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -