Esempio n. 1
0
void initialize_matrix_impl (M &m, ublas::packed_proxy_tag) {
    typename M::size_type size1 = m.size1 ();
#ifndef BOOST_UBLAS_NO_NESTED_CLASS_RELATION
    for (typename M::iterator1 i = m.begin1(); i != m.end1(); ++ i)
        for (typename M::iterator2 j = i.begin(); j != i.end(); ++ j)
            *j = typename M::value_type ( i.index1() * size1 + j.index2() + 1.f );
#else
    for (typename M::iterator1 i = m.begin1(); i != m.end1(); ++ i)
        for (typename M::iterator2 j = ublas::begin (i, ublas::iterator1_tag ()); j != ublas::end (i, ublas::iterator1_tag ()); ++ j)
            *j = typename M::value_type ( i.index1() * size1 + j.index2() + 1.f );
#endif
}
Esempio n. 2
0
  static
 typename M::size_type index (const typename M::iterator2 &i) {
     return i.index2 ();
 }
Esempio n. 3
0
 BOOST_UBLAS_INLINE static
 typename M::size_type index (const typename M::iterator2 &i) {
     return i.index2 ();
 }