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_f, #units
Methods inherited from Term
binop, #color, #data, #label, list_terms, name_terms!, #style, #to_dot, #to_i, #to_s, unop
Methods included from Measured
#per, #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
470 471 472 |
# File 'lib/mathviz.rb', line 470 def constant? false end |
#shape ⇒ Object
Graphiviz node shape
465 466 467 |
# File 'lib/mathviz.rb', line 465 def shape :ellipse end |