20 #ifndef KJB_M_CPP_VEC_VIEW
21 #define KJB_M_CPP_VEC_VIEW
55 template <
class Vector_type>
138 return assign(Vector_type(vec));
151 return assign(Vector_type(vec));
161 const int n =
size();
163 for(
int i = 0;
i < n;
i++)
191 const int N =
size();
192 for(
int i = 0;
i < N ;
i++)
217 double dot(
const Vector_type& s)
231 const int N =
size();
232 for(
int i = 0;
i < N ;
i++)
284 template <
class Generic_vector>
287 const int N =
size();
291 for(
int i = 0;
i < N;
i++)
293 if(
operator[](
i) != mat[
i])
306 template <
class Generic_vector>
309 const int N =
size();
315 for(
int i = 0;
i < N;
i++)
327 template <
class Generic_vector>
330 const int N =
size();
336 for(
int i = 0;
i < N;
i++)
349 template <
class Generic_vector>
352 const int N =
size();
359 for(
int i = 0;
i < N;
i++)
371 template <
class Generic_vector>
374 const int N =
size();
380 for(
int i = 0;
i < N;
i++)
396 template <
class Vector_type>
Self & operator-=(const Vector_type &s)
Definition: m_vec_view.h:275
Self & operator=(const Vector_type &vec)
Definition: m_vec_view.h:132
Object thrown when an argument is of the wrong size or dimensions.
Definition: l_exception.h:426
Generic_vector_view(Vector_type &vec, const Index_range &indices)
Definition: m_vec_view.h:63
Self & operator=(const std::vector< double > &v)
Definition: m_vec_view.h:175
double dot(const Vector_type &s)
Definition: m_vec_view.h:217
bool equality(const Generic_vector &mat)
Definition: m_vec_view.h:285
Size_type size() const
Definition: m_vec_view.h:125
size_t size() const
Definition: l_index.h:273
Self & plus_equals(const Generic_vector &vec)
Definition: m_vec_view.h:328
bool operator!=(const Vector_type &other)
Definition: m_vec_view.h:102
bool operator!=(const Self &other)
Definition: m_vec_view.h:97
#define KJB_THROW(ex)
Definition: l_exception.h:46
bool all() const
Definition: l_index.h:290
Generic_vector_view(Vector_type &vec)
Definition: m_vec_view.h:71
Self & minus_equals(const Generic_vector &vec)
Definition: m_vec_view.h:372
Generic_vector_view Self
Definition: m_vec_view.h:59
double dot_with_(const Generic_vector &vec)
Definition: m_vec_view.h:350
Self & operator=(const Value_type &s)
Definition: m_vec_view.h:159
Self & operator/=(Value_type s)
Definition: m_vec_view.h:229
Generic_vector_view(const Generic_vector_view &src)
Definition: m_vec_view.h:77
const Generic_vector_view< const Vector_type > Type
Definition: m_vec_view.h:399
double dot(const Self &s)
Definition: m_vec_view.h:205
bool operator==(const Vector_type &other)
Definition: m_vec_view.h:92
Self & operator+=(const Self &s)
Definition: m_vec_view.h:238
Self & operator=(const std::vector< float > &v)
Definition: m_vec_view.h:184
Self & operator*=(Value_type s)
Definition: m_vec_view.h:189
Value_type operator[](int i) const
Definition: m_vec_view.h:119
Self & operator-=(const Self &s)
Definition: m_vec_view.h:263
Value_type & operator[](int i)
Definition: m_vec_view.h:110
Definition: m_vec_view.h:56
Self & operator+=(const Vector_type &s)
Definition: m_vec_view.h:250
get the indices of edges in each direction for i
Definition: APPgetLargeConnectedEdges.m:48
bool operator==(const Self &other)
Definition: m_vec_view.h:87
Index_range indices_
Definition: m_vec_view.h:389
Support for error handling exception classes in libKJB.
Self & operator=(const Self &vec)
Definition: m_vec_view.h:144
Definition: m_vec_view.h:397
Vector_type::value_type Value_type
Definition: m_vec_view.h:60
Vector_type & vec_
Definition: m_vec_view.h:390
int Size_type
Definition: m_vec_view.h:61
Self & assign(const Generic_vector &vec)
Definition: m_vec_view.h:307