Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of boost. Click here for the latest Boost documentation.

QVM: Quaternions, Vectors, Matrices

boost/qvm/mat_traits.hpp

This header defines the mat_traits template which can be specialized to register user-defined matrix types into Boost QVM.

Synopsis:

#include <boost/qvm/mat_traits.hpp>

namespace boost
{
    namespace qvm
    {
        template <class T>
        struct is_mat
        {
            static bool const value=/*unspecified*/;
        };        
        
        template <class M>
        struct mat_traits
        {
            /*main template members unspecified*/
        };
        
        /*
        User-defined (possibly partial) specializations:
        
        template <>
        struct mat_traits<M>
        {
            static int const rows = /*user-defined*/;        
            static int const cols = /*user-defined*/;        
            typedef /*user-defined*/ scalar_type;        
        
            template <int R,int C> static inline scalar_type read_element( Matrix const & m );        
            template <int R,int C> static inline scalar_type & write_element( Matrix & m );        
        
            static inline scalar_type read_element_idx( int r, int c, Matrix const & m );        
            static inline scalar_type & write_element_idx( int r, int c, Matrix & m );        
        };
        */
    }
}

See also: is_mat | mat_traits