gsl-nmatrix 1.15.3.0 → 1.15.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +2 -1
- data/VERSION +1 -1
- data/ext/linalg.c +8 -7
- data/ext/linalg_complex.c +5 -4
- data/ext/ool.c +4 -3
- data/ext/vector_complex.c +3 -2
- data/ext/vector_source.c +6 -4
- data/gsl.gemspec +1 -3
- metadata +15 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b43626870a83e8a7e0a04eab2af96b707a851b8f
|
4
|
+
data.tar.gz: ff6e9590f00392fd65f76842b5a9543967d83749
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cec8f3f95384e69c663b7cedd7af90069c8a5d398f372f0c298fe83de4ffd5ad98d65cf7be8564d6cc5d206aa05b8b5cd99bcae9b37f6424ab40be3aa14428d7
|
7
|
+
data.tar.gz: 800da140e98f0a93786e16855123441e029af93ca2b823c95ffea316e24cc66a65d936c6f6733610b02d20ac0a70b24f3dfb1462259d5a3ab92a521851a5c3e1
|
data/Gemfile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.15.3.
|
1
|
+
1.15.3.1
|
data/ext/linalg.c
CHANGED
@@ -14,6 +14,7 @@
|
|
14
14
|
#include "rb_gsl_array.h"
|
15
15
|
#include "rb_gsl_common.h"
|
16
16
|
#include "rb_gsl_linalg.h"
|
17
|
+
#include "porting.h"
|
17
18
|
|
18
19
|
static VALUE cgsl_matrix_LU;
|
19
20
|
static VALUE cgsl_matrix_QR;
|
@@ -71,7 +72,7 @@ static VALUE rb_gsl_linalg_LU_decomposition(int argc, VALUE *argv, VALUE obj, in
|
|
71
72
|
Data_Get_Struct(omatrix, gsl_matrix, mtmp);
|
72
73
|
if (flag == LINALG_DECOMP_BANG) {
|
73
74
|
m = mtmp;
|
74
|
-
|
75
|
+
rb_obj_reveal(omatrix, cgsl_matrix_LU);
|
75
76
|
objm = omatrix;
|
76
77
|
} else {
|
77
78
|
m = make_matrix_clone(mtmp);
|
@@ -692,7 +693,7 @@ static VALUE rb_gsl_linalg_QR_LQ_decomposition(int argc, VALUE *argv, VALUE obj,
|
|
692
693
|
fdecomp = &gsl_linalg_QR_decomp;
|
693
694
|
m = mtmp;
|
694
695
|
mdecomp = omatrix;
|
695
|
-
|
696
|
+
rb_obj_reveal(mdecomp, cgsl_matrix_QR);
|
696
697
|
break;
|
697
698
|
#ifdef GSL_1_6_LATER
|
698
699
|
case LINALG_LQ_DECOMP:
|
@@ -704,7 +705,7 @@ static VALUE rb_gsl_linalg_QR_LQ_decomposition(int argc, VALUE *argv, VALUE obj,
|
|
704
705
|
fdecomp = &gsl_linalg_LQ_decomp;
|
705
706
|
m = mtmp;
|
706
707
|
mdecomp = omatrix;
|
707
|
-
|
708
|
+
rb_obj_reveal(mdecomp, cgsl_matrix_LQ);
|
708
709
|
break;
|
709
710
|
#endif
|
710
711
|
default:
|
@@ -731,7 +732,7 @@ static VALUE rb_gsl_linalg_QR_LQ_decomposition(int argc, VALUE *argv, VALUE obj,
|
|
731
732
|
vtau = Data_Wrap_Struct(cgsl_vector_tau, 0, gsl_vector_free, tau);
|
732
733
|
return rb_ary_new3(2, mdecomp, vtau);
|
733
734
|
} else {
|
734
|
-
|
735
|
+
rb_obj_reveal(argv[itmp], cgsl_vector_tau);
|
735
736
|
return mdecomp;
|
736
737
|
}
|
737
738
|
break;
|
@@ -740,7 +741,7 @@ static VALUE rb_gsl_linalg_QR_LQ_decomposition(int argc, VALUE *argv, VALUE obj,
|
|
740
741
|
if (argc == itmp) {
|
741
742
|
return Data_Wrap_Struct(cgsl_vector_tau, 0, gsl_vector_free, tau);
|
742
743
|
} else {
|
743
|
-
|
744
|
+
rb_obj_reveal(argv[itmp], cgsl_vector_tau);
|
744
745
|
return INT2FIX(status);
|
745
746
|
}
|
746
747
|
break;
|
@@ -1628,14 +1629,14 @@ static VALUE rb_gsl_linalg_QRLQPT_decomp_bang(int argc, VALUE *argv, VALUE obj,
|
|
1628
1629
|
norm = gsl_vector_alloc(size0);
|
1629
1630
|
switch (flag) {
|
1630
1631
|
case LINALG_QRPT:
|
1631
|
-
|
1632
|
+
rb_obj_reveal(vA, cgsl_matrix_QRPT);
|
1632
1633
|
vtau = Data_Wrap_Struct(cgsl_vector_tau, 0, gsl_vector_free, tau);
|
1633
1634
|
vp = Data_Wrap_Struct(cgsl_permutation, 0, gsl_permutation_free, p);
|
1634
1635
|
gsl_linalg_QRPT_decomp(A, tau, p, &signum, norm);
|
1635
1636
|
break;
|
1636
1637
|
#ifdef GSL_1_6_LATER
|
1637
1638
|
case LINALG_PTLQ:
|
1638
|
-
|
1639
|
+
rb_obj_reveal(vA, cgsl_matrix_PTLQ);
|
1639
1640
|
vtau = Data_Wrap_Struct(cgsl_vector_tau, 0, gsl_vector_free, tau);
|
1640
1641
|
vp = Data_Wrap_Struct(cgsl_permutation, 0, gsl_permutation_free, p);
|
1641
1642
|
gsl_linalg_PTLQ_decomp(A, tau, p, &signum, norm);
|
data/ext/linalg_complex.c
CHANGED
@@ -14,6 +14,7 @@
|
|
14
14
|
#include "rb_gsl_array.h"
|
15
15
|
#include "rb_gsl_common.h"
|
16
16
|
#include "rb_gsl_linalg.h"
|
17
|
+
#include "porting.h"
|
17
18
|
|
18
19
|
EXTERN VALUE mgsl_linalg;
|
19
20
|
EXTERN VALUE cgsl_complex;
|
@@ -51,8 +52,8 @@ VALUE rb_gsl_linalg_complex_LU_decomp(int argc, VALUE *argv, VALUE obj)
|
|
51
52
|
case 0:
|
52
53
|
p = gsl_permutation_alloc(size);
|
53
54
|
gsl_linalg_complex_LU_decomp(m, p, &signum);
|
54
|
-
if (itmp == 1)
|
55
|
-
else
|
55
|
+
if (itmp == 1) rb_obj_reveal(argv[0], cgsl_matrix_complex_LU);
|
56
|
+
else rb_obj_reveal(obj, cgsl_matrix_complex_LU);
|
56
57
|
obj2 = Data_Wrap_Struct(cgsl_permutation, 0, gsl_permutation_free, p);
|
57
58
|
return rb_ary_new3(2, obj2, INT2FIX(signum));
|
58
59
|
break;
|
@@ -60,8 +61,8 @@ VALUE rb_gsl_linalg_complex_LU_decomp(int argc, VALUE *argv, VALUE obj)
|
|
60
61
|
CHECK_PERMUTATION(argv[itmp]);
|
61
62
|
Data_Get_Struct(argv[itmp], gsl_permutation, p);
|
62
63
|
gsl_linalg_complex_LU_decomp(m, p, &signum);
|
63
|
-
if (itmp == 1)
|
64
|
-
else
|
64
|
+
if (itmp == 1) rb_obj_reveal(argv[0], cgsl_matrix_complex_LU);
|
65
|
+
else rb_obj_reveal(obj, cgsl_matrix_complex_LU);
|
65
66
|
return INT2FIX(signum);
|
66
67
|
break;
|
67
68
|
default:
|
data/ext/ool.c
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
#include "rb_gsl.h"
|
3
3
|
#include "rb_gsl_array.h"
|
4
4
|
#include <ool/ool_conmin.h>
|
5
|
+
#include "porting.h"
|
5
6
|
|
6
7
|
static VALUE cool_conmin_function;
|
7
8
|
static VALUE cool_conmin_constraint;
|
@@ -770,7 +771,7 @@ static VALUE rb_ool_conmin_pgrad_parameters_default(VALUE klass)
|
|
770
771
|
VALUE ary;
|
771
772
|
ool_conmin_parameters_default(ool_conmin_minimizer_pgrad, (void*) &P);
|
772
773
|
ary = create_parameters_ary_pgrad(&P);
|
773
|
-
|
774
|
+
rb_obj_reveal(ary, cool_conmin_pgrad_parameters);
|
774
775
|
return ary;
|
775
776
|
}
|
776
777
|
|
@@ -780,7 +781,7 @@ static VALUE rb_ool_conmin_spg_parameters_default(VALUE klass)
|
|
780
781
|
VALUE ary;
|
781
782
|
ool_conmin_parameters_default(ool_conmin_minimizer_spg, (void*) &P);
|
782
783
|
ary = create_parameters_ary_spg(&P);
|
783
|
-
|
784
|
+
rb_obj_reveal(ary, cool_conmin_spg_parameters);
|
784
785
|
return ary;
|
785
786
|
}
|
786
787
|
|
@@ -790,7 +791,7 @@ static VALUE rb_ool_conmin_gencan_parameters_default(VALUE klass)
|
|
790
791
|
VALUE ary;
|
791
792
|
ool_conmin_parameters_default(ool_conmin_minimizer_gencan, (void*) &P);
|
792
793
|
ary = create_parameters_ary_gencan(&P);
|
793
|
-
|
794
|
+
rb_obj_reveal(ary, cool_conmin_gencan_parameters);
|
794
795
|
return ary;
|
795
796
|
}
|
796
797
|
|
data/ext/vector_complex.c
CHANGED
@@ -11,6 +11,7 @@
|
|
11
11
|
#include "rb_gsl_config.h"
|
12
12
|
#include "rb_gsl_array.h"
|
13
13
|
#include "rb_gsl_complex.h"
|
14
|
+
#include "porting.h"
|
14
15
|
|
15
16
|
EXTERN VALUE cgsl_complex;
|
16
17
|
static VALUE rb_gsl_vector_complex_inner_product(int argc, VALUE *argv, VALUE obj);
|
@@ -939,9 +940,9 @@ static VALUE rb_gsl_vector_complex_trans(VALUE obj)
|
|
939
940
|
static VALUE rb_gsl_vector_complex_trans2(VALUE obj)
|
940
941
|
{
|
941
942
|
if (CLASS_OF(obj) == cgsl_vector_complex)
|
942
|
-
|
943
|
+
rb_obj_reveal(obj, cgsl_vector_complex_col);
|
943
944
|
else if (CLASS_OF(obj) == cgsl_vector_complex_col)
|
944
|
-
|
945
|
+
rb_obj_reveal(obj, cgsl_vector_complex);
|
945
946
|
else {
|
946
947
|
rb_raise(rb_eRuntimeError, "method trans! for %s is forbidden",
|
947
948
|
rb_class2name(CLASS_OF(obj)));
|
data/ext/vector_source.c
CHANGED
@@ -36,6 +36,8 @@
|
|
36
36
|
#define VEC_VIEW_P VECTOR_INT_VIEW_P
|
37
37
|
#endif
|
38
38
|
|
39
|
+
#include "porting.h"
|
40
|
+
|
39
41
|
void FUNCTION(get_range,beg_en_n)(VALUE range, BASE *beg, BASE *en, size_t *n, int *step);
|
40
42
|
|
41
43
|
void get_range_beg_en_n_for_size(VALUE range,
|
@@ -673,15 +675,15 @@ static VALUE FUNCTION(rb_gsl_vector,trans)(VALUE obj)
|
|
673
675
|
static VALUE FUNCTION(rb_gsl_vector,trans_bang)(VALUE obj)
|
674
676
|
{
|
675
677
|
#ifdef BASE_DOUBLE
|
676
|
-
if (CLASS_OF(obj) == cgsl_vector)
|
677
|
-
else if (CLASS_OF(obj) == cgsl_vector_col)
|
678
|
+
if (CLASS_OF(obj) == cgsl_vector) rb_obj_reveal(obj, cgsl_vector_col);
|
679
|
+
else if (CLASS_OF(obj) == cgsl_vector_col) rb_obj_reveal(obj, cgsl_vector);
|
678
680
|
else {
|
679
681
|
rb_raise(rb_eRuntimeError, "method trans! for %s is not permitted.",
|
680
682
|
rb_class2name(CLASS_OF(obj)));
|
681
683
|
}
|
682
684
|
#elif defined(BASE_INT)
|
683
|
-
if (CLASS_OF(obj) == cgsl_vector_int)
|
684
|
-
else if (CLASS_OF(obj) == cgsl_vector_int_col)
|
685
|
+
if (CLASS_OF(obj) == cgsl_vector_int) rb_obj_reveal(obj, cgsl_vector_int_col);
|
686
|
+
else if (CLASS_OF(obj) == cgsl_vector_int_col) rb_obj_reveal(obj, cgsl_vector_int);
|
685
687
|
else {
|
686
688
|
rb_raise(rb_eRuntimeError, "method trans! for %s is not permitted.",
|
687
689
|
rb_class2name(CLASS_OF(obj)));
|
data/gsl.gemspec
CHANGED
@@ -12,14 +12,12 @@ Gem::Specification.new do |gem|
|
|
12
12
|
|
13
13
|
gem.files = `git ls-files`.split("\n")
|
14
14
|
gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
15
|
-
#gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
16
15
|
gem.extensions = %w[ ext/extconf.rb ]
|
17
16
|
gem.require_paths = ["lib", "lib/gsl", "lib/ool", "ext"]
|
18
17
|
|
19
18
|
gem.required_ruby_version = '>= 1.8.1'
|
20
19
|
|
21
|
-
gem.add_dependency 'nmatrix',
|
22
|
-
# gem.add_dependency 'narray', '>= 0.5.9'
|
20
|
+
gem.add_dependency 'nmatrix', '>=0.1.0.rc5'
|
23
21
|
|
24
22
|
gem.has_rdoc = true
|
25
23
|
gem.rdoc_options = [
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gsl-nmatrix
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.15.3.
|
4
|
+
version: 1.15.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yoshiki Tsunesada
|
@@ -11,22 +11,22 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2014-08-01 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: nmatrix
|
18
18
|
requirement: !ruby/object:Gem::Requirement
|
19
19
|
requirements:
|
20
|
-
- -
|
20
|
+
- - ">="
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 0.0.
|
22
|
+
version: 0.1.0.rc5
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
|
-
- -
|
27
|
+
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.0.
|
29
|
+
version: 0.1.0.rc5
|
30
30
|
description: Ruby/GSL is a Ruby interface to the GNU Scientific Library, for numerical
|
31
31
|
computing with Ruby
|
32
32
|
email: y-tsunesada@mm.em-net.ne.jp
|
@@ -35,7 +35,7 @@ extensions:
|
|
35
35
|
- ext/extconf.rb
|
36
36
|
extra_rdoc_files: []
|
37
37
|
files:
|
38
|
-
- .gitignore
|
38
|
+
- ".gitignore"
|
39
39
|
- AUTHORS
|
40
40
|
- COPYING
|
41
41
|
- ChangeLog
|
@@ -644,15 +644,15 @@ licenses: []
|
|
644
644
|
metadata: {}
|
645
645
|
post_install_message:
|
646
646
|
rdoc_options:
|
647
|
-
- --title
|
647
|
+
- "--title"
|
648
648
|
- Ruby/GSL
|
649
|
-
- --main
|
649
|
+
- "--main"
|
650
650
|
- rdoc/index.rdoc
|
651
|
-
- --exclude
|
651
|
+
- "--exclude"
|
652
652
|
- ext/
|
653
|
-
- --exclude
|
653
|
+
- "--exclude"
|
654
654
|
- include/
|
655
|
-
- --exclude
|
655
|
+
- "--exclude"
|
656
656
|
- lib/
|
657
657
|
require_paths:
|
658
658
|
- lib
|
@@ -661,17 +661,17 @@ require_paths:
|
|
661
661
|
- ext
|
662
662
|
required_ruby_version: !ruby/object:Gem::Requirement
|
663
663
|
requirements:
|
664
|
-
- -
|
664
|
+
- - ">="
|
665
665
|
- !ruby/object:Gem::Version
|
666
666
|
version: 1.8.1
|
667
667
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
668
668
|
requirements:
|
669
|
-
- -
|
669
|
+
- - ">="
|
670
670
|
- !ruby/object:Gem::Version
|
671
671
|
version: '0'
|
672
672
|
requirements: []
|
673
673
|
rubyforge_project:
|
674
|
-
rubygems_version: 2.0
|
674
|
+
rubygems_version: 2.2.0
|
675
675
|
signing_key:
|
676
676
|
specification_version: 4
|
677
677
|
summary: Ruby interface to GNU Scientific Library (NMatrix fork)
|