ruby-mpfi 0.0.7 → 0.0.8

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.
Files changed (34) hide show
  1. checksums.yaml +7 -0
  2. data/Rakefile +13 -1
  3. data/ext/mpfi/extconf.rb +2 -11
  4. data/ext/mpfi/ruby_mpfi.c +8 -4
  5. data/ext/mpfi_complex/mpfi/extconf.rb +2 -10
  6. data/ext/mpfi_matrix/mpfi/extconf.rb +3 -13
  7. data/ext/mpfi_matrix/mpfi/ruby_mpfi_matrix.c +39 -23
  8. data/lib/mpfi/matrix.rb +3 -1
  9. data/lib/mpfi/version.rb +1 -1
  10. data/ruby-mpfi.gemspec +1 -0
  11. data/spec/mpfi/marshal_spec.rb +1 -1
  12. data/spec/mpfi/mpfi_alloc_spec.rb +1 -1
  13. data/spec/mpfi/mpfi_diam_arithmetic_spec.rb +1 -1
  14. data/spec/mpfi/mpfi_interval_arithmetic_spec.rb +1 -1
  15. data/spec/mpfi/mpfi_interval_functions_spec.rb +1 -1
  16. data/spec/mpfi/mpfi_math_functions_spec.rb +1 -1
  17. data/spec/mpfi/mpfi_set_operation_spec.rb +1 -1
  18. data/spec/mpfi/ruby-mpfi_spec.rb +1 -1
  19. data/spec/mpfi/string_spec.rb +1 -1
  20. data/spec/mpfi_matrix/mpfi_matrix_alloc_spec.rb +1 -1
  21. data/spec/mpfi_matrix/mpfi_matrix_arithmetic_spec.rb +1 -1
  22. data/spec/mpfi_matrix/mpfi_matrix_interval_func_spec.rb +1 -1
  23. data/spec/mpfi_matrix/mpfi_matrix_marshal_spec.rb +1 -1
  24. data/spec/mpfi_matrix/mpfi_matrix_set_element_spec.rb +1 -1
  25. data/spec/mpfi_matrix/mpfi_matrix_set_operation_spec.rb +1 -1
  26. data/spec/mpfi_matrix/mpfi_matrix_string_spec.rb +1 -1
  27. data/spec/mpfi_matrix/mpfi_matrix_subdivision_spec.rb +1 -1
  28. data/spec/mpfi_matrix/mpfi_square_matrix_spec.rb +1 -1
  29. data/spec/mpfi_matrix/mpfi_vector_spec.rb +1 -1
  30. data/spec/spec_helper.rb +16 -0
  31. metadata +46 -26
  32. data/spec/mpfi/spec_helper.rb +0 -15
  33. data/spec/mpfi_complex/spec_helper.rb +0 -10
  34. data/spec/mpfi_matrix/spec_helper.rb +0 -19
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 6efa0f0c3f082031b2e3fe14f1f059652c18bbb9
4
+ data.tar.gz: 97842b406542fca878ec4a426b96a3f1ba16acbb
5
+ SHA512:
6
+ metadata.gz: 3bf8455347b813d2add7ea012b2429e0045425b3f9bcacbb752f3e4a620743b44f6019a3d63f16f59d567eef099f8f26cdaf93d2523ce3d28412850195974547
7
+ data.tar.gz: eebd797e769d6d6a5ab112091747a1922aa7b0b24f656e2d50dc6c088137adae315124fc5bc2743a19f192df9f7f861bc2f46216679e9cb50280a9f39355b7c0
data/Rakefile CHANGED
@@ -1,2 +1,14 @@
1
1
  require "bundler/gem_tasks"
2
- require 'mpfr/rake_compile'
2
+
3
+ require "extconf_task"
4
+ ExtconfTask.new
5
+
6
+ require "rspec/core/rake_task"
7
+ RSpec::Core::RakeTask.new do |t|
8
+ t.pattern = 'spec/**/*_spec.rb'
9
+ end
10
+
11
+ require "yard"
12
+ YARD::Rake::YardocTask.new do |t|
13
+ t.files = ["lib/**/*.rb", "lib/**/ext/**/*.c"]
14
+ end
data/ext/mpfi/extconf.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require 'mkmf'
2
+ require "extconf_task/mkmf_utils"
2
3
 
3
4
  i = 0
4
5
  while i < ARGV.size
