Class: Rucas::Symbolic::NegExpr
- Inherits:
-
UnaryOpExpr
- Object
- Struct
- UnaryOpExpr
- Rucas::Symbolic::NegExpr
- Defined in:
- lib/rucas/symbolic.rb
Constant Summary
Constants included from OpExpr
Instance Attribute Summary
Attributes inherited from UnaryOpExpr
Instance Method Summary collapse
Methods inherited from UnaryOpExpr
#children, #match, #to_s_paren, #value
Methods included from OpExpr
#constant?, #precedence, #rewrite, #with
Methods included from Expr
#children, make, #match, #precedence, #rewrite, #simplify, #to_s_paren, #value
Instance Method Details
#to_s ⇒ Object
118 |
# File 'lib/rucas/symbolic.rb', line 118 def to_s; rhs.precedence < self.precedence ? "-(#{rhs})" : "-#{rhs}" end |