expression.cpp
1 #include <symengine/printers/strprinter.h>
2 #include <symengine/parser.h>
3 
4 namespace SymEngine
5 {
6 
7 namespace detail
8 {
9 std::string poly_print(const Expression &x)
10 {
11  Precedence prec;
12  if (prec.getPrecedence(x.get_basic()) == PrecedenceEnum::Add) {
13  return "(" + x.get_basic()->__str__() + ")";
14  }
15  return x.get_basic()->__str__();
16 }
17 } // namespace detail
18 
20 {
21  m_basic = parse(s);
22 }
23 
24 } // namespace SymEngine
Expression()
Plain constructor of Expression.
Definition: expression.h:35
Main namespace for SymEngine package.
Definition: add.cpp:19