@@ -20,16 +21,6 @@ dir_config("mpfr")
20
21
  dir_config("mpfi")
21
22
  dir_config("gmp")
22
23
  if have_header('mpfr.h') && have_library('mpfr') && have_header('mpfi.h') && have_library('mpfi') && have_header('gmp.h') && have_library('gmp')
23
-
24
- ruby_mpfr_header_dir = nil
25
- begin
26
- require "rubygems"
27
- spec = Gem::Specification.find_by_name("ruby-mpfr")
28
- ruby_mpfr_header_dir = File.join(spec.full_gem_path, 'ext/mpfr')
29
- rescue LoadError
30
- end
31
- unless find_header("ruby_mpfr.h", ruby_mpfr_header_dir)
32
- header_not_found("ruby_mpfr.h")
33
- end
24
+ find_header_in_gem("ruby_mpfr.h", "ruby-mpfr")
34
25
  create_makefile("mpfi")
35
26
  end
data/ext/mpfi/ruby_mpfi.c CHANGED
@@ -1131,18 +1131,22 @@ void r_mpfi_subdivision_func(int num, MPFI *ret[], mpfi_t x)
1131
1131
  /* Return array having MPFI instances by subdividing. */
1132
1132
  static VALUE r_mpfi_subdivision (int argc, VALUE *argv, VALUE self)
1133
1133
  {
1134
- MPFI *ptr_self;
1134
+ MPFI *ptr_self, **f;
1135
1135
  int i, num, prec;
1136
+ VALUE *vf, ret;
1136
1137
  r_mpfi_get_struct(ptr_self, self);
1137
1138
  num = NUM2INT(argv[0]);
1138
1139
  prec = r_mpfr_prec_from_optional_argument(1, 2, argc, argv);
1139
- MPFI *f[num];
1140
- VALUE vf[num];
1140
+ vf = ALLOC_N(VALUE, num);
1141
+ f = ALLOC_N(MPFI*, num);
1141
1142
  for(i = 0; i < num; i++){
1142
1143
  r_mpfi_make_struct_init2(vf[i], f[i], prec);
1143
1144
  }
1144
1145
  r_mpfi_subdivision_func(num, f, ptr_self);
1145
- return rb_ary_new4(num, vf);
1146
+ ret = rb_ary_new4(num, vf);
1147
+ free(vf);
1148
+ free(f);
1149
+ return ret;
1146
1150
  }
1147
1151
  /* ------------------------------ Miscellaneous Interval Functions end ------------------------------ */
1148
1152
 
@@ -1,4 +1,5 @@
1
1
  require 'mkmf'
2
+ require "extconf_task/mkmf_utils"
2
3
 
3
4
  i = 0
4
5
  while i < ARGV.size
@@ -20,16 +21,7 @@ dir_config("mpfr")
20
21
  dir_config("mpfi")
21
22
  dir_config("gmp")
22
23
  if have_header('mpfr.h') && have_library('mpfr') && have_header('gmp.h') && have_library('gmp')
23
- ruby_mpfr_header_dir = nil
24
- begin
25
- require "rubygems"
26
- spec = Gem::Specification.find_by_name("ruby-mpfr")
27
- ruby_mpfr_header_dir = File.join(spec.full_gem_path, 'ext/mpfr')
28
- rescue LoadError
29
- end
30
- unless find_header("ruby_mpfr.h", ruby_mpfr_header_dir)
31
- header_not_found("ruby_mpfr.h")
32
- end
24
+ find_header_in_gem("ruby_mpfr.h", "ruby-mpfr")
33
25
  find_header("ruby_mpfi.h", File.join(File.dirname(__FILE__), "../../mpfi"))
34
26
  create_makefile("mpfi/complex")
35
27
  end
@@ -1,4 +1,5 @@
1
1
  require 'mkmf'
2
+ require "extconf_task/mkmf_utils"
2
3
 
3
4
  i = 0
4
5
  while i < ARGV.size
@@ -19,19 +20,8 @@ dir_config('mpfi')
19
20
  dir_config('gmp')
20
21
 
21
22
  if have_header('mpfr.h') && have_library('mpfr') && have_header('mpfi.h') && have_library('mpfi') && have_header('gmp.h') && have_library('gmp')
