assumptions.h
1 #ifndef SYMENGINE_ASSUMPTIONS_H
2 #define SYMENGINE_ASSUMPTIONS_H
3 
4 #include <symengine/dict.h>
5 #include <symengine/basic.h>
6 
7 namespace SymEngine
8 {
9 
10 typedef std::unordered_map<RCP<const Basic>, bool, RCPBasicHash, RCPBasicKeyEq>
11  umap_basic_bool;
12 
14 {
15 private:
16  set_basic complex_symbols_;
17  set_basic real_symbols_;
18  set_basic rational_symbols_;
19  set_basic integer_symbols_;
20  umap_basic_bool positive_;
21  umap_basic_bool nonnegative_;
22  umap_basic_bool negative_;
23  umap_basic_bool nonpositive_;
24  umap_basic_bool nonzero_;
25  umap_basic_bool zero_;
26 
27  void set_map(umap_basic_bool &map, const RCP<const Basic> &symbol,
28  bool value);
29  tribool from_map(const umap_basic_bool &map,
30  const RCP<const Basic> &symbol) const;
31 
32 public:
33  Assumptions(const set_basic &statements);
34  tribool is_complex(const RCP<const Basic> &symbol) const;
35  tribool is_real(const RCP<const Basic> &symbol) const;
36  tribool is_rational(const RCP<const Basic> &symbol) const;
37  tribool is_integer(const RCP<const Basic> &symbol) const;
38  tribool is_positive(const RCP<const Basic> &symbol) const;
39  tribool is_nonnegative(const RCP<const Basic> &symbol) const;
40  tribool is_negative(const RCP<const Basic> &symbol) const;
41  tribool is_nonpositive(const RCP<const Basic> &symbol) const;
42  tribool is_nonzero(const RCP<const Basic> &symbol) const;
43  tribool is_zero(const RCP<const Basic> &symbol) const;
44 };
45 } // namespace SymEngine
46 
47 #endif // SYMENGINE_ASSUMPTIONS_H
The base class for SymEngine.
Main namespace for SymEngine package.
Definition: add.cpp:19
RCP< const Symbol > symbol(const std::string &name)
inline version to return Symbol
Definition: symbol.h:82