Sha256: 471d402d12373109e78e05c53ccdef462ad733b5ec6c6ea5d4c1e1a17f2b6229

Contents?: true

Size: 391 Bytes

Versions: 4

Compression:

Stored size: 391 Bytes

Contents

module Dydx
  module Algebra
    module Set
      class Num < Base
        attr_accessor :n

        def initialize(n)
          @n = n
        end

        def differentiate(sym=:x)
          _(0)
        end
        alias_method :d, :differentiate

        def to_s
          @n.to_s
        end

        def ==(x)
          x.is_a?(Num) && n == x.n
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
dydx-0.0.6 lib/dydx/algebra/set/num.rb
dydx-0.0.5 lib/dydx/algebra/set/num.rb
dydx-0.0.4 lib/dydx/algebra/set/num.rb
dydx-0.0.3 lib/dydx/algebra/set/num.rb