Class: MathViz::Operation::Unary
- Inherits:
-
MathViz::Operation
- Object
- Term
- MathViz::Operation
- MathViz::Operation::Unary
- Defined in:
- lib/mathviz.rb
Overview
Special cases for unary operators
Instance Attribute Summary
Attributes inherited from Term
Instance Method Summary collapse
-
#to_dot(g) ⇒ Object
Extend Graphviz g with a representation of this object, and incoming connections.
-
#to_value ⇒ Object
Apply the operator to create the derived value.
Methods inherited from MathViz::Operation
#collapse, #color, #constant?, #finite?, #initialize, #link_from, #long, #shape, #units
Methods inherited from Term
#anonymous?, binop, #collapse, #color, #data, #generated?, #label, list_terms, name_terms!, #shape, #style, #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::Operation
Instance Method Details
#to_dot(g) ⇒ Object
Extend Graphviz g with a representation of this object, and incoming connections
653 654 655 656 |
# File 'lib/mathviz.rb', line 653 def to_dot(g) super @operands.each {|x| link_from(g, x, :normal, true)} end |