Sha256: 98fed14fec7febbfefec44f52906ed1269a0fdc0c8c55ce23fd3b13246f3adf4

Contents?: true

Size: 486 Bytes

Versions: 2

Compression:

Stored size: 486 Bytes

Contents

require 'symath/value'
require 'symath/definition/operator'

module SyMath
  class Definition::Laplacian < Definition::Operator
    def initialize()
      # The laplacian is defined as *d*dF
      super(:laplacian, args: [:f], exp: 'hodge(xd(hodge(xd(f))))')
    end

    def description()
      return 'laplacian(f) - laplacian of function f'
    end

    def to_latex(args)
      if !args
        args = @args
      end

      return "\\nabla^2 #{args[0].to_latex}"
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
symath-0.1.1 lib/symath/definition/laplacian.rb
symath-0.1.0 lib/symath/definition/laplacian.rb