22
- ruby_mpfr_dir = nil
23
- begin
24
- require "rubygems"
25
- spec = Gem::Specification.find_by_name("ruby-mpfr")
26
- ruby_mpfr_dir = File.join(spec.full_gem_path, 'ext')
27
- rescue LoadError
28
- end
29
- unless find_header("ruby_mpfr.h", File.join(ruby_mpfr_dir, 'mpfr'))
30
- header_not_found("ruby_mpfr.h")
31
- end
32
- unless find_header("ruby_mpfr_matrix.h", File.join(ruby_mpfr_dir, 'mpfr_matrix/mpfr'))
33
- header_not_found("ruby_mpfr_matrix.h")
34
- end
23
+ find_header_in_gem("ruby_mpfr.h", "ruby-mpfr")
24
+ find_header_in_gem("ruby_mpfr_matrix.h", "ruby-mpfr")
35
25
  find_header("ruby_mpfi.h", File.join(File.dirname(__FILE__), "../../mpfi"))
36
26
  create_makefile("mpfi/matrix")
37
27
  end
@@ -418,18 +418,19 @@ static VALUE r_mpfi_matrix_each_element_with_index (VALUE self){
418
418
  static VALUE r_mpfi_matrix_str_ary_for_inspect(VALUE self){
419
419
  MPFIMatrix *ptr_self;
420
420
  char *tmp_str;
421
- r_mpfi_get_matrix_struct(ptr_self, self);
422
- VALUE ret_val[ptr_self->size];
421
+ VALUE ret_ary;
423
422
  int i;
423
+ r_mpfi_get_matrix_struct(ptr_self, self);
424
+ ret_ary = rb_ary_new2(ptr_self->size);
424
425
  for (i = 0; i < ptr_self->size; i++) {
425
426
  if(!mpfr_asprintf(&tmp_str, "%.Re %.Re",
426
427
  r_mpfi_left_ptr((ptr_self->data + i)), r_mpfi_right_ptr(ptr_self->data + i))) {
427
428
  rb_raise(rb_eFatal, "Can not allocate a string by mpfr_asprintf.");
428
429
  }
429
- ret_val[i] = rb_str_new2(tmp_str);
430
+ rb_ary_store(ret_ary, i, rb_str_new2(tmp_str));
430
431
  mpfr_free_str(tmp_str);
431
432
  }
432
- return rb_ary_new4(ptr_self->size, ret_val);
433
+ return ret_ary;
433
434
  }
434
435
 
435
436
  /* Return two dimensinal array which has strings converted elements to. */
@@ -437,8 +438,9 @@ static VALUE r_mpfi_matrix_str_ary_for_inspect2(VALUE self){
437
438
  MPFIMatrix *ptr_self;
438
439
  char *tmp_str;
439
440
  int i, j;
441
+ VALUE *ary, ret_ary;
440
442
  r_mpfi_get_matrix_struct(ptr_self, self);
441
- VALUE ary[ptr_self->row];
443
+ ary = ALLOC_N(VALUE, ptr_self->row);
442
444
  for(i = 0; i < ptr_self->row; i++){
443
445
  ary[i] = rb_ary_new();
444
446
  }
@@ -452,15 +454,18 @@ static VALUE r_mpfi_matrix_str_ary_for_inspect2(VALUE self){
452
454
  mpfr_free_str(tmp_str);
453
455
  }
454
456
  }
455
- return rb_ary_new4(ptr_self->row, ary);
457
+ ret_ary = rb_ary_new4(ptr_self->row, ary);
458
+ free(ary);
459
+ return ret_ary;
456
460
  }
457
461
 
458
462
  static VALUE r_mpfi_matrix_to_str_ary(VALUE self){
459
463
  MPFIMatrix *ptr_self;
460
464
  char *tmp_str1, *tmp_str2;
461
465
  int i, j;
466
+ VALUE *ary, ret_ary;
462
467
  r_mpfi_get_matrix_struct(ptr_self, self);
463
- VALUE ary[ptr_self->row];
468
+ ary = ALLOC_N(VALUE, ptr_self->row);
464
469
  for(i = 0; i < ptr_self->row; i++){
465
470
  ary[i] = rb_ary_new();
466
471
  }
@@ -477,16 +482,19 @@ static VALUE r_mpfi_matrix_to_str_ary(VALUE self){
477
482
  mpfr_free_str(tmp_str2);
478
483
  }
479
484
  }
480
- return rb_ary_new4(ptr_self->row, ary);
485
+ ret_ary = rb_ary_new4(ptr_self->row, ary);
486
+ free(ary);
487
+ return ret_ary;
481
488
  }
