static BOOST_QVM_INLINE_CRITICAL scalar_type & iw( int i, this_vector & x ) { BOOST_QVM_ASSERT(i>=0); BOOST_QVM_ASSERT(i<dim); return x.a[i]; }
static inline scalar_type ir( int i, my_stuff::vec const & m ) { BOOST_QVM_ASSERT(i>=0); BOOST_QVM_ASSERT(i<dim); return m.a[i]; }
static BOOST_QVM_INLINE_CRITICAL scalar_type & write_element_idx( int i, this_quaternion & x ) { BOOST_QVM_ASSERT(i>=0); BOOST_QVM_ASSERT(i<4); return x[i]; }
static inline scalar_type ir( int r, int c, my_stuff::mat const & m ) { BOOST_QVM_ASSERT(r>=0); BOOST_QVM_ASSERT(r<rows); BOOST_QVM_ASSERT(c>=0); BOOST_QVM_ASSERT(c<cols); return m.a[r][c]; }
static BOOST_QVM_INLINE_CRITICAL scalar_type & write_element_idx( int row, int col, this_matrix & x ) { BOOST_QVM_ASSERT(row>=0); BOOST_QVM_ASSERT(row<rows); BOOST_QVM_ASSERT(col>=0); BOOST_QVM_ASSERT(col<cols); return mat_traits<OriginalMatrix>::write_element_idx(col,row,reinterpret_cast<OriginalMatrix &>(x)); }
static BOOST_QVM_INLINE_CRITICAL scalar_type & write_element_idx( int row, int col, this_matrix & x ) { BOOST_QVM_ASSERT(row>=0); BOOST_QVM_ASSERT(row<Rows); BOOST_QVM_ASSERT(col>=0); BOOST_QVM_ASSERT(col<Cols); return x.a[row][col]; }
static inline scalar_type ir( int r, int c, this_matrix_type const & m ) { BOOST_QVM_ASSERT(r>=0); BOOST_QVM_ASSERT(r<rows); BOOST_QVM_ASSERT(c>=0); BOOST_QVM_ASSERT(c<cols); return m.a[r][c]; }
static BOOST_QVM_INLINE_TRIVIAL typename vec_traits<V>::scalar_type value() { BOOST_QVM_ASSERT(0); return typename vec_traits<V>::scalar_type(); }
static BOOST_QVM_INLINE_TRIVIAL S value() { BOOST_QVM_ASSERT(0); return S(); }
static BOOST_QVM_INLINE_TRIVIAL typename vec_traits<A>::scalar_type read_element_idx( A const & a, int ) { BOOST_QVM_ASSERT(0); return vec_traits<A>::template read_element<0>(a); }