lbfgsb 0.4.1 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/LICENSE.txt +1 -1
- data/ext/lbfgsb/extconf.rb +12 -3
- data/ext/lbfgsb/lbfgsbext.c +48 -17
- data/ext/lbfgsb/lbfgsbext.h +1 -1
- data/ext/lbfgsb/src/blas.c +25 -25
- data/ext/lbfgsb/src/blas.h +5 -5
- data/ext/lbfgsb/src/common.h +16 -0
- data/ext/lbfgsb/src/lbfgsb.c +260 -281
- data/ext/lbfgsb/src/lbfgsb.h +45 -43
- data/ext/lbfgsb/src/linpack.c +23 -24
- data/ext/lbfgsb/src/linpack.h +3 -3
- data/lib/lbfgsb/version.rb +1 -1
- data/lib/lbfgsb.rb +1 -1
- metadata +7 -15
- data/.clang-format +0 -149
- data/.github/workflows/build.yml +0 -19
- data/.gitignore +0 -17
- data/.rspec +0 -3
- data/.yardopts +0 -1
- data/Gemfile +0 -10
- data/Rakefile +0 -15
- data/Steepfile +0 -20
- data/lbfgsb.gemspec +0 -33
data/ext/lbfgsb/src/lbfgsb.h
CHANGED
@@ -8,74 +8,76 @@
|
|
8
8
|
#include <string.h>
|
9
9
|
#include <time.h>
|
10
10
|
|
11
|
+
#include "common.h"
|
12
|
+
|
11
13
|
#define TRUE_ (1)
|
12
14
|
#define FALSE_ (0)
|
13
15
|
|
14
|
-
extern
|
15
|
-
double* pgtol, double* wa,
|
16
|
+
extern void setulb_(F77_int* n, F77_int* m, double* x, double* l, double* u, F77_int* nbd, double* f, double* g, double* factr,
|
17
|
+
double* pgtol, double* wa, F77_int* iwa, char* task, F77_int* iprint, char* csave, F77_int* lsave, F77_int* isave,
|
16
18
|
double* dsave);
|
17
19
|
|
18
|
-
extern
|
20
|
+
extern void mainlb_(F77_int* n, F77_int* m, double* x, double* l, double* u, F77_int* nbd, double* f, double* g, double* factr,
|
19
21
|
double* pgtol, double* ws, double* wy, double* sy, double* ss, double* wt, double* wn, double* snd,
|
20
|
-
double* z__, double* r__, double* d__, double* t, double* xp, double* wa,
|
21
|
-
|
22
|
+
double* z__, double* r__, double* d__, double* t, double* xp, double* wa, F77_int* index, F77_int* iwhere,
|
23
|
+
F77_int* indx2, char* task, F77_int* iprint, char* csave, F77_int* lsave, F77_int* isave, double* dsave);
|
22
24
|
|
23
|
-
extern
|
24
|
-
|
25
|
+
extern void active_(F77_int* n, double* l, double* u, F77_int* nbd, double* x, F77_int* iwhere, F77_int* iprint, F77_int* prjctd, F77_int* cnstnd,
|
26
|
+
F77_int* boxed);
|
25
27
|
|
26
|
-
extern
|
28
|
+
extern void bmv_(F77_int* m, double* sy, double* wt, F77_int* col, double* v, double* p, F77_int* info);
|
27
29
|
|
28
|
-
extern
|
29
|
-
double* d__, double* xcp,
|
30
|
-
|
31
|
-
|
30
|
+
extern void cauchy_(F77_int* n, double* x, double* l, double* u, F77_int* nbd, double* g, F77_int* iorder, F77_int* iwhere, double* t,
|
31
|
+
double* d__, double* xcp, F77_int* m, double* wy, double* ws, double* sy, double* wt, double* theta, F77_int* col,
|
32
|
+
F77_int* head, double* p, double* c__, double* wbp, double* v, F77_int* nseg, F77_int* iprint, double* sbgnrm,
|
33
|
+
F77_int* info, double* epsmch);
|
32
34
|
|
33
|
-
extern
|
34
|
-
double* r__, double* wa,
|
35
|
-
|
35
|
+
extern void cmprlb_(F77_int* n, F77_int* m, double* x, double* g, double* ws, double* wy, double* sy, double* wt, double* z__,
|
36
|
+
double* r__, double* wa, F77_int* index, double* theta, F77_int* col, F77_int* head, F77_int* nfree, F77_int* cnstnd,
|
37
|
+
F77_int* info);
|
36
38
|
|
37
|
-
extern
|
39
|
+
extern void errclb_(F77_int* n, F77_int* m, double* factr, double* l, double* u, F77_int* nbd, char* task, F77_int* info, F77_int* k);
|
38
40
|
|
39
|
-
extern
|
40
|
-
double* wn, double* wn1,
|
41
|
-
|
41
|
+
extern void formk_(F77_int* n, F77_int* nsub, F77_int* ind, F77_int* nenter, F77_int* ileave, F77_int* indx2, F77_int* iupdat, F77_int* updatd,
|
42
|
+
double* wn, double* wn1, F77_int* m, double* ws, double* wy, double* sy, double* theta, F77_int* col, F77_int* head,
|
43
|
+
F77_int* info);
|
42
44
|
|
43
|
-
extern
|
45
|
+
extern void formt_(F77_int* m, double* wt, double* sy, double* ss, F77_int* col, double* theta, F77_int* info);
|
44
46
|
|
45
|
-
extern
|
46
|
-
|
47
|
+
extern void freev_(F77_int* n, F77_int* nfree, F77_int* index, F77_int* nenter, F77_int* ileave, F77_int* indx2, F77_int* iwhere, F77_int* wrk,
|
48
|
+
F77_int* updatd, F77_int* cnstnd, F77_int* iprint, F77_int* iter);
|
47
49
|
|
48
|
-
extern
|
50
|
+
extern void hpsolb_(F77_int* n, double* t, F77_int* iorder, F77_int* iheap);
|
49
51
|
|
50
|
-
extern
|
52
|
+
extern void lnsrlb_(F77_int* n, double* l, double* u, F77_int* nbd, double* x, double* f, double* fold, double* gd, double* gdold,
|
51
53
|
double* g, double* d__, double* r__, double* t, double* z__, double* stp, double* dnorm, double* dtd,
|
52
|
-
double* xstep, double* stpmx,
|
53
|
-
|
54
|
+
double* xstep, double* stpmx, F77_int* iter, F77_int* ifun, F77_int* iback, F77_int* nfgv, F77_int* info, char* task,
|
55
|
+
F77_int* boxed, F77_int* cnstnd, char* csave, F77_int* isave, double* dsave);
|
54
56
|
|
55
|
-
extern
|
56
|
-
|
57
|
+
extern void matupd_(F77_int* n, F77_int* m, double* ws, double* wy, double* sy, double* ss, double* d__, double* r__, F77_int* itail,
|
58
|
+
F77_int* iupdat, F77_int* col, F77_int* head, double* theta, double* rr, double* dr, double* stp, double* dtd);
|
57
59
|
|
58
|
-
extern
|
60
|
+
extern void prn1lb_(F77_int* n, F77_int* m, double* l, double* u, double* x, F77_int* iprint, F77_int* itfile, double* epsmch);
|
59
61
|
|
60
|
-
extern
|
61
|
-
double* sbgnrm,
|
62
|
+
extern void prn2lb_(F77_int* n, double* x, double* f, double* g, F77_int* iprint, F77_int* itfile, F77_int* iter, F77_int* nfgv, F77_int* nact,
|
63
|
+
double* sbgnrm, F77_int* nseg, char* word, F77_int* iword, F77_int* iback, double* stp, double* xstep);
|
62
64
|
|
63
|
-
extern
|
64
|
-
|
65
|
-
double* stp, double* xstep,
|
65
|
+
extern void prn3lb_(F77_int* n, double* x, double* f, char* task, F77_int* iprint, F77_int* info, F77_int* itfile, F77_int* iter, F77_int* nfgv,
|
66
|
+
F77_int* nintol, F77_int* nskip, F77_int* nact, double* sbgnrm, double* time, F77_int* nseg, char* word, F77_int* iback,
|
67
|
+
double* stp, double* xstep, F77_int* k, double* cachyt, double* sbtime, double* lnscht);
|
66
68
|
|
67
|
-
extern
|
69
|
+
extern void projgr_(F77_int* n, double* l, double* u, F77_int* nbd, double* x, double* g, double* sbgnrm);
|
68
70
|
|
69
|
-
extern
|
70
|
-
double* ws, double* wy, double* theta, double* xx, double* gg,
|
71
|
-
double* wn,
|
71
|
+
extern void subsm_(F77_int* n, F77_int* m, F77_int* nsub, F77_int* ind, double* l, double* u, F77_int* nbd, double* x, double* d__, double* xp,
|
72
|
+
double* ws, double* wy, double* theta, double* xx, double* gg, F77_int* col, F77_int* head, F77_int* iword, double* wv,
|
73
|
+
double* wn, F77_int* iprint, F77_int* info);
|
72
74
|
|
73
|
-
extern
|
74
|
-
char* task,
|
75
|
+
extern void dcsrch_(double* f, double* g, double* stp, double* ftol, double* gtol, double* xtol, double* stpmin, double* stpmax,
|
76
|
+
char* task, F77_int* isave, double* dsave);
|
75
77
|
|
76
|
-
extern
|
77
|
-
double* dp,
|
78
|
+
extern void dcstep_(double* stx, double* fx, double* dx, double* sty, double* fy, double* dy, double* stp, double* fp,
|
79
|
+
double* dp, F77_int* brackt, double* stpmin, double* stpmax);
|
78
80
|
|
79
|
-
extern
|
81
|
+
extern void timer_(double* ttime);
|
80
82
|
|
81
83
|
#endif /* LBFGSB_RB_LBFGSB_H_ */
|
data/ext/lbfgsb/src/linpack.c
CHANGED
@@ -3,11 +3,10 @@
|
|
3
3
|
* or “3-clause license”)
|
4
4
|
* Please read attached file License.txt
|
5
5
|
*/
|
6
|
-
|
7
|
-
#include "linpack.h"
|
8
6
|
#include "blas.h"
|
7
|
+
#include "linpack.h"
|
9
8
|
|
10
|
-
static
|
9
|
+
static F77_int c__1 = 1;
|
11
10
|
|
12
11
|
/**
|
13
12
|
* dpofa factors a double precision symmetric positive definite
|
@@ -23,10 +22,10 @@ static long c__1 = 1;
|
|
23
22
|
* the symmetric matrix to be factored. only the
|
24
23
|
* diagonal and upper triangle are used.
|
25
24
|
*
|
26
|
-
* lda
|
25
|
+
* lda integer
|
27
26
|
* the leading dimension of the array a .
|
28
27
|
*
|
29
|
-
* n
|
28
|
+
* n integer
|
30
29
|
* the order of the matrix a .
|
31
30
|
*
|
32
31
|
* on return
|
@@ -36,7 +35,7 @@ static long c__1 = 1;
|
|
36
35
|
* the strict lower triangle is unaltered.
|
37
36
|
* if info .ne. 0 , the factorization is not complete.
|
38
37
|
*
|
39
|
-
* info
|
38
|
+
* info integer
|
40
39
|
* = 0 for normal return.
|
41
40
|
* = k signals an error condition. the leading minor
|
42
41
|
* of order k is not positive definite.
|
@@ -44,11 +43,11 @@ static long c__1 = 1;
|
|
44
43
|
* linpack. this version dated 08/14/78 .
|
45
44
|
* cleve moler, university of new mexico, argonne national lab.
|
46
45
|
*/
|
47
|
-
|
48
|
-
|
49
|
-
static
|
46
|
+
void dpofa_(double* a, F77_int* lda, F77_int* n, F77_int* info) {
|
47
|
+
F77_int a_dim1, a_offset, i__1, i__2, i__3;
|
48
|
+
static F77_int j, k;
|
50
49
|
static double s, t;
|
51
|
-
static
|
50
|
+
static F77_int jm1;
|
52
51
|
|
53
52
|
a_dim1 = *lda;
|
54
53
|
a_offset = 1 + a_dim1;
|
@@ -65,7 +64,7 @@ int lbfgsb_rb_dpofa_(double* a, long* lda, long* n, long* info) {
|
|
65
64
|
i__2 = jm1;
|
66
65
|
for (k = 1; k <= i__2; ++k) {
|
67
66
|
i__3 = k - 1;
|
68
|
-
t = a[k + j * a_dim1] -
|
67
|
+
t = a[k + j * a_dim1] - ddot_(&i__3, &a[k * a_dim1 + 1], &c__1, &a[j * a_dim1 + 1], &c__1);
|
69
68
|
t /= a[k + k * a_dim1];
|
70
69
|
a[k + j * a_dim1] = t;
|
71
70
|
s += t * t;
|
@@ -80,7 +79,7 @@ int lbfgsb_rb_dpofa_(double* a, long* lda, long* n, long* info) {
|
|
80
79
|
}
|
81
80
|
*info = 0;
|
82
81
|
L40:
|
83
|
-
return
|
82
|
+
return;
|
84
83
|
}
|
85
84
|
|
86
85
|
/**
|
@@ -101,16 +100,16 @@ L40:
|
|
101
100
|
* the corresponding elements of the array can be
|
102
101
|
* used to store other information.
|
103
102
|
*
|
104
|
-
* ldt
|
103
|
+
* ldt integer
|
105
104
|
* ldt is the leading dimension of the array t.
|
106
105
|
*
|
107
|
-
* n
|
106
|
+
* n integer
|
108
107
|
* n is the order of the system.
|
109
108
|
*
|
110
109
|
* b double precision(n).
|
111
110
|
* b contains the right hand side of the system.
|
112
111
|
*
|
113
|
-
* job
|
112
|
+
* job integer
|
114
113
|
* job specifies what kind of system is to be solved.
|
115
114
|
* if job is
|
116
115
|
*
|
@@ -124,7 +123,7 @@ L40:
|
|
124
123
|
* b b contains the solution, if info .eq. 0.
|
125
124
|
* otherwise b is unaltered.
|
126
125
|
*
|
127
|
-
* info
|
126
|
+
* info integer
|
128
127
|
* info contains zero if the system is nonsingular.
|
129
128
|
* otherwise info contains the index of
|
130
129
|
* the first zero diagonal element of t.
|
@@ -132,9 +131,9 @@ L40:
|
|
132
131
|
* linpack. this version dated 08/14/78 .
|
133
132
|
* g. w. stewart, university of maryland, argonne national lab.
|
134
133
|
*/
|
135
|
-
|
136
|
-
|
137
|
-
static
|
134
|
+
void dtrsl_(double* t, F77_int* ldt, F77_int* n, double* b, F77_int* job, F77_int* info) {
|
135
|
+
F77_int t_dim1, t_offset, i__1, i__2;
|
136
|
+
static F77_int j, jj, case__;
|
138
137
|
static double temp;
|
139
138
|
|
140
139
|
/* check for zero diagonal elements. */
|
@@ -181,7 +180,7 @@ L20:
|
|
181
180
|
for (j = 2; j <= i__1; ++j) {
|
182
181
|
temp = -b[j - 1];
|
183
182
|
i__2 = *n - j + 1;
|
184
|
-
|
183
|
+
daxpy_(&i__2, &temp, &t[j + (j - 1) * t_dim1], &c__1, &b[j], &c__1);
|
185
184
|
b[j] /= t[j + j * t_dim1];
|
186
185
|
}
|
187
186
|
L40:
|
@@ -197,7 +196,7 @@ L50:
|
|
197
196
|
for (jj = 2; jj <= i__1; ++jj) {
|
198
197
|
j = *n - jj + 1;
|
199
198
|
temp = -b[j + 1];
|
200
|
-
|
199
|
+
daxpy_(&j, &temp, &t[(j + 1) * t_dim1 + 1], &c__1, &b[1], &c__1);
|
201
200
|
b[j] /= t[j + j * t_dim1];
|
202
201
|
}
|
203
202
|
L70:
|
@@ -213,7 +212,7 @@ L80:
|
|
213
212
|
for (jj = 2; jj <= i__1; ++jj) {
|
214
213
|
j = *n - jj + 1;
|
215
214
|
i__2 = jj - 1;
|
216
|
-
b[j] -=
|
215
|
+
b[j] -= ddot_(&i__2, &t[j + 1 + j * t_dim1], &c__1, &b[j + 1], &c__1);
|
217
216
|
b[j] /= t[j + j * t_dim1];
|
218
217
|
}
|
219
218
|
L100:
|
@@ -228,11 +227,11 @@ L110:
|
|
228
227
|
i__1 = *n;
|
229
228
|
for (j = 2; j <= i__1; ++j) {
|
230
229
|
i__2 = j - 1;
|
231
|
-
b[j] -=
|
230
|
+
b[j] -= ddot_(&i__2, &t[j * t_dim1 + 1], &c__1, &b[1], &c__1);
|
232
231
|
b[j] /= t[j + j * t_dim1];
|
233
232
|
}
|
234
233
|
L130:
|
235
234
|
L140:
|
236
235
|
L150:
|
237
|
-
return
|
236
|
+
return;
|
238
237
|
}
|
data/ext/lbfgsb/src/linpack.h
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
#ifndef LBFGSB_RB_LINPACK_H_
|
2
2
|
#define LBFGSB_RB_LINPACK_H_
|
3
3
|
|
4
|
-
#include
|
4
|
+
#include "common.h"
|
5
5
|
|
6
|
-
extern
|
7
|
-
extern
|
6
|
+
extern void dpofa_(double* a, F77_int* lda, F77_int* n, F77_int* info);
|
7
|
+
extern void dtrsl_(double* t, F77_int* ldt, F77_int* n, double* b, F77_int* job, F77_int* info);
|
8
8
|
|
9
9
|
#endif /* LBFGSB_RB_LINPACK_H_ */
|
data/lib/lbfgsb/version.rb
CHANGED
data/lib/lbfgsb.rb
CHANGED
@@ -43,7 +43,7 @@ module Lbfgsb
|
|
43
43
|
n_elements = x_init.size
|
44
44
|
l = Numo::DFloat.zeros(n_elements)
|
45
45
|
u = Numo::DFloat.zeros(n_elements)
|
46
|
-
nbd = Numo::Int64.zeros(n_elements)
|
46
|
+
nbd = SZ_F77_INTEGER == 64 ? Numo::Int64.zeros(n_elements) : Numo::Int32.zeros(n_elements)
|
47
47
|
|
48
48
|
unless bounds.nil?
|
49
49
|
n_elements.times do |n|
|
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.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- yoshoku
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-02-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: numo-narray
|
@@ -34,28 +34,20 @@ extensions:
|
|
34
34
|
- ext/lbfgsb/extconf.rb
|
35
35
|
extra_rdoc_files: []
|
36
36
|
files:
|
37
|
-
- ".clang-format"
|
38
|
-
- ".github/workflows/build.yml"
|
39
|
-
- ".gitignore"
|
40
|
-
- ".rspec"
|
41
|
-
- ".yardopts"
|
42
37
|
- CHANGELOG.md
|
43
|
-
- Gemfile
|
44
38
|
- LICENSE.txt
|
45
39
|
- README.md
|
46
|
-
- Rakefile
|
47
|
-
- Steepfile
|
48
40
|
- ext/lbfgsb/extconf.rb
|
49
41
|
- ext/lbfgsb/lbfgsbext.c
|
50
42
|
- ext/lbfgsb/lbfgsbext.h
|
51
43
|
- ext/lbfgsb/src/License.txt
|
52
44
|
- ext/lbfgsb/src/blas.c
|
53
45
|
- ext/lbfgsb/src/blas.h
|
46
|
+
- ext/lbfgsb/src/common.h
|
54
47
|
- ext/lbfgsb/src/lbfgsb.c
|
55
48
|
- ext/lbfgsb/src/lbfgsb.h
|
56
49
|
- ext/lbfgsb/src/linpack.c
|
57
50
|
- ext/lbfgsb/src/linpack.h
|
58
|
-
- lbfgsb.gemspec
|
59
51
|
- lib/lbfgsb.rb
|
60
52
|
- lib/lbfgsb/version.rb
|
61
53
|
- sig/lbfgsb.rbs
|
@@ -67,7 +59,7 @@ metadata:
|
|
67
59
|
source_code_uri: https://github.com/yoshoku/lbfgsb.rb
|
68
60
|
changelog_uri: https://github.com/yoshoku/lbfgsb.rb/blob/main/CHANGELOG.md
|
69
61
|
documentation_uri: https://yoshoku.github.io/lbfgsb.rb/doc/
|
70
|
-
post_install_message:
|
62
|
+
post_install_message:
|
71
63
|
rdoc_options: []
|
72
64
|
require_paths:
|
73
65
|
- lib
|
@@ -82,8 +74,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
82
74
|
- !ruby/object:Gem::Version
|
83
75
|
version: '0'
|
84
76
|
requirements: []
|
85
|
-
rubygems_version: 3.
|
86
|
-
signing_key:
|
77
|
+
rubygems_version: 3.3.7
|
78
|
+
signing_key:
|
87
79
|
specification_version: 4
|
88
80
|
summary: Lbfgsb.rb is a Ruby binding for L-BFGS-B.
|
89
81
|
test_files: []
|
data/.clang-format
DELETED
@@ -1,149 +0,0 @@
|
|
1
|
-
---
|
2
|
-
Language: Cpp
|
3
|
-
# BasedOnStyle: LLVM
|
4
|
-
AccessModifierOffset: -2
|
5
|
-
AlignAfterOpenBracket: Align
|
6
|
-
AlignConsecutiveMacros: false
|
7
|
-
AlignConsecutiveAssignments: false
|
8
|
-
AlignConsecutiveBitFields: false
|
9
|
-
AlignConsecutiveDeclarations: false
|
10
|
-
AlignEscapedNewlines: Right
|
11
|
-
AlignOperands: Align
|
12
|
-
AlignTrailingComments: true
|
13
|
-
AllowAllArgumentsOnNextLine: true
|
14
|
-
AllowAllConstructorInitializersOnNextLine: true
|
15
|
-
AllowAllParametersOfDeclarationOnNextLine: true
|
16
|
-
AllowShortEnumsOnASingleLine: true
|
17
|
-
AllowShortBlocksOnASingleLine: Never
|
18
|
-
AllowShortCaseLabelsOnASingleLine: false
|
19
|
-
AllowShortFunctionsOnASingleLine: All
|
20
|
-
AllowShortLambdasOnASingleLine: All
|
21
|
-
AllowShortIfStatementsOnASingleLine: Never
|
22
|
-
AllowShortLoopsOnASingleLine: false
|
23
|
-
AlwaysBreakAfterDefinitionReturnType: None
|
24
|
-
AlwaysBreakAfterReturnType: None
|
25
|
-
AlwaysBreakBeforeMultilineStrings: false
|
26
|
-
AlwaysBreakTemplateDeclarations: MultiLine
|
27
|
-
BinPackArguments: true
|
28
|
-
BinPackParameters: true
|
29
|
-
BraceWrapping:
|
30
|
-
AfterCaseLabel: false
|
31
|
-
AfterClass: false
|
32
|
-
AfterControlStatement: Never
|
33
|
-
AfterEnum: false
|
34
|
-
AfterFunction: false
|
35
|
-
AfterNamespace: false
|
36
|
-
AfterObjCDeclaration: false
|
37
|
-
AfterStruct: false
|
38
|
-
AfterUnion: false
|
39
|
-
AfterExternBlock: false
|
40
|
-
BeforeCatch: false
|
41
|
-
BeforeElse: false
|
42
|
-
BeforeLambdaBody: false
|
43
|
-
BeforeWhile: false
|
44
|
-
IndentBraces: false
|
45
|
-
SplitEmptyFunction: true
|
46
|
-
SplitEmptyRecord: true
|
47
|
-
SplitEmptyNamespace: true
|
48
|
-
BreakBeforeBinaryOperators: None
|
49
|
-
BreakBeforeBraces: Attach
|
50
|
-
BreakBeforeInheritanceComma: false
|
51
|
-
BreakInheritanceList: BeforeColon
|
52
|
-
BreakBeforeTernaryOperators: true
|
53
|
-
BreakConstructorInitializersBeforeComma: false
|
54
|
-
BreakConstructorInitializers: BeforeColon
|
55
|
-
BreakAfterJavaFieldAnnotations: false
|
56
|
-
BreakStringLiterals: true
|
57
|
-
ColumnLimit: 128
|
58
|
-
CommentPragmas: '^ IWYU pragma:'
|
59
|
-
CompactNamespaces: false
|
60
|
-
ConstructorInitializerAllOnOneLineOrOnePerLine: false
|
61
|
-
ConstructorInitializerIndentWidth: 4
|
62
|
-
ContinuationIndentWidth: 4
|
63
|
-
Cpp11BracedListStyle: true
|
64
|
-
DeriveLineEnding: true
|
65
|
-
DerivePointerAlignment: false
|
66
|
-
DisableFormat: false
|
67
|
-
ExperimentalAutoDetectBinPacking: false
|
68
|
-
FixNamespaceComments: true
|
69
|
-
ForEachMacros:
|
70
|
-
- foreach
|
71
|
-
- Q_FOREACH
|
72
|
-
- BOOST_FOREACH
|
73
|
-
IncludeBlocks: Preserve
|
74
|
-
IncludeCategories:
|
75
|
-
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
|
76
|
-
Priority: 2
|
77
|
-
SortPriority: 0
|
78
|
-
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
|
79
|
-
Priority: 3
|
80
|
-
SortPriority: 0
|
81
|
-
- Regex: '.*'
|
82
|
-
Priority: 1
|
83
|
-
SortPriority: 0
|
84
|
-
IncludeIsMainRegex: '(Test)?$'
|
85
|
-
IncludeIsMainSourceRegex: ''
|
86
|
-
IndentCaseLabels: false
|
87
|
-
IndentCaseBlocks: false
|
88
|
-
IndentGotoLabels: true
|
89
|
-
IndentPPDirectives: None
|
90
|
-
IndentExternBlock: AfterExternBlock
|
91
|
-
IndentWidth: 2
|
92
|
-
IndentWrappedFunctionNames: false
|
93
|
-
InsertTrailingCommas: None
|
94
|
-
JavaScriptQuotes: Leave
|
95
|
-
JavaScriptWrapImports: true
|
96
|
-
KeepEmptyLinesAtTheStartOfBlocks: true
|
97
|
-
MacroBlockBegin: ''
|
98
|
-
MacroBlockEnd: ''
|
99
|
-
MaxEmptyLinesToKeep: 1
|
100
|
-
NamespaceIndentation: None
|
101
|
-
ObjCBinPackProtocolList: Auto
|
102
|
-
ObjCBlockIndentWidth: 2
|
103
|
-
ObjCBreakBeforeNestedBlockParam: true
|
104
|
-
ObjCSpaceAfterProperty: false
|
105
|
-
ObjCSpaceBeforeProtocolList: true
|
106
|
-
PenaltyBreakAssignment: 2
|
107
|
-
PenaltyBreakBeforeFirstCallParameter: 19
|
108
|
-
PenaltyBreakComment: 300
|
109
|
-
PenaltyBreakFirstLessLess: 120
|
110
|
-
PenaltyBreakString: 1000
|
111
|
-
PenaltyBreakTemplateDeclaration: 10
|
112
|
-
PenaltyExcessCharacter: 1000000
|
113
|
-
PenaltyReturnTypeOnItsOwnLine: 60
|
114
|
-
PointerAlignment: Left
|
115
|
-
ReflowComments: true
|
116
|
-
SortIncludes: true
|
117
|
-
SortUsingDeclarations: true
|
118
|
-
SpaceAfterCStyleCast: false
|
119
|
-
SpaceAfterLogicalNot: false
|
120
|
-
SpaceAfterTemplateKeyword: true
|
121
|
-
SpaceBeforeAssignmentOperators: true
|
122
|
-
SpaceBeforeCpp11BracedList: false
|
123
|
-
SpaceBeforeCtorInitializerColon: true
|
124
|
-
SpaceBeforeInheritanceColon: true
|
125
|
-
SpaceBeforeParens: ControlStatements
|
126
|
-
SpaceBeforeRangeBasedForLoopColon: true
|
127
|
-
SpaceInEmptyBlock: false
|
128
|
-
SpaceInEmptyParentheses: false
|
129
|
-
SpacesBeforeTrailingComments: 1
|
130
|
-
SpacesInAngles: false
|
131
|
-
SpacesInConditionalStatement: false
|
132
|
-
SpacesInContainerLiterals: true
|
133
|
-
SpacesInCStyleCastParentheses: false
|
134
|
-
SpacesInParentheses: false
|
135
|
-
SpacesInSquareBrackets: false
|
136
|
-
SpaceBeforeSquareBrackets: false
|
137
|
-
Standard: Latest
|
138
|
-
StatementMacros:
|
139
|
-
- Q_UNUSED
|
140
|
-
- QT_REQUIRE_VERSION
|
141
|
-
TabWidth: 8
|
142
|
-
UseCRLF: false
|
143
|
-
UseTab: Never
|
144
|
-
WhitespaceSensitiveMacros:
|
145
|
-
- STRINGIZE
|
146
|
-
- PP_STRINGIZE
|
147
|
-
- BOOST_PP_STRINGIZE
|
148
|
-
...
|
149
|
-
|
data/.github/workflows/build.yml
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
name: build
|
2
|
-
|
3
|
-
on: [push, pull_request]
|
4
|
-
|
5
|
-
jobs:
|
6
|
-
build:
|
7
|
-
runs-on: ubuntu-latest
|
8
|
-
strategy:
|
9
|
-
matrix:
|
10
|
-
ruby: [ '2.6', '2.7', '3.0' ]
|
11
|
-
steps:
|
12
|
-
- uses: actions/checkout@v2
|
13
|
-
- name: Set up Ruby ${{ matrix.ruby }}
|
14
|
-
uses: ruby/setup-ruby@v1
|
15
|
-
with:
|
16
|
-
ruby-version: ${{ matrix.ruby }}
|
17
|
-
bundler-cache: true
|
18
|
-
- name: Build and test with Rake
|
19
|
-
run: bundle exec rake
|
data/.gitignore
DELETED
data/.rspec
DELETED
data/.yardopts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
--exclude ext/lbfgsb/src/
|
data/Gemfile
DELETED
data/Rakefile
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
require 'bundler/gem_tasks'
|
2
|
-
require 'rspec/core/rake_task'
|
3
|
-
|
4
|
-
RSpec::Core::RakeTask.new(:spec)
|
5
|
-
|
6
|
-
require 'rake/extensiontask'
|
7
|
-
|
8
|
-
task :build => :compile
|
9
|
-
|
10
|
-
Rake::ExtensionTask.new('lbfgsbext') do |ext|
|
11
|
-
ext.ext_dir = 'ext/lbfgsb'
|
12
|
-
ext.lib_dir = 'lib/lbfgsb'
|
13
|
-
end
|
14
|
-
|
15
|
-
task :default => [:clobber, :compile, :spec]
|
data/Steepfile
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
target :lib do
|
2
|
-
signature "sig", "sig-deps"
|
3
|
-
#
|
4
|
-
check "lib" # Directory name
|
5
|
-
# check "Gemfile" # File name
|
6
|
-
# check "app/models/**/*.rb" # Glob
|
7
|
-
# # ignore "lib/templates/*.rb"
|
8
|
-
#
|
9
|
-
# # library "pathname", "set" # Standard libraries
|
10
|
-
# library "numo-narray" # Gems
|
11
|
-
end
|
12
|
-
|
13
|
-
# target :spec do
|
14
|
-
# signature "sig", "sig-private"
|
15
|
-
#
|
16
|
-
# check "spec"
|
17
|
-
#
|
18
|
-
# # library "pathname", "set" # Standard libraries
|
19
|
-
# # library "rspec"
|
20
|
-
# end
|
data/lbfgsb.gemspec
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
require_relative 'lib/lbfgsb/version'
|
2
|
-
|
3
|
-
Gem::Specification.new do |spec|
|
4
|
-
spec.name = 'lbfgsb'
|
5
|
-
spec.version = Lbfgsb::VERSION
|
6
|
-
spec.authors = ['yoshoku']
|
7
|
-
spec.email = ['yoshoku@outlook.com']
|
8
|
-
|
9
|
-
spec.summary = 'Lbfgsb.rb is a Ruby binding for L-BFGS-B.'
|
10
|
-
spec.description = <<~MSG
|
11
|
-
Lbfgsb.rb is a Ruby binding for L-BFGS-B that is a limited-memory algorithm for
|
12
|
-
solving large nonlinear optimization problems subject to simple bounds on the variables.
|
13
|
-
MSG
|
14
|
-
spec.homepage = 'https://github.com/yoshoku/lbfgsb.rb'
|
15
|
-
spec.license = 'BSD-3-Clause'
|
16
|
-
|
17
|
-
spec.metadata['homepage_uri'] = spec.homepage
|
18
|
-
spec.metadata['source_code_uri'] = 'https://github.com/yoshoku/lbfgsb.rb'
|
19
|
-
spec.metadata['changelog_uri'] = 'https://github.com/yoshoku/lbfgsb.rb/blob/main/CHANGELOG.md'
|
20
|
-
spec.metadata['documentation_uri'] = 'https://yoshoku.github.io/lbfgsb.rb/doc/'
|
21
|
-
|
22
|
-
# Specify which files should be added to the gem when it is released.
|
23
|
-
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
24
|
-
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
25
|
-
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features|sig-deps)/}) }
|
26
|
-
end
|
27
|
-
spec.bindir = 'exe'
|
28
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
29
|
-
spec.require_paths = ['lib']
|
30
|
-
spec.extensions = ['ext/lbfgsb/extconf.rb']
|
31
|
-
|
32
|
-
spec.add_runtime_dependency 'numo-narray', '>= 0.9.1'
|
33
|
-
end
|