lbfgsb 0.1.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,5 +3,5 @@
3
3
  # Lbfgsb.rb is a Ruby binding for L-BFGS-B with Numo::NArray.
4
4
  module Lbfgsb
5
5
  # The version of Lbfgsb.rb you are using.
6
- VERSION = '0.1.0'
6
+ VERSION = '0.4.0'
7
7
  end
data/sig/lbfgsb.rbs ADDED
@@ -0,0 +1,31 @@
1
+ module Lbfgsb
2
+ type result = {
3
+ task: String,
4
+ x: Numo::DFloat,
5
+ fnc: Float,
6
+ jcb: Numo::DFloat,
7
+ n_iter: Integer,
8
+ n_fev: Integer,
9
+ n_jev: Integer,
10
+ success: bool
11
+ }
12
+
13
+ VERSION: String
14
+
15
+ DBL_EPSILON: Float
16
+
17
+ def self?.minimize: (fnc: Method | Proc fnc, x_init: Numo::DFloat x_init, jcb: Method | Proc | bool jcb,
18
+ ?args: untyped args, ?bounds: Numo::DFloat? bounds, ?factr: Float factr, ?pgtol: Float pgtol,
19
+ ?maxcor: Integer maxcor, ?maxiter: Integer maxiter,
20
+ ?verbose: Integer? verbose) -> result
21
+
22
+ private
23
+
24
+ def self?.fnc: (Method | Proc fnc, Numo::DFloat x, untyped args) -> Float
25
+
26
+ def self?.jcb: (Method | Proc jcb, Numo::DFloat x, untyped args) -> Numo::DFloat
27
+
28
+ def self?.min_l_bfgs_b: (Method | Proc fnc, Numo::DFloat x, Method | Proc | bool jcb, untyped args,
29
+ Numo::DFloat l, Numo::DFloat u, Numo::DFloat nbd, Integer maxcor, Float ftol, Float gtol, Integer maxiter,
30
+ Integer? disp) -> result
31
+ end
data/sig/patch.rbs ADDED
@@ -0,0 +1,11 @@
1
+ module Numo
2
+ class NArray
3
+ def self.zeros: (*untyped) -> untyped
4
+ def size: () -> Integer
5
+ end
6
+
7
+ class DFloat < NArray
8
+ def []: (*untyped) -> untyped
9
+ def []=: (*untyped) -> untyped
10
+ end
11
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lbfgsb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - yoshoku
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-11-07 00:00:00.000000000 Z
11
+ date: 2021-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: numo-narray
@@ -24,7 +24,9 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 0.9.1
27
- description: Lbfgsb.rb is a Ruby binding for L-BFGS-B
27
+ description: |
28
+ Lbfgsb.rb is a Ruby binding for L-BFGS-B that is a limited-memory algorithm for
29
+ solving large nonlinear optimization problems subject to simple bounds on the variables.
28
30
  email:
29
31
  - yoshoku@outlook.com
30
32
  executables: []
@@ -32,14 +34,17 @@ extensions:
32
34
  - ext/lbfgsb/extconf.rb
33
35
  extra_rdoc_files: []
34
36
  files:
37
+ - ".clang-format"
35
38
  - ".github/workflows/build.yml"
36
39
  - ".gitignore"
37
40
  - ".rspec"
38
41
  - ".yardopts"
42
+ - CHANGELOG.md
39
43
  - Gemfile
40
44
  - LICENSE.txt
41
45
  - README.md
42
46
  - Rakefile
47
+ - Steepfile
43
48
  - ext/lbfgsb/extconf.rb
44
49
  - ext/lbfgsb/lbfgsbext.c
45
50
  - ext/lbfgsb/lbfgsbext.h
@@ -53,13 +58,16 @@ files:
53
58
  - lbfgsb.gemspec
54
59
  - lib/lbfgsb.rb
55
60
  - lib/lbfgsb/version.rb
61
+ - sig/lbfgsb.rbs
62
+ - sig/patch.rbs
56
63
  homepage: https://github.com/yoshoku/lbfgsb.rb
57
64
  licenses:
58
65
  - BSD-3-Clause
59
66
  metadata:
60
67
  homepage_uri: https://github.com/yoshoku/lbfgsb.rb
61
68
  source_code_uri: https://github.com/yoshoku/lbfgsb.rb
62
- changelog_uri: https://github.com/yoshoku/lbfgsb.rb/CHANGELOG.md
69
+ changelog_uri: https://github.com/yoshoku/lbfgsb.rb/blob/main/CHANGELOG.md
70
+ documentation_uri: https://yoshoku.github.io/lbfgsb.rb/doc/
63
71
  post_install_message:
64
72
  rdoc_options: []
65
73
  require_paths:
@@ -75,8 +83,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
75
83
  - !ruby/object:Gem::Version
76
84
  version: '0'
77
85
  requirements: []
78
- rubygems_version: 3.1.4
86
+ rubygems_version: 3.1.6
79
87
  signing_key:
80
88
  specification_version: 4
81
- summary: Lbfgsb.rb is a Ruby binding for L-BFGS-B
89
+ summary: Lbfgsb.rb is a Ruby binding for L-BFGS-B.
82
90
  test_files: []