16 template<
typename MatrixType,
bool refOnProperties>
17 class ObjectWithProperties;
25 template<
typename MatrixType,
bool refOnProperties = false>
38 template<
typename OtherDerived>
52 template<
typename MatrixType,
bool refOnProperties = false>
56 using MatrixType::MatrixType;
60 template<
typename OtherDerived>
64 template<
typename OtherDerived>
67 : MatrixType(other), properties_(p)
70 template<
typename OtherType>
72 : MatrixType(other), properties_(other.
properties())
75 template<
typename OtherType>
79 template<
typename OtherDerived>
82 assert(this->rows() == other.rows() && this->cols() == other.cols()
83 &&
"It is not allowed to assign an expression with a different size. Please explicitly resize the matrix "
85 this->MatrixType::operator=(other);
90 template<
typename OtherDerived>
93 assert(this->rows() == other.rows() && this->cols() == other.cols() &&
"Matrices must have the same size");
94 this->MatrixType::operator+=(other);
99 template<
typename OtherDerived>
102 assert(this->rows() == other.rows() && this->cols() == other.cols() &&
"Matrices must have the same size");
103 this->MatrixType::operator-=(other);
108 template<
typename T, disable_for_templated_t<T, Eigen::MatrixBase> = 0>
111 template<
typename T, disable_for_templated_t<T, Eigen::MatrixBase> = 0>
120 template<
typename OtherDerived>
123 assert(this->rows() == other.rows() && this->cols() == other.cols()
124 &&
"It is not allowed to assign an expression with a different size. Please explicitly resize the matrix "
126 this->MatrixType::operator=(other);
143 std::conditional_t<refOnProperties, std::add_lvalue_reference_t<MatrixProperties>,
MatrixProperties> properties_;
146 template<
typename MatrixType,
bool refOnProperties>
147 template<
typename OtherDerived>
149 const Eigen::MatrixBase<OtherDerived> & other)
153 M_.assignKeepProperties(other);
Definition: MatrixWithProperties.h:27
KeepProperties(ObjectWithProperties< MatrixType, refOnProperties > &M, bool keep)
Definition: MatrixWithProperties.h:35
ObjectWithProperties< MatrixType, refOnProperties > & operator=(const ObjectWithProperties< MatrixType, b > &)=delete
ObjectWithProperties< MatrixType, refOnProperties > & operator=(const Eigen::MatrixBase< OtherDerived > &other)
Definition: MatrixWithProperties.h:148
Definition: MatrixProperties.h:17
Definition: MatrixWithProperties.h:54
const MatrixProperties & properties() const
Definition: MatrixWithProperties.h:130
ObjectWithProperties()
Definition: MatrixWithProperties.h:58
ObjectWithProperties(ObjectWithProperties< OtherType > &other)
Definition: MatrixWithProperties.h:76
KeepProperties< MatrixType, refOnProperties > keepProperties(bool keep)
Definition: MatrixWithProperties.h:140
ObjectWithProperties & operator+=(const T &other)=delete
ObjectWithProperties & operator*=(const T &other)=delete
ObjectWithProperties & operator-=(const T &other)=delete
ObjectWithProperties & operator+=(const Eigen::MatrixBase< OtherDerived > &other)
Definition: MatrixWithProperties.h:91
ObjectWithProperties & operator-=(const Eigen::MatrixBase< OtherDerived > &other)
Definition: MatrixWithProperties.h:100
MatrixProperties & properties()
Definition: MatrixWithProperties.h:131
ObjectWithProperties & operator/=(const T &other)=delete
ObjectWithProperties(const Eigen::MatrixBase< OtherDerived > &other)
Definition: MatrixWithProperties.h:61
ObjectWithProperties & assignKeepProperties(const Eigen::MatrixBase< OtherDerived > &other)
Definition: MatrixWithProperties.h:121
ObjectWithProperties & operator=(const Eigen::MatrixBase< OtherDerived > &other)
Definition: MatrixWithProperties.h:80
void properties(const MatrixProperties &p)
Definition: MatrixWithProperties.h:132
ObjectWithProperties(const Eigen::MatrixBase< OtherDerived > &other, tvm::internal::const_if_t< MatrixProperties, !refOnProperties > &p)
Definition: MatrixWithProperties.h:65
ObjectWithProperties(const ObjectWithProperties< OtherType > &other)
Definition: MatrixWithProperties.h:71
typename const_if< T, c >::type const_if_t
Definition: meta.h:99