module Dydx

Constants

VERSION

Public Instance Methods

S(function, delta) click to toggle source
# File lib/dydx.rb, line 26
def S(function, delta)
  itgrl_var = delta.var
  unless function.is_a?(Function)
    eval "g(#{itgrl_var}) <= #{function}"
    function = g(x)
  end
  Integrand.new(function, itgrl_var)
end
_(*args) click to toggle source
# File lib/dydx.rb, line 43
def _(*args)
  case args.count
  when 1
    num = args.first
    Num.new(num)
  when 3
    ltr, op, rtr = args
    ltr.send(op, rtr)
  end
end
d() click to toggle source
# File lib/dydx.rb, line 35
def d
  Delta.new
end
method_missing(method, *args, &block) click to toggle source
Calls superclass method
# File lib/dydx.rb, line 54
def method_missing(method, *args, &block)
  method_name = method.to_s
  if method_name =~ /^d.$/
    Delta.new(method_name[1].to_sym, args.first)
  elsif method_name =~ /^[a-z]$/
    method_name.to_sym
  else
    super
  end
end
reset() click to toggle source
# File lib/dydx.rb, line 39
def reset
  $f, $g, $h = nil, nil, nil
end