482
489
 
483
490
  static VALUE r_mpfi_matrix_to_strf_ary(VALUE self, VALUE format_str){
484
491
  MPFIMatrix *ptr_self;
485
492
  char *tmp_str1, *tmp_str2, *format;
486
493
  int i, j;
494
+ VALUE *ary, ret_ary;
487
495
  r_mpfi_get_matrix_struct(ptr_self, self);
488
496
  format = StringValuePtr(format_str);
489
- VALUE ary[ptr_self->row];
497
+ ary = ALLOC_N(VALUE, ptr_self->row);
490
498
  for(i = 0; i < ptr_self->row; i++){
491
499
  ary[i] = rb_ary_new();
492
500
  }
@@ -503,25 +511,29 @@ static VALUE r_mpfi_matrix_to_strf_ary(VALUE self, VALUE format_str){
503
511
  mpfr_free_str(tmp_str2);
504
512
  }
505
513
  }
506
- return rb_ary_new4(ptr_self->row, ary);
514
+ ret_ary = rb_ary_new4(ptr_self->row, ary);
515
+ free(ary);
516
+ return ret_ary;
507
517
  }
508
518
 
509
519
  static VALUE r_mpfi_matrix_to_array(VALUE self){
510
520
  MPFIMatrix *ptr_self;
511
521
  int i;
522
+ VALUE ret_ary;
512
523
  r_mpfi_get_matrix_struct(ptr_self, self);
513
- VALUE ret_val[ptr_self->size];
524
+ ret_ary = rb_ary_new2(ptr_self->size);
514
525
  for (i = 0; i < ptr_self->size; i++) {
515
- ret_val[i] = r_mpfi_make_new_fi_obj(ptr_self->data + i);
526
+ rb_ary_store(ret_ary, i, r_mpfi_make_new_fi_obj(ptr_self->data + i));
516
527
  }
517
- return rb_ary_new4(ptr_self->size, ret_val);
528
+ return ret_ary;
518
529
  }
519
530
 
520
531
  static VALUE r_mpfi_matrix_to_array2(VALUE self){
521
532
  MPFIMatrix *ptr_self;
522
533
  int i, j;
534
+ VALUE *ary, ret_ary;
523
535
  r_mpfi_get_matrix_struct(ptr_self, self);
524
- VALUE ary[ptr_self->row];
536
+ ary = ALLOC_N(VALUE, ptr_self->row);
525
537
  for(i = 0; i < ptr_self->row; i++){
526
538
  ary[i] = rb_ary_new();
527
539
  }
@@ -530,7 +542,9 @@ static VALUE r_mpfi_matrix_to_array2(VALUE self){
530
542
  rb_ary_push(ary[j], r_mpfi_make_new_fi_obj(ptr_self->data + i + j));
531
543
  }
532
544
  }
533
- return rb_ary_new4(ptr_self->row, ary);
545
+ ret_ary = rb_ary_new4(ptr_self->row, ary);
546
+ free(ary);
547
+ return ret_ary;
534
548
  }
535
549
 
