Loading...
Searching...
No Matches
zero_matrix.h
1#ifndef SYMENGINE_MATRICES_ZERO_MATRIX_H
2#define SYMENGINE_MATRICES_ZERO_MATRIX_H
3
4#include <symengine/basic.h>
5#include <symengine/matrices/matrix_expr.h>
6
7namespace SymEngine
8{
9
10class ZeroMatrix : public MatrixExpr
11{
12private:
13 RCP<const Basic> m_, n_; // m >= 0, n >= 0
14
15public:
16 ZeroMatrix(const RCP<const Basic> &m, const RCP<const Basic> &n)
17 : m_(m), n_(n)
18 {
19 SYMENGINE_ASSIGN_TYPEID();
20 SYMENGINE_ASSERT(is_canonical(m, n));
21 }
22
24 hash_t __hash__() const override;
25 bool __eq__(const Basic &o) const override;
26 int compare(const Basic &o) const override;
27 vec_basic get_args() const override;
28 bool is_canonical(const RCP<const Basic> &m,
29 const RCP<const Basic> &n) const;
30
31 inline const RCP<const Basic> &nrows() const
32 {
33 return m_;
34 }
35
36 inline const RCP<const Basic> &ncols() const
37 {
38 return n_;
39 }
40};
41
42RCP<const MatrixExpr> zero_matrix(const RCP<const Basic> &m,
43 const RCP<const Basic> &n);
44
45} // namespace SymEngine
46#endif
The base class for SymEngine.
#define IMPLEMENT_TYPEID(SYMENGINE_ID)
Inline members and functions.
Definition basic.h:340
The lowest unit of symbolic representation.
Definition basic.h:97
bool __eq__(const Basic &o) const override
Test equality.
hash_t __hash__() const override
int compare(const Basic &o) const override
vec_basic get_args() const override
Returns the list of arguments.
Main namespace for SymEngine package.
Definition add.cpp:19
void hash_combine(hash_t &seed, const T &v)
Definition basic-inl.h:95