Class: Korba::NewtonFunction

Inherits:
Object
  • Object
show all
Defined in:
lib/korba/newton_function.rb

Direct Known Subclasses

KeplerEquationFunction

Instance Method Summary collapse

Constructor Details

#initializeNewtonFunction

Returns a new instance of NewtonFunction.



7
8
9
10
11
12
13
# File 'lib/korba/newton_function.rb', line 7

def initialize()
  @zero = BigDecimal("0.0")
  @one = BigDecimal("1.0")
  @two = BigDecimal("2.0")
  @ten = BigDecimal("10.0")
  @eps = BigDecimal("1.0e-14")
end

Instance Method Details

#epsObject



19
# File 'lib/korba/newton_function.rb', line 19

def eps; @eps; end

#oneObject



16
# File 'lib/korba/newton_function.rb', line 16

def one; @one; end

#tenObject



18
# File 'lib/korba/newton_function.rb', line 18

def ten; @ten; end

#twoObject



17
# File 'lib/korba/newton_function.rb', line 17

def two; @two; end

#values(x) ⇒ Object

Raises:

  • (NotImplementedError)


21
22
23
# File 'lib/korba/newton_function.rb', line 21

def values(x)
  raise NotImplementedError
end

#zeroObject



15
# File 'lib/korba/newton_function.rb', line 15

def zero; @zero; end