Information
Media
Support
RSS
Other Adobe Projects
Other Resources
|
boost::mpl::detail::select_subvector_c< VEC_OF_VECS, N > Class Template Reference
[CrossVector Iterator]
Converts the basis of a number
Given a non-negative integer N, and a vector of vectors VEC_OF_VECS, returns a vector of size size<VEC_OF_VECS>, such that the i-th element of the returned vector is the j-th element of the i-th vector in VEC_OF_VECS, where the j-s comprise the representation of N as a number in which each digit has a different base - the size of the corresponding vector in VEC_OF_VECS.
More...
#include <type_vector.hpp>
List of all members.
Detailed Description
template<typename VEC_OF_VECS, std::size_t N>
class boost::mpl::detail::select_subvector_c< VEC_OF_VECS, N >
For example, if VEC_OF_VECS = [[A0,A1,A2], [B0,B1,B2,B3], [C0,C1,C2,C3,C4,C5,C6], [D0,D1]] and N=17 The basis will be [3, 4, 7, 2], in which the number 17 will have a representation [2, 1, 1, 0] because 17 = 2 + (3)*1 + (3*4)*1 + (3*4*7)*0. Thus the returned vector will ve [A2, B1, C1, D0]
A more readable design would be to separate the basis conversion outside of extracting the types of VEC_OF_VECS but that generates more types and slows down compile time.
Definition at line 106 of file type_vector.hpp.
|