Class: MathViz::Input
Overview
A simple number.
Derives most of it’s behavior from MathViz::Constant, but also identifies the number as variable, which affects nodes display style, so that opportunities for constant-folding can be idenified.
Instance Attribute Summary
Attributes inherited from Term
Instance Method Summary collapse
-
#constant? ⇒ Boolean
false.
-
#shape ⇒ Object
Graphiviz node shape.
Methods inherited from Constant
#finite?, #initialize, #long, #to_value, #units
Methods inherited from Term
#anonymous?, binop, #collapse, #color, #data, #generated?, #label, list_terms, name_terms!, #style, #to_dot, #to_i, #to_s, unop
Methods included from Measured
#per, #to_value, #unit, #units, #with_units
Methods included from Units::Class
Constructor Details
This class inherits a constructor from MathViz::Constant
Instance Method Details
#constant? ⇒ Boolean
false
558 559 560 |
# File 'lib/mathviz.rb', line 558 def constant? false end |
#shape ⇒ Object
Graphiviz node shape
553 554 555 |
# File 'lib/mathviz.rb', line 553 def shape :ellipse end |