36 #ifndef GMM_INTERFACE_BGEOT_H__
37 #define GMM_INTERFACE_BGEOT_H__
48 template <
typename T>
struct linalg_traits<
bgeot::small_vector<T> > {
50 typedef this_type origin_type;
51 typedef linalg_false is_reference;
52 typedef abstract_vector linalg_type;
55 typedef typename this_type::iterator iterator;
56 typedef typename this_type::const_iterator const_iterator;
57 typedef abstract_dense storage_type;
58 typedef linalg_true index_sorted;
59 static size_type size(
const this_type &v) {
return v.size(); }
60 static iterator begin(this_type &v) {
return v.begin(); }
61 static const_iterator begin(
const this_type &v) {
return v.begin(); }
62 static iterator end(this_type &v) {
return v.end(); }
63 static const_iterator end(
const this_type &v) {
return v.end(); }
64 static origin_type* origin(this_type &v) {
return &v; }
65 static const origin_type* origin(
const this_type &v) {
return &v; }
66 static void clear(origin_type* o,
const iterator &it,
const iterator &ite)
67 { std::fill(it, ite, value_type(0)); }
68 static void do_clear(this_type &v)
69 { std::fill(v.begin(), v.end(), value_type(0)); }
70 static value_type access(
const origin_type *,
const const_iterator &it,
73 static reference access(origin_type *,
const iterator &it,
container for small vectors of POD (Plain Old Data) types.
void clear(L &l)
clear (fill with zeros) a vector or matrix.
void resize(V &v, size_type n)
*/
size_t size_type
used as the common size type in the library