3 #include <symengine/matrices/zero_matrix.h>
10 hash_t seed = SYMENGINE_ZEROMATRIX;
11 hash_combine<Basic>(seed, *m_);
12 hash_combine<Basic>(seed, *n_);
18 return (is_a<ZeroMatrix>(o)
19 && m_->__eq__(*down_cast<const ZeroMatrix &>(o).m_)
20 && n_->__eq__(*down_cast<const ZeroMatrix &>(o).n_));
25 SYMENGINE_ASSERT(is_a<ZeroMatrix>(o));
27 const ZeroMatrix &other = down_cast<const ZeroMatrix &>(o);
28 auto temp = m_->compare(*(other.m_));
32 return n_->compare(*(other.n_));
41 bool ZeroMatrix::is_canonical(
const RCP<const Basic> &m,
42 const RCP<const Basic> &n)
const
45 if (is_a<Integer>(*m)) {
46 if (down_cast<const Integer &>(*m).is_negative()) {
54 if (is_a<Integer>(*n)) {
55 if (down_cast<const Integer &>(*n).is_negative()) {
65 RCP<const MatrixExpr> zero_matrix(
const RCP<const Basic> &m,
66 const RCP<const Basic> &n)
69 if (is_a<Integer>(*m)) {
70 if (down_cast<const Integer &>(*m).is_negative()) {
72 "Dimension of ZeroMatrix must be nonnegative");
76 "Dimension of ZeroMatrix must be a nonnegative integer");
80 if (is_a<Integer>(*n)) {
81 if (down_cast<const Integer &>(*n).is_negative()) {
83 "Dimension of ZeroMatrix must be nonnegative");
87 "Dimension of ZeroMatrix must be a nonnegative integer");
91 return make_rcp<const ZeroMatrix>(m, n);
The lowest unit of symbolic representation.
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.
bool is_a_Number(const Basic &b)