Medusa  1.1
Coordinate Free Mehless Method implementation
MatrixBaseAddons.hpp File Reference

Detailed Description

Plugins for Eigen::MatrixBase class.

This extensions add lexicographical compare to vectors, so that they can be sorted. They also add comparisons to scalars, returning the set of indices, for which the comparison holds. Some member typedefs are added as well.

Definition in file MatrixBaseAddons.hpp.

Go to the source code of this file.

Typedefs

typedef Scalar scalar_t
 Type of the elements, alias of Scalar. More...
 

Enumerations

enum  { dim = RowsAtCompileTime * ColsAtCompileTime }
 

Functions

template<typename OtherDerived >
bool operator< (const MatrixBase< OtherDerived > &arg) const
 Lexicographical compare of vectors. More...
 
template<typename OtherDerived >
bool operator> (const MatrixBase< OtherDerived > &arg) const
 Lexicographical compare of vectors. More...
 
template<typename OtherDerived >
bool operator<= (const MatrixBase< OtherDerived > &arg) const
 Lexicographical compare of vectors. More...
 
template<typename OtherDerived >
bool operator>= (const MatrixBase< OtherDerived > &arg) const
 Lexicographical compare of vectors. More...
 
template<class Pred >
mm::indexes_t filter (const Pred &pred) const
 Returns list of indexes for which predicate returns true. More...
 
mm::indexes_t operator< (const Scalar &v) const
 Returns list of indexes of elements that are lower than v. More...
 
mm::indexes_t operator> (const Scalar &v) const
 Returns list of indexes of elements that are greater than v. More...
 
mm::indexes_t operator<= (const Scalar &v) const
 Returns list of indexes of elements that are lower or equal than v. More...
 
mm::indexes_t operator>= (const Scalar &v) const
 Returns list of indexes of elements that are greater or equal than v. More...
 
mm::indexes_t operator== (const Scalar &v) const
 Returns list of indexes for which their elements compare equal to a. More...
 
mm::indexes_t operator!= (const Scalar &v) const
 Returns list of indexes for which their elements compare not equal to a. More...
 

Typedef Documentation

◆ scalar_t

typedef Scalar scalar_t

Type of the elements, alias of Scalar.

Examples
test/operators/computeShapes_test.cpp.

Definition at line 16 of file MatrixBaseAddons.hpp.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
dim 

Number of elements of this matrix.

Negative if dynamic

Definition at line 13 of file MatrixBaseAddons.hpp.

Function Documentation

◆ filter()

template<class Pred >
mm::indexes_t filter ( const Pred &  pred) const

Returns list of indexes for which predicate returns true.

Template Parameters
PredAny callable object, e.g. lambda func, functional, class with operator() defined.

Definition at line 46 of file MatrixBaseAddons.hpp.

◆ operator!=()

mm::indexes_t operator!= ( const Scalar &  v) const

Returns list of indexes for which their elements compare not equal to a.

Definition at line 94 of file MatrixBaseAddons.hpp.

◆ operator<() [1/2]

template<typename OtherDerived >
bool operator< ( const MatrixBase< OtherDerived > &  arg) const

Lexicographical compare of vectors.

Definition at line 20 of file MatrixBaseAddons.hpp.

◆ operator<() [2/2]

mm::indexes_t operator< ( const Scalar &  v) const

Returns list of indexes of elements that are lower than v.

Definition at line 54 of file MatrixBaseAddons.hpp.

◆ operator<=() [1/2]

template<typename OtherDerived >
bool operator<= ( const MatrixBase< OtherDerived > &  arg) const

Lexicographical compare of vectors.

Definition at line 34 of file MatrixBaseAddons.hpp.

◆ operator<=() [2/2]

mm::indexes_t operator<= ( const Scalar &  v) const

Returns list of indexes of elements that are lower or equal than v.

Definition at line 70 of file MatrixBaseAddons.hpp.

◆ operator==()

mm::indexes_t operator== ( const Scalar &  v) const

Returns list of indexes for which their elements compare equal to a.

Examples
test/io/STL_test.cpp.

Definition at line 86 of file MatrixBaseAddons.hpp.

◆ operator>() [1/2]

template<typename OtherDerived >
bool operator> ( const MatrixBase< OtherDerived > &  arg) const

Lexicographical compare of vectors.

Definition at line 30 of file MatrixBaseAddons.hpp.

◆ operator>() [2/2]

mm::indexes_t operator> ( const Scalar &  v) const

Returns list of indexes of elements that are greater than v.

Definition at line 62 of file MatrixBaseAddons.hpp.

◆ operator>=() [1/2]

template<typename OtherDerived >
bool operator>= ( const MatrixBase< OtherDerived > &  arg) const

Lexicographical compare of vectors.

Definition at line 38 of file MatrixBaseAddons.hpp.

◆ operator>=() [2/2]

mm::indexes_t operator>= ( const Scalar &  v) const

Returns list of indexes of elements that are greater or equal than v.

Definition at line 78 of file MatrixBaseAddons.hpp.