Visual Computing Library
Loading...
Searching...
No Matches
vcl::EigenMatrixConcept Concept Reference

Concept for Eigen matrices. It is satisfied when T is an Eigen matrix. More...

#include <vclib/concepts/space/matrix.h>

Concept definition

template<typename T>
concept vcl::EigenMatrixConcept = requires (T&& obj) {
typename RemoveRef<T>::Scalar;
RemoveRef<T>();
obj.RowsAtCompileTime;
obj.ColsAtCompileTime;
obj.rows();
obj.cols();
obj.operator()(std::size_t(), std::size_t());
obj.operator()(std::size_t(), std::size_t());
requires IsConst<T> || requires {
obj.resize(std::size_t(), std::size_t());
obj.conservativeResize(std::size_t(), std::size_t());
};
}
Concept for Eigen matrices. It is satisfied when T is an Eigen matrix.
Definition matrix.h:53
The IsConst concept is satisfied if T satisfies one of the following conditions:
Definition const_correctness.h:43

Detailed Description

Concept for Eigen matrices. It is satisfied when T is an Eigen matrix.

The concept just checks that T has the following members:

  • T::RowsAtCompileTime
  • T::ColsAtCompileTime
  • T::rows()
  • T::cols()
  • T::operator()(std::size_t, std::size_t)

If the type T is non-const, it must also have the following members:

  • T::resize(std::size_t, std::size_t)
  • T::conservativeResize(std::size_t, std::size_t)
Note
The fact that an Eigen matrix has the two resize member functions does not mean that it can be resized. For example, a matrix with fixed size cannot be resized, but it has the two resize member functions, and calling them with the same sizes of the matrix does not cause any error.