Module: Num4InteLib
- Extended by:
- FFI::Library
- Defined in:
- lib/num4inte.rb
Overview
数値計算による数値積分の解法するライブラリ
Instance Method Summary collapse
-
#f(xi) {|x| ... } ⇒ double
dy = f(xi).
-
#gaussLegendreRule(n, a, b, h, func) ⇒ double
ガウス求積法.
-
#leftReimannSumMethod(a, b, h, func) ⇒ double
左リーマン和法.
-
#rigtReimannSumMethod(a, b, h, func) ⇒ double
右リーマン和法.
-
#simpsonRule(a, b, h, func) ⇒ double
ニュートン・コーツ法(2次:シンプソンの公式).
-
#trapezioidalRule(a, b, h, func) ⇒ double
ニュートン・コーツ法(1次:台形公式).
Instance Method Details
#f(xi) {|x| ... } ⇒ double
16 |
# File 'lib/num4inte.rb', line 16 callback :f, [:double], :double |
#gaussLegendreRule(n, a, b, h, func) ⇒ double
ガウス求積法
107 108 |
# File 'lib/num4inte.rb', line 107 attach_function :gaussLegendreRule, :CNum4Inte_gauss_gaussLegendreRule, [:int, :double, :double, :double, :f], :double |
#leftReimannSumMethod(a, b, h, func) ⇒ double
左リーマン和法
34 35 |
# File 'lib/num4inte.rb', line 34 attach_function :leftReimannSumMethod, :CNum4Inte_reimann_leftReimannSumMethod, [:double, :double, :double, :f], :double |
#rigtReimannSumMethod(a, b, h, func) ⇒ double
右リーマン和法
52 53 |
# File 'lib/num4inte.rb', line 52 attach_function :rigtReimannSumMethod, :CNum4Inte_reimann_rigtReimannSumMethod, [:double, :double, :double, :f], :double |
#simpsonRule(a, b, h, func) ⇒ double
ニュートン・コーツ法(2次:シンプソンの公式)
88 89 |
# File 'lib/num4inte.rb', line 88 attach_function :simpsonRule, :CNum4Inte_rewton_simpsonRule, [:double, :double, :double, :f], :double |
#trapezioidalRule(a, b, h, func) ⇒ double
ニュートン・コーツ法(1次:台形公式)
70 71 |
# File 'lib/num4inte.rb', line 70 attach_function :trapezioidalRule, :CNum4Inte_rewton_trapezioidalRule, [:double, :double, :double, :f], :double |