536
550
  static VALUE r_mpfi_matrix_row (VALUE self, VALUE arg) {
@@ -925,14 +939,14 @@ static VALUE r_mpfi_square_matrix_dim (VALUE self){
925
939
  /* Return [matrix_l, matrix_r, indx]. */
926
940
  static VALUE r_mpfi_square_matrix_lu_decomp (VALUE self){
927
941
  MPFIMatrix *ptr_self, *ptr_ret_l, *ptr_ret_u;
928
- VALUE ret_l, ret_u;
929
- int i, j;
942
+ VALUE ret_l, ret_u, ret, ret_indx_ary;
943
+ int i, j, *indx;
930
944
  r_mpfi_get_matrix_struct(ptr_self, self);
931
945
  r_mpfi_matrix_suitable_matrix_init (&ret_l, &ptr_ret_l, ptr_self->row, ptr_self->column);
932
946
  r_mpfi_matrix_suitable_matrix_init (&ret_u, &ptr_ret_u, ptr_self->row, ptr_self->column);
933
- VALUE ret_indx[ptr_self->row];
934
- int indx[ptr_self->row];
947
+ indx = ALLOC_N(int, ptr_self->row);
935
948
  if(mpfi_square_matrix_lu_decomp (ptr_ret_u, indx, ptr_self) >= 0){
949
+ ret_indx_ary = rb_ary_new2(ptr_self->row);
936
950
  for(i = 1; i < ptr_ret_u->row; i++){
937
951
  for(j = 0; j < i; j++){
938
952
  mpfi_set(mpfi_matrix_get_element(ptr_ret_l, i, j), mpfi_matrix_get_element(ptr_ret_u, i, j));
@@ -948,12 +962,14 @@ static VALUE r_mpfi_square_matrix_lu_decomp (VALUE self){
948
962
  }
949
963
  }
950
964
  for(i = 0; i < ptr_ret_u->row; i++){
951
- ret_indx[i] = INT2NUM(indx[i]);
965
+ rb_ary_store(ret_indx_ary, i, INT2NUM(indx[i]));
952
966
  }
953
- return rb_ary_new3(3, ret_l, ret_u, rb_ary_new4(ptr_ret_u->row, ret_indx));
954
- }else{
955
- return Qnil;
967
+ ret = rb_ary_new3(3, ret_l, ret_u, ret_indx_ary);
968
+ } else {
969
+ ret = Qnil;
956
970
  }
971
+ free(indx);
972
+ return ret;
957
973
  }
958
974
 
959
975
  static VALUE r_mpfi_square_matrix_determinant (VALUE self){
data/lib/mpfi/matrix.rb CHANGED
@@ -1,4 +1,6 @@
1
- require 'mpfi/matrix.so'
1
+ require "mpfr/matrix"
2
+ require "mpfi/matrix.so"
3
+ # If we do not load "mpfr/matrix" before load of "mpfi/matrix.so", segmentation fault error raises.
2
4
 
3
5
  class MPFI
4
6
  class Matrix
data/lib/mpfi/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class MPFI
2
- VERSION = '0.0.7'
2
+ VERSION = '0.0.8'
3
3
  end
data/ruby-mpfi.gemspec CHANGED
@@ -22,5 +22,6 @@ Gem::Specification.new do |s|
22
22
  # specify any dependencies here; for example:
23
23
  s.add_development_dependency "rspec"
24
24
  s.add_development_dependency "yard"
25
+ s.add_development_dependency "extconf-task"
25
26
  s.add_runtime_dependency "ruby-mpfr"
26
27
  end
@@ -1,4 +1,4 @@
1
- require File.expand_path(File.dirname(__FILE__)) + '/spec_helper.rb'
1
+ require_relative "../spec_helper"
2
2
 
3
3
  describe MPFI do
4
4
  context "when marshaling" do
@@ -1,4 +1,4 @@
1
- require_relative 'spec_helper'
1
+ require_relative "../spec_helper"
2
2
 
3
3
  describe MPFI, "when initializing MPFI instance" do
4
4
  before(:all) do
@@ -1,4 +1,4 @@
1
- require_relative 'spec_helper'
1
+ require_relative "../spec_helper"
2
2
 
3
3
  describe MPFI, "when puting arithmetic operation" do
4
4
  before(:all) do
@@ -1,4 +1,4 @@
1
- require_relative 'spec_helper'
1
+ require_relative "../spec_helper"
2
2
 
3
3
  #
4
4
  # To test method +, -, / and *, we calculate these operator for MPFR and MPFI
@@ -1,4 +1,4 @@
1
- require_relative 'spec_helper'
1
+ require_relative "../spec_helper"
2
2
 
3
3
  #
4
4
  # The following is test for interval functions and endpoints.
@@ -1,4 +1,4 @@
1
- require_relative 'spec_helper'
1
+ require_relative "../spec_helper"
2
2
 
3
3
  describe MPFI, "when calculating mathematical functions" do
4
4
  it "should not raise error" do
@@ -1,4 +1,4 @@
1
- require_relative 'spec_helper'
1
+ require_relative "../spec_helper"
2
2
 
3
3
  describe MPFI, "when checking inclusive relations" do
4
4
  before(:all) do
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/spec_helper.rb'
1
+ require_relative "../spec_helper"
2
2
 
3
3
  # Time to add your specs!
4
4
  # http://rspec.info/
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/spec_helper.rb'
1
+ require_relative "../spec_helper"
2
2
 
3
3
  describe MPFI, "when converting to string" do
4
4
  it "should return string created by inspect" do
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/spec_helper.rb'
1
+ require_relative "../spec_helper"
2
2
 
3
3
  #
4
4
  # 03/19/09 11:51:21
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/spec_helper.rb'
1
+ require_relative "../spec_helper"
2
2
 
3
3
  describe MPFI::Matrix, "when making matrix negative" do
4
4
  before(:all) do
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/spec_helper.rb'
1
+ require_relative "../spec_helper"
2
2
 
3
3
  describe MPFI::Matrix, "when making mid_interval" do
4
4
  before(:all) do
@@ -1,4 +1,4 @@
1
- require File.expand_path(File.dirname(__FILE__)) + '/spec_helper.rb'
1
+ require_relative "../spec_helper"
2
2
 
3
3
  describe MPFI::Matrix, "when marshaling" do
4
4
  before(:all) do
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/spec_helper.rb'
1
+ require_relative "../spec_helper"
2
2
 
3
3
  describe MPFI::Matrix, "when setting number to particular element" do
4
4
  before(:all) do
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/spec_helper.rb'
1
+ require_relative "../spec_helper"
2
2
 
3
3
  describe MPFI::Matrix, "when an interval includes other" do
4
4
  before(:all) do
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/spec_helper.rb'
1
+ require_relative "../spec_helper"
2
2
 
3
3
  describe "when MPFI instance is converted to string by some methods." do
4
4
 
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/spec_helper.rb'
1
+ require_relative "../spec_helper"
2
2
 
3
3
  describe MPFI::Matrix, "when subdividing interval" do
4
4
  before(:all) do
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/spec_helper.rb'
1
+ require_relative "../spec_helper"
2
2
 
3
3
  describe MPFI::SquareMatrix, "when calculating LU decomposition" do
4
4
  before(:all) do
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/spec_helper.rb'
1
+ require_relative "../spec_helper"
2
2
 
3
3
  describe MPFI::ColumnVector, "when creating MPFI::ColumnVector method" do
4
4
  it "should return MPFI::ColumnVector" do
@@ -0,0 +1,16 @@
1
+ require "rspec"
2
+
3
+ gem_root = File.expand_path(File.join(File.dirname(__FILE__), ".."))
4
+ $:.unshift(File.join(gem_root, "lib"))
5
+ Dir.glob(File.join(gem_root, "ext/*")).each do |dir|
6
+ $:.unshift(dir)
7
+ end
8
+
9
+ require "mpfr"
10
+ require "mpfr/rspec"
11
+ require "mpfi"
12
+ require "mpfi/complex"
13
+ require "mpfi/matrix"
14
+
15
+ require File.join(gem_root, "spec/mpfi/generate_number_module")
16
+ require File.join(gem_root, "spec/mpfi_matrix/generate_matrix_arguments")
metadata CHANGED
@@ -1,58 +1,80 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-mpfi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
5
- prerelease:
4
+ version: 0.0.8
6
5
  platform: ruby
7
6
  authors:
8
7
  - Takayuki YAMAGUCHI
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2011-08-25 00:00:00.000000000 Z
11
+ date: 2013-09-04 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rspec
16
- requirement: &19920800 !ruby/object:Gem::Requirement
17
- none: false
15
+ requirement: !ruby/object:Gem::Requirement
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :development
23
21
  prerelease: false
24
- version_requirements: *19920800
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
25
27
  - !ruby/object:Gem::Dependency
26
28
  name: yard
27
- requirement: &19920380 !ruby/object:Gem::Requirement
28
- none: false
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: extconf-task
43
+ requirement: !ruby/object:Gem::Requirement
29
44
  requirements:
30
- - - ! '>='
45
+ - - '>='
31
46
  - !ruby/object:Gem::Version
32
47
  version: '0'
33
48
  type: :development
34
49
  prerelease: false
35
- version_requirements: *19920380
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
36
55
  - !ruby/object:Gem::Dependency
37
56
  name: ruby-mpfr
38
- requirement: &19919900 !ruby/object:Gem::Requirement
39
- none: false
57
+ requirement: !ruby/object:Gem::Requirement
40
58
  requirements:
41
- - - ! '>='
59
+ - - '>='
42
60
  - !ruby/object:Gem::Version
43
61
  version: '0'
44
62
  type: :runtime
45
63
  prerelease: false
46
- version_requirements: *19919900
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
47
69
  description: Ruby bindings of MPFI that is a C library for interval arithmetic of
48
70
  multiple precision.
49
71
  email:
50
72
  - d@ytak.info
51
73
  executables: []
52
74
  extensions:
53
- - ext/mpfi_complex/mpfi/extconf.rb
54
- - ext/mpfi_matrix/mpfi/extconf.rb
55
75
  - ext/mpfi/extconf.rb
76
+ - ext/mpfi_matrix/mpfi/extconf.rb
77
+ - ext/mpfi_complex/mpfi/extconf.rb
56
78
  extra_rdoc_files: []
57
79
  files:
58
80
  - .gitignore
@@ -89,9 +111,7 @@ files:
89
111
  - spec/mpfi/mpfi_math_functions_spec.rb
90
112
  - spec/mpfi/mpfi_set_operation_spec.rb
91
113
  - spec/mpfi/ruby-mpfi_spec.rb
92
- - spec/mpfi/spec_helper.rb
93
114
  - spec/mpfi/string_spec.rb
94
- - spec/mpfi_complex/spec_helper.rb
95
115
  - spec/mpfi_matrix/generate_matrix_arguments.rb
96
116
  - spec/mpfi_matrix/mpfi_matrix_alloc_spec.rb
97
117
  - spec/mpfi_matrix/mpfi_matrix_arithmetic_spec.rb
@@ -103,9 +123,10 @@ files:
103
123
  - spec/mpfi_matrix/mpfi_matrix_subdivision_spec.rb
104
124
  - spec/mpfi_matrix/mpfi_square_matrix_spec.rb
105
125
  - spec/mpfi_matrix/mpfi_vector_spec.rb
106
- - spec/mpfi_matrix/spec_helper.rb
126
+ - spec/spec_helper.rb
107
127
  homepage: ''
108
128
  licenses: []
129
+ metadata: {}
109
130
  post_install_message:
110
131
  rdoc_options: []
111
132
  require_paths:
@@ -114,21 +135,20 @@ require_paths:
114
135
  - ext/mpfi_complex
115
136
  - ext/mpfi_matrix
116
137
  required_ruby_version: !ruby/object:Gem::Requirement
117
- none: false
118
138
  requirements:
119
- - - ! '>='
139
+ - - '>='
120
140
  - !ruby/object:Gem::Version
121
141
  version: '0'
122
142
  required_rubygems_version: !ruby/object:Gem::Requirement
123
- none: false
124
143
  requirements:
125
- - - ! '>='
144
+ - - '>='
126
145
  - !ruby/object:Gem::Version
127
146
  version: '0'
128
147
  requirements: []
129
148
  rubyforge_project: ruby-mpfi
130
- rubygems_version: 1.8.9
149
+ rubygems_version: 2.0.3
131
150
  signing_key:
132
- specification_version: 3
151
+ specification_version: 4
133
152
  summary: Ruby bindings of MPFI
134
153
  test_files: []
154
+ has_rdoc:
@@ -1,15 +0,0 @@
1
- begin
2
- require 'rspec'
3
- rescue LoadError
4
- require 'rubygems' unless ENV['NO_RUBYGEMS']
5
- gem 'rspec'
6
- require 'rspec'
7
- end
8
-
9
- $:.unshift(File.dirname(__FILE__) + '/../lib')
10
-
11
- require 'pp'
12
- require 'mpfr'
13
- require 'mpfr/rspec'
14
- require_relative '../../ext/mpfi/mpfi.so'
15
- require "#{File.dirname(File.expand_path(__FILE__))}/generate_number_module.rb"
@@ -1,10 +0,0 @@
1
- begin
2
- require 'rspec'
3
- rescue LoadError
4
- require 'rubygems' unless ENV['NO_RUBYGEMS']
5
- gem 'rspec'
6
- require 'rspec'
7
- end
8
-
9
- $:.unshift(File.dirname(__FILE__) + '/../lib')
10
- require 'mpfi'
@@ -1,19 +0,0 @@
1
- begin
2
- require 'rspec'
3
- rescue LoadError
4
- require 'rubygems' unless ENV['NO_RUBYGEMS']
5
- gem 'rspec'
6
- require 'rspec'
7
- end
8
-
9
- $:.unshift(File.dirname(__FILE__) + '/../../lib')
10
- $:.unshift(*Dir.glob(File.dirname(__FILE__) + '/../../ext/*'))
11
- $:.unshift(File.dirname(__FILE__))
12
-
13
- require 'mpfr'
14
- require 'mpfr/matrix'
15
- require 'mpfi'
16
- require 'mpfi/complex'
17
- require 'mpfi/matrix'
18
- require "generate_matrix_arguments"
19
-