Boost logo

Ublas :

Subject: [ublas] Numeric traits for ublas bounded_vector and matrix
From: Jesse Perla (jesseperla_at_[hidden])
Date: 2010-02-18 22:10:54


I have started to use the numeric traits for some of my
own meta-programming and ended up with the need for detection of the
value_type for bounded_matrix and bounded_vector. Here are modified traits
files for consideration:

Also, I ended up needing meta-functions to get the static sizes for
bounded_matrices and vectors, but I am not happy with my solution. Should
these be added to the numeric traits?

Maybe add a tag to the property_map? Something like tag::static_vector_size
which is a boost::mpl::size_t ? And if the vector is dynamic, the value
would be -1 or NaN or something that could be tested at compile time? My
guess is that there are a lot of optimizations people would want to do given
statically sized numeric types.

-Jesse