In Files

Methods

Files

MathViz::Operation::Unary

Special cases for unary operators

Public Instance Methods

to_dot(g) click to toggle source

Extend Graphviz g with a representation of this object, and incoming connections

# File lib/mathviz.rb, line 653
def to_dot(g)
  super
  @operands.each {|x| link_from(g, x, :normal, true)}
end
to_value() click to toggle source

Apply the operator to create the derived value.

# File lib/mathviz.rb, line 647
def to_value
  return MathViz::Infinity unless finite?
  @operands.map(&:to_value).map(&@op).first
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.