2 #ifndef vnl_operators_h_ 3 #define vnl_operators_h_ 13 #include "vnl/vnl_export.h" 23 template<
class T> VNL_EXPORT
26 if (&lhs == &rhs)
return false;
28 if (lhs.
size() < rhs.
size())
return true;
29 else if (lhs.
size() > rhs.
size())
return false;
31 for (
unsigned i = 0; i < lhs.
size(); i++)
33 if (lhs(i) < rhs(i))
return true;
34 else if (lhs(i) > rhs(i))
return false;
47 template<
class T> VNL_EXPORT
50 if (&lhs == &rhs)
return false;
52 if (lhs.
rows() < rhs.
rows())
return true;
53 else if (lhs.
rows() > rhs.
rows())
return false;
54 else if (lhs.
cols() < rhs.
cols())
return true;
55 else if (lhs.
cols() > rhs.
cols())
return false;
57 for (
unsigned i = 0; i < lhs.
size(); i++)
70 template<
class T,
unsigned int n> VNL_EXPORT
81 template<
class T,
unsigned int n,
unsigned int m> VNL_EXPORT
87 #endif // vnl_operators_h_ unsigned int cols() const
Return the number of columns.
vnl_matrix_ref< T > as_ref()
Explicit conversion to a vnl_matrix_ref.
An ordinary mathematical matrix.
size_t size() const
Return the length, number of elements, dimension of this vector.
vnl_vector_ref< T > as_ref()
Explicit conversion to a vnl_vector_ref.
Fixed size, stack-stored, space-efficient matrix.
An ordinary mathematical matrix.
Mathematical vector class, templated by type of element.
T const * data_block() const
Access the contiguous block storing the elements in the matrix row-wise. O(1).
Fixed length stack-stored, space-efficient vector.
Fixed length stack-stored vector.
unsigned int size() const
Return the total number of elements stored by the matrix.
unsigned int rows() const
Return the number of rows.
VNL_EXPORT bool operator<(vnl_vector< T > const &lhs, vnl_vector< T > const &rhs)
Define a complete ordering on vnl_vector.