68 operator bool()
const {
return b_; }
79 operator bool()
const {
return b_; }
107 template<
typename... Args>
121 bool isConstant()
const;
122 bool isInvertible()
const;
123 bool isTriangular()
const;
124 bool isLowerTriangular()
const;
125 bool isUpperTriangular()
const;
126 bool isDiagonal()
const;
127 bool isMultipleOfIdentity()
const;
128 bool isIdentity()
const;
129 bool isMinusIdentity()
const;
131 bool isSymmetric()
const;
132 bool isPositiveSemiDefinite()
const;
133 bool isPositiveDefinite()
const;
134 bool isNegativeSemidefinite()
const;
135 bool isNegativeDefinite()
const;
136 bool isIndefinite()
const;
137 bool isNonZeroIndefinite()
const;
146 #define ADD_ARGUMENT(T, member, b1, b2) \
148 template<typename... Args> \
149 std::pair<bool, bool> processArgs(const T & m, const Args &... args) \
151 static_assert(!check_args<T, Args...>(), #T " has already been specified"); \
153 auto p = processArgs(args...); \
154 return {p.first || b1, p.second || b2}; \
164 std::pair<bool, bool> processArgs() {
return {
false,
false}; }
167 template<
typename T,
typename Arg0,
typename... Args>
168 static constexpr
bool check_args()
169 {
return std::is_same<T, Arg0>::value || check_args<T, Args...>(); }
172 static constexpr
bool check_args()
176 void build(
const Arguments & args,
const std::pair<bool, bool> & checks);
182 Positiveness positiveness_;
192 template<
typename... Args>
196 auto p = a.processArgs(args...);
201 : constant_(other.constant_), invertible_(other.invertible_), shape_(other.shape_), symmetric_(other.symmetric_),
202 positiveness_(other.positiveness_)
#define ADD_ARGUMENT(T, member, b1, b2)
Definition: MatrixProperties.h:146
#define TVM_DLLAPI
Definition: api.h:35
Definition: MatrixProperties.h:17
bool isNegativeSemidefinite() const
Definition: MatrixProperties.h:244
bool isDiagonal() const
Definition: MatrixProperties.h:227
bool isPositiveSemiDefinite() const
Definition: MatrixProperties.h:239
Shape shape() const
Definition: MatrixProperties.h:209
bool isMinusIdentity() const
Definition: MatrixProperties.h:233
Constness constness() const
Definition: MatrixProperties.h:213
bool isNegativeDefinite() const
Definition: MatrixProperties.h:247
Shape
Definition: MatrixProperties.h:21
@ MINUS_IDENTITY
Definition: MatrixProperties.h:37
@ GENERAL
Definition: MatrixProperties.h:23
@ MULTIPLE_OF_IDENTITY
Definition: MatrixProperties.h:33
@ DIAGONAL
Definition: MatrixProperties.h:31
@ IDENTITY
Definition: MatrixProperties.h:35
@ LOWER_TRIANGULAR
Definition: MatrixProperties.h:25
@ UPPER_TRIANGULAR
Definition: MatrixProperties.h:27
bool isMultipleOfIdentity() const
Definition: MatrixProperties.h:229
bool isUpperTriangular() const
Definition: MatrixProperties.h:225
bool isTriangular() const
Definition: MatrixProperties.h:221
bool isPositiveDefinite() const
Definition: MatrixProperties.h:242
bool isIndefinite() const
Definition: MatrixProperties.h:249
bool isInvertible() const
Definition: MatrixProperties.h:219
Positiveness
Definition: MatrixProperties.h:46
@ INDEFINITE
Definition: MatrixProperties.h:58
@ NEGATIVE_SEMIDEFINITE
Definition: MatrixProperties.h:54
@ POSITIVE_DEFINITE
Definition: MatrixProperties.h:52
@ NA
Definition: MatrixProperties.h:48
@ NEGATIVE_DEFINITE
Definition: MatrixProperties.h:56
@ POSITIVE_SEMIDEFINITE
Definition: MatrixProperties.h:50
MatrixProperties & operator=(MatrixProperties &&)=default
bool isIdentity() const
Definition: MatrixProperties.h:231
MatrixProperties(MatrixProperties &&)=default
bool isNonZeroIndefinite() const
Definition: MatrixProperties.h:251
Positiveness positiveness() const
Definition: MatrixProperties.h:211
bool isSymmetric() const
Definition: MatrixProperties.h:237
bool isLowerTriangular() const
Definition: MatrixProperties.h:223
Invertibility invertibility() const
Definition: MatrixProperties.h:215
bool isConstant() const
Definition: MatrixProperties.h:217
bool isZero() const
Definition: MatrixProperties.h:235
MatrixProperties & operator=(const MatrixProperties &)=default
TVM_DLLAPI MatrixProperties operator+(const MatrixProperties &, const MatrixProperties &)
TVM_DLLAPI MatrixProperties operator*(double, const MatrixProperties &)
TVM_DLLAPI MatrixProperties operator-(const MatrixProperties &)
@ ZERO
Definition: CompiledAssignment.h:69
@ DIAGONAL
Definition: CompiledAssignment.h:38
@ IDENTITY
Definition: CompiledAssignment.h:47
Definition: MatrixProperties.h:65
Constness(bool b=false)
Definition: MatrixProperties.h:67
Definition: MatrixProperties.h:76
Invertibility(bool b=false)
Definition: MatrixProperties.h:78