ruby-dcl 1.6.2
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +321 -0
- data/GenWrapper/Makefile +14 -0
- data/GenWrapper/cproto2init.rb +41 -0
- data/GenWrapper/dcl_narrayed_funcs.rb +181 -0
- data/GenWrapper/dcl_rb_footing +29 -0
- data/GenWrapper/dcl_rb_heading +129 -0
- data/GenWrapper/def.rb +20 -0
- data/GenWrapper/elim_ary_size.rb +398 -0
- data/GenWrapper/etc/Mk_proto +375 -0
- data/GenWrapper/etc/dcl_gen +13 -0
- data/GenWrapper/etc/p_header +63 -0
- data/GenWrapper/etc/p_init +410 -0
- data/GenWrapper/pparse.rb +137 -0
- data/GenWrapper/proto/Makefile +35 -0
- data/GenWrapper/proto/grph1_00 +17 -0
- data/GenWrapper/proto/grph1_csgi.fp +27 -0
- data/GenWrapper/proto/grph1_scpack.fp +442 -0
- data/GenWrapper/proto/grph1_sgpack.fp +1406 -0
- data/GenWrapper/proto/grph1_slpack.fp +316 -0
- data/GenWrapper/proto/grph1_stpack.fp +411 -0
- data/GenWrapper/proto/grph1_swpack.fp +746 -0
- data/GenWrapper/proto/grph2_00 +16 -0
- data/GenWrapper/proto/grph2_grpack.fp +139 -0
- data/GenWrapper/proto/grph2_ucpack.fp +522 -0
- data/GenWrapper/proto/grph2_udpack.fp +692 -0
- data/GenWrapper/proto/grph2_uepack.fp +601 -0
- data/GenWrapper/proto/grph2_ugpack.fp +436 -0
- data/GenWrapper/proto/grph2_uhpack.fp +246 -0
- data/GenWrapper/proto/grph2_ulpack.fp +516 -0
- data/GenWrapper/proto/grph2_umpack.fp +676 -0
- data/GenWrapper/proto/grph2_uspack.fp +989 -0
- data/GenWrapper/proto/grph2_uupack.fp +663 -0
- data/GenWrapper/proto/grph2_uvpack.fp +246 -0
- data/GenWrapper/proto/grph2_uwpack.fp +203 -0
- data/GenWrapper/proto/grph2_uxpack.fp +295 -0
- data/GenWrapper/proto/grph2_uypack.fp +295 -0
- data/GenWrapper/proto/grph2_uzpack.fp +574 -0
- data/GenWrapper/proto/math1_00 +12 -0
- data/GenWrapper/proto/math1_blklib.fp +58 -0
- data/GenWrapper/proto/math1_chrlib.fp +83 -0
- data/GenWrapper/proto/math1_fnclib.fp +79 -0
- data/GenWrapper/proto/math1_gnmlib.fp +118 -0
- data/GenWrapper/proto/math1_gt2dlib.fp +144 -0
- data/GenWrapper/proto/math1_ifalib.fp +123 -0
- data/GenWrapper/proto/math1_indxlib.fp +222 -0
- data/GenWrapper/proto/math1_intlib.fp +46 -0
- data/GenWrapper/proto/math1_lrllib.fp +276 -0
- data/GenWrapper/proto/math1_maplib.fp +24 -0
- data/GenWrapper/proto/math1_oslib.fp +28 -0
- data/GenWrapper/proto/math1_rfalib.fp +420 -0
- data/GenWrapper/proto/math1_rfblib.fp +51 -0
- data/GenWrapper/proto/math1_sublib.fp +60 -0
- data/GenWrapper/proto/math1_syslib.fp +767 -0
- data/GenWrapper/proto/math1_vialib.fp +339 -0
- data/GenWrapper/proto/math1_viblib.fp +264 -0
- data/GenWrapper/proto/math1_vralib.fp +339 -0
- data/GenWrapper/proto/math1_vrblib.fp +264 -0
- data/GenWrapper/proto/math1_xfclib.fp +68 -0
- data/GenWrapper/proto/math2_00 +12 -0
- data/GenWrapper/proto/math2_fftlib.fp +803 -0
- data/GenWrapper/proto/math2_intrlib.fp +32 -0
- data/GenWrapper/proto/math2_odelib.fp_notused +568 -0
- data/GenWrapper/proto/math2_rnmlib.fp +54 -0
- data/GenWrapper/proto/math2_shtlib.fp +1292 -0
- data/GenWrapper/proto/math2_shtlib.fp_old +1294 -0
- data/GenWrapper/proto/math2_vstlib.fp +84 -0
- data/GenWrapper/proto/misc1_00 +17 -0
- data/GenWrapper/proto/misc1_chnlib.fp +47 -0
- data/GenWrapper/proto/misc1_datelib.fp +352 -0
- data/GenWrapper/proto/misc1_fmtlib.fp +19 -0
- data/GenWrapper/proto/misc1_misclib.fp +26 -0
- data/GenWrapper/proto/misc1_randlib.fp +36 -0
- data/GenWrapper/proto/misc1_timelib.fp +151 -0
- data/GenWrapper/proto2c.rb +13 -0
- data/GenWrapper/prototype.rb +209 -0
- data/GenWrapper/util.rb +9 -0
- data/GenWrapper/variable.rb +671 -0
- data/README +29 -0
- data/Rakefile +44 -0
- data/ToDo +2 -0
- data/dcl_cary2obj.c +354 -0
- data/dcl_narrayed_funcs.c +518 -0
- data/dcl_obj2cary.c +512 -0
- data/dcl_rubydcloriginal.c +129 -0
- data/demo/gokuraku/hop/hop.rb +26 -0
- data/demo/gokuraku/jump/jump1.rb +64 -0
- data/demo/gokuraku/jump/jump2.rb +50 -0
- data/demo/gokuraku/layout/lay1.rb +46 -0
- data/demo/gokuraku/layout/lay2.rb +44 -0
- data/demo/gokuraku/step/step0.rb +34 -0
- data/demo/gokuraku/step/step1.rb +84 -0
- data/demo/gokuraku/step/step2.rb +62 -0
- data/demo/gokuraku/u1d/u1d1.rb +37 -0
- data/demo/gokuraku/u1d/u1d2.rb +50 -0
- data/demo/gokuraku/u2d/u2d1.rb +46 -0
- data/demo/gokuraku/u2d/u2d2.rb +49 -0
- data/demo/gokuraku/u2d/u2d3.rb +45 -0
- data/demo/gokuraku/u2d/u2d4.rb +61 -0
- data/demo/grph1/scpack/scpkt2.rb +40 -0
- data/demo/grph1/scpack/scpkt3.rb +102 -0
- data/demo/grph1/scpack/scpkt6.rb +84 -0
- data/demo/grph1/scpack/scpkt7.rb +59 -0
- data/demo/grph1/scpack/scpkt8.rb +60 -0
- data/demo/grph1/scpack/t810630.dat +296 -0
- data/demo/grph1/scpack/t811231.dat +296 -0
- data/demo/grph1/sgpack/sgfont.rb +52 -0
- data/demo/grph1/sgpack/sgfonz.rb +53 -0
- data/demo/grph1/sgpack/sgksx1.rb +44 -0
- data/demo/grph1/sgpack/sgksx2.rb +90 -0
- data/demo/grph1/sgpack/sgksx3.rb +75 -0
- data/demo/grph1/sgpack/sglidx.rb +40 -0
- data/demo/grph1/sgpack/sgltyp.rb +48 -0
- data/demo/grph1/sgpack/sgpk01.rb +39 -0
- data/demo/grph1/sgpack/sgpk02.rb +79 -0
- data/demo/grph1/sgpack/sgpk03.rb +107 -0
- data/demo/grph1/sgpack/sgpk04.rb +86 -0
- data/demo/grph1/sgpack/sgpk05.rb +66 -0
- data/demo/grph1/sgpack/sgpk06.rb +91 -0
- data/demo/grph1/sgpack/sgpk07.rb +66 -0
- data/demo/grph1/sgpack/sgpk08.rb +67 -0
- data/demo/grph1/sgpack/sgpk09.rb +61 -0
- data/demo/grph1/sgpack/sgpk10.rb +58 -0
- data/demo/grph1/sgpack/sgtclr.rb +59 -0
- data/demo/grph1/sgpack/sgtone.rb +70 -0
- data/demo/grph1/sgpack/sgtonz.rb +66 -0
- data/demo/grph1/slpack/slpk01.rb +37 -0
- data/demo/grph1/slpack/slpk02.rb +29 -0
- data/demo/grph1/slpack/slpk03.rb +36 -0
- data/demo/grph1/slpack/slpk04.rb +36 -0
- data/demo/grph2/g2pack/g2pk01.rb +78 -0
- data/demo/grph2/g2pack/g2pk02.rb +75 -0
- data/demo/grph2/grpack/grpk01.rb +65 -0
- data/demo/grph2/ucpack/ucpk01.rb +95 -0
- data/demo/grph2/ucpack/ucpk02.rb +95 -0
- data/demo/grph2/udegpk/u2df01.rb +50 -0
- data/demo/grph2/udegpk/u2df02.rb +76 -0
- data/demo/grph2/udegpk/u2df03.rb +80 -0
- data/demo/grph2/udegpk/u2df04.rb +52 -0
- data/demo/grph2/udegpk/u2df05.rb +70 -0
- data/demo/grph2/udegpk/u2df06.rb +59 -0
- data/demo/grph2/udegpk/u2df07.rb +68 -0
- data/demo/grph2/udegpk/u2df08.rb +91 -0
- data/demo/grph2/udegpk/u2df09b.rb +88 -0
- data/demo/grph2/udegpk/u2df09c.rb +89 -0
- data/demo/grph2/udegpk/u2df09e.rb +88 -0
- data/demo/grph2/udegpk/u2df09f.rb +89 -0
- data/demo/grph2/ulpack/ulpk01.rb +111 -0
- data/demo/grph2/ulpack/ulpk01n.rb +111 -0
- data/demo/grph2/ulpack/ulpk02.rb +111 -0
- data/demo/grph2/ulpack/ulpk02n.rb +111 -0
- data/demo/grph2/umpack/t811231.dat +296 -0
- data/demo/grph2/umpack/test01.rb +69 -0
- data/demo/grph2/umpack/test02.rb +64 -0
- data/demo/grph2/umpack/test03.rb +84 -0
- data/demo/grph2/umpack/test04.rb +54 -0
- data/demo/grph2/umpack/test05.rb +85 -0
- data/demo/grph2/umpack/test06.rb +44 -0
- data/demo/grph2/umpack/test07.rb +43 -0
- data/demo/grph2/umpack/test08.rb +37 -0
- data/demo/grph2/umpack/test09.rb +86 -0
- data/demo/grph2/umpack/test10.rb +52 -0
- data/demo/grph2/umpack/umpk01.rb +65 -0
- data/demo/grph2/umpack/umpk02.rb +54 -0
- data/demo/grph2/umpack/umpk03.rb +46 -0
- data/demo/grph2/umpack/umpk04.rb +65 -0
- data/demo/grph2/umpack/umpk05.rb +84 -0
- data/demo/grph2/uspack/uspk01.rb +39 -0
- data/demo/grph2/uspack/uspk02.rb +47 -0
- data/demo/grph2/uspack/uspk03.rb +38 -0
- data/demo/grph2/uspack/uspk04.rb +64 -0
- data/demo/grph2/uspack/uspk05.rb +68 -0
- data/demo/grph2/uspack/uspk06.rb +43 -0
- data/demo/grph2/uspack/uspk07.rb +62 -0
- data/demo/grph2/uspack/uspk08.rb +46 -0
- data/demo/grph2/uspack/uspk09.rb +89 -0
- data/demo/grph2/uspack/uspk10.rb +48 -0
- data/demo/grph2/uspack/uspk11.rb +71 -0
- data/demo/grph2/uspack/uspk12.rb +51 -0
- data/demo/grph2/uupack/uupk01.rb +50 -0
- data/demo/grph2/uupack/uupk02.rb +74 -0
- data/demo/grph2/uupack/uupk03.rb +56 -0
- data/demo/grph2/uupack/uupk04.rb +84 -0
- data/demo/grph2/uupack/uupk05.rb +74 -0
- data/demo/grph2/uupack/uupk06.rb +77 -0
- data/demo/grph2/uupack/uupk07.rb +88 -0
- data/demo/grph2/uxyzpk/uxyz01.rb +38 -0
- data/demo/grph2/uxyzpk/uxyz02.rb +36 -0
- data/demo/grph2/uxyzpk/uxyz03.rb +37 -0
- data/demo/grph2/uxyzpk/uxyz04.rb +54 -0
- data/demo/grph2/uxyzpk/uxyz05.rb +41 -0
- data/demo/grph2/uxyzpk/uxyz06.rb +42 -0
- data/demo/grph2/uxyzpk/uxyz07.rb +38 -0
- data/demo/grph2/uxyzpk/uxyz08.rb +60 -0
- data/demo/grph2/uxyzpk/uxyz09.rb +52 -0
- data/demo/grph2/uxyzpk/uxyz10.rb +57 -0
- data/demo/grph2/ximage/MEMO +23 -0
- data/demo/grph2/ximage/tomsclm.dat +1344 -0
- data/demo/grph2/ximage/ximg01.rb +145 -0
- data/demo/math1/gt2dlib/gt2d01.rb +33 -0
- data/demo/math2/fftlib/fftl01.rb +28 -0
- data/demo/math2/fftlib/fftl02.rb +224 -0
- data/demo/math2/intrlib/intr01.rb +22 -0
- data/demo/math2/rnmlib/rnml01.rb +21 -0
- data/demo/math2/vstlib/vstl01.rb +29 -0
- data/demo/math2/vstlib/vstl02.rb +38 -0
- data/demo/rakuraku/color/color1.rb +61 -0
- data/demo/rakuraku/color/color2.rb +57 -0
- data/demo/rakuraku/color/color3.rb +81 -0
- data/demo/rakuraku/kihon/kihon1.rb +39 -0
- data/demo/rakuraku/kihon/kihon2.rb +56 -0
- data/demo/rakuraku/kihon/kihon3.rb +57 -0
- data/demo/rakuraku/kihon/kihon4.rb +70 -0
- data/demo/rakuraku/kihon/kihon5.rb +56 -0
- data/demo/rakuraku/kihon/kihon6.rb +40 -0
- data/demo/rakuraku/kihon/kihon7.rb +98 -0
- data/demo/rakuraku/kihon/kihon8.rb +93 -0
- data/demo/rakuraku/kihon/kihon9.rb +77 -0
- data/demo/rakuraku/kihon/kihona.rb +123 -0
- data/demo/rakuraku/kihon/kihonb.rb +73 -0
- data/demo/rakuraku/kihon/kihonc.rb +110 -0
- data/demo/rakuraku/layout/lay1.rb +29 -0
- data/demo/rakuraku/layout/lay2.rb +28 -0
- data/demo/rakuraku/layout/lay3.rb +29 -0
- data/demo/rakuraku/map3d/map3d1.rb +68 -0
- data/demo/rakuraku/map3d/map3d2.rb +67 -0
- data/demo/rakuraku/map3d/map3d3.rb +66 -0
- data/demo/rakuraku/map3d/map3d4.rb +107 -0
- data/demo/rakuraku/map3d/map3d5.rb +118 -0
- data/demo/rakuraku/map3d/map3d6.rb +96 -0
- data/demo/rakuraku/map3d/map3d7.rb +98 -0
- data/demo/rakuraku/miss/miss1.rb +76 -0
- data/demo/rakuraku/miss/miss2.rb +60 -0
- data/demo/rakuraku/quick/quick1.rb +35 -0
- data/demo/rakuraku/quick/quick2.rb +33 -0
- data/demo/rakuraku/quick/quick3.rb +46 -0
- data/demo/rakuraku/quick/quick4.rb +47 -0
- data/demo/rakuraku/quick/quick5.rb +46 -0
- data/demo/rakuraku/u2d/u2d1.rb +50 -0
- data/demo/rakuraku/u2d/u2d2.rb +51 -0
- data/demo/rakuraku/u2d/u2d3.rb +70 -0
- data/demo/rakuraku/u2d/u2d4.rb +59 -0
- data/demo/rakuraku/u2d/u2d5.rb +61 -0
- data/demo/rakuraku/u2d/u2d6.rb +57 -0
- data/demo/rakuraku/u2d/u2d7.rb +103 -0
- data/demo/rakuraku/uspack/uspac1.rb +35 -0
- data/demo/rakuraku/uspack/uspac2.rb +66 -0
- data/demo/rakuraku/uspack/uspac3.rb +37 -0
- data/demo/rakuraku/uspack/uspac4.rb +49 -0
- data/demo/rakuraku/uxyz/uxyz1.rb +37 -0
- data/demo/rakuraku/uxyz/uxyz2.rb +35 -0
- data/demo/rakuraku/uxyz/uxyz3.rb +38 -0
- data/demo/rakuraku/uxyz/uxyz4.rb +36 -0
- data/demo/rakuraku/uxyz/uxyz5.rb +57 -0
- data/demo/rakuraku/uxyz/uxyz6.rb +43 -0
- data/demo/rakuraku/uxyz/uxyz7.rb +39 -0
- data/demo/rakuraku/uxyz/uxyz8.rb +56 -0
- data/demo/rubydcloriginal/uemrkz1.rb +37 -0
- data/dummy.c +9 -0
- data/extconf.rb +133 -0
- data/grph1_csgi.c +119 -0
- data/grph1_scpack.c +1388 -0
- data/grph1_sgpack.c +3876 -0
- data/grph1_slpack.c +432 -0
- data/grph1_stpack.c +1044 -0
- data/grph1_swpack.c +1922 -0
- data/grph1_zgpack.c.org +141 -0
- data/grph2_grpack.c +368 -0
- data/grph2_ucpack.c +1232 -0
- data/grph2_udpack.c +1404 -0
- data/grph2_uepack.c +1443 -0
- data/grph2_ugpack.c +1073 -0
- data/grph2_uhpack.c +943 -0
- data/grph2_ulpack.c +1304 -0
- data/grph2_umpack.c +1540 -0
- data/grph2_uspack.c +2481 -0
- data/grph2_uupack.c +1689 -0
- data/grph2_uvpack.c +943 -0
- data/grph2_uwpack.c +552 -0
- data/grph2_uxpack.c +555 -0
- data/grph2_uypack.c +555 -0
- data/grph2_uzpack.c +1455 -0
- data/init.c.default +187 -0
- data/init.c.gtk +189 -0
- data/lib/dcl.rb +5084 -0
- data/math1_blklib.c +227 -0
- data/math1_chrlib.c +239 -0
- data/math1_fnclib.c +254 -0
- data/math1_gnmlib.c +356 -0
- data/math1_gt2dlib.c +514 -0
- data/math1_ifalib.c +427 -0
- data/math1_indxlib.c +709 -0
- data/math1_intlib.c +167 -0
- data/math1_lrllib.c +817 -0
- data/math1_maplib.c +172 -0
- data/math1_oslib.c +111 -0
- data/math1_rfalib.c +1417 -0
- data/math1_rfblib.c +232 -0
- data/math1_sublib.c +221 -0
- data/math1_syslib.c +2025 -0
- data/math1_vialib.c +1156 -0
- data/math1_viblib.c +1027 -0
- data/math1_vralib.c +1156 -0
- data/math1_vrblib.c +1027 -0
- data/math1_xfclib.c +142 -0
- data/math2_fftlib.c +833 -0
- data/math2_intrlib.c +138 -0
- data/math2_rnmlib.c +226 -0
- data/math2_shtlib.c +1568 -0
- data/math2_vstlib.c +366 -0
- data/misc1_chnlib.c +179 -0
- data/misc1_datelib.c +953 -0
- data/misc1_fmtlib.c +99 -0
- data/misc1_misclib.c +118 -0
- data/misc1_randlib.c +142 -0
- data/misc1_timelib.c +380 -0
- data/obsolete/README +2 -0
- data/obsolete/dcl_ext.html +112 -0
- data/obsolete/dcl_ext.rb +313 -0
- metadata +433 -0
data/README
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
|
2
|
+
RubyDCL -- a ruby interface to the DCL library
|
3
|
+
|
4
|
+
by T. Horinouchi, K. Goto, and K. Kuroi, T Koshiro
|
5
|
+
|
6
|
+
Last Updated: Feb 24, 2011 by T Horinouchi
|
7
|
+
|
8
|
+
* WHAT IS THIS?
|
9
|
+
|
10
|
+
This is a one-to-one wrapper to a scientific graphic library DCL
|
11
|
+
(http://www.gfd-dennou.org/arch/dcl/).
|
12
|
+
|
13
|
+
* DOCUMENTATION
|
14
|
+
|
15
|
+
Documentation of this library is distributed sepately, since it is
|
16
|
+
very big. You can download it from the following addresses.
|
17
|
+
|
18
|
+
Jappanese Documentation:
|
19
|
+
http://ruby.gfd-dennou.org/products/ruby-dcl/ruby-dcl-doc.tar.gz
|
20
|
+
English Documentation:
|
21
|
+
http://ruby.gfd-dennou.org/products/ruby-dcl/ruby-dcl-Edoc.tar.gz
|
22
|
+
|
23
|
+
The documentation is available on the web:
|
24
|
+
|
25
|
+
http://ruby.gfd-dennou.org/products/ruby-dcl/
|
26
|
+
|
27
|
+
* INSTALLATION (dependent software)
|
28
|
+
|
29
|
+
See http://ruby.gfd-dennou.org/products/ruby-dcl/#installation
|
data/Rakefile
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
require 'rake/gempackagetask'
|
2
|
+
|
3
|
+
NAME = 'ruby-dcl'
|
4
|
+
VER = '1.6.2'
|
5
|
+
|
6
|
+
PKG_FILES = FileList[
|
7
|
+
'**',
|
8
|
+
'lib/**',
|
9
|
+
'GenWrapper/**/**',
|
10
|
+
'obsolete/**',
|
11
|
+
'demo/**/**'
|
12
|
+
]
|
13
|
+
#gem_load_dir = Gem.default_dir
|
14
|
+
|
15
|
+
spec = Gem::Specification.new do |s|
|
16
|
+
s.name = NAME
|
17
|
+
s.version = VER
|
18
|
+
s.authors = ["T. Horinouchi", "K. Kuroi", "K. Goto"\
|
19
|
+
,"S. Nishizawa", "T. Koshiro",'GFD Dennou Club']
|
20
|
+
s.email = 'eriko@gfd-dennou.org'
|
21
|
+
s.homepage = \
|
22
|
+
'http://www.gfd-dennou.org/arch/ruby/products/ruby-dcl/'
|
23
|
+
s.licenses = ["GFD Dennou Club"]
|
24
|
+
s.platform = Gem::Platform::RUBY
|
25
|
+
s.summary = 'one-to-one interface to the DCL graphic library'
|
26
|
+
s.description = 'RubyDCL is a ruby interface to the scientific graphic library DCL. It supports all the subroutines and functions in DCL on a one-to-one basis. '
|
27
|
+
s.files = PKG_FILES.to_a
|
28
|
+
s.require_paths = ['lib']
|
29
|
+
#s.test_files = Dir.glob("test/*")
|
30
|
+
s.has_rdoc = true
|
31
|
+
s.required_ruby_version = Gem::Requirement.new(">= 1.6")
|
32
|
+
s.add_runtime_dependency(%q<narray>, [">= 0.5.5"])
|
33
|
+
s.add_runtime_dependency(%q<narray_miss>, [">= 0"])
|
34
|
+
s.add_runtime_dependency(%q<gtk2>, [">= 0"])
|
35
|
+
#s.extra_rdoc_files = ['README']
|
36
|
+
|
37
|
+
#-- extensions
|
38
|
+
s.extensions << "extconf.rb"
|
39
|
+
end
|
40
|
+
|
41
|
+
Rake::GemPackageTask.new(spec) do |pkg|
|
42
|
+
pkg.gem_spec = spec
|
43
|
+
pkg.need_tar = true
|
44
|
+
end
|
data/ToDo
ADDED
data/dcl_cary2obj.c
ADDED
@@ -0,0 +1,354 @@
|
|
1
|
+
/*
|
2
|
+
* dcl_cary2obj.c
|
3
|
+
* $Id: dcl_cary2obj.c,v 1.1.1.1 2011-02-23 07:21:26 horinout Exp $
|
4
|
+
*/
|
5
|
+
|
6
|
+
#include <math.h>
|
7
|
+
#include "ruby.h"
|
8
|
+
#include "libtinyf2c.h"
|
9
|
+
#include "narray.h" /* kuro: depend on numarray.so */
|
10
|
+
|
11
|
+
|
12
|
+
/* functions */
|
13
|
+
VALUE dcl_ccharary2obj(char *, int, int);
|
14
|
+
VALUE dcl_cintegerary2obj(integer *, int, int, int *);
|
15
|
+
VALUE dcl_crealary2obj(real *, int, int, int *);
|
16
|
+
VALUE dcl_ccomplexary2obj(complex *, int, char *);
|
17
|
+
VALUE dcl_clogicalary2obj(logical *, int, int, int *);
|
18
|
+
|
19
|
+
static VALUE ccharary2ary(char *, int, int);
|
20
|
+
static VALUE cintegerary2ary(integer *, int);
|
21
|
+
static VALUE crealary2ary(real *, int);
|
22
|
+
static VALUE clogicalary2ary(logical *, int);
|
23
|
+
/* not inplemented
|
24
|
+
static VALUE ccomplexary2ary(complex *, int);
|
25
|
+
*/
|
26
|
+
|
27
|
+
/* kuro: depend on numarray.so */
|
28
|
+
static VALUE crealary2na(real *, int, int, int *);
|
29
|
+
static VALUE clogicalary2na(logical *, int, int, int *);
|
30
|
+
static VALUE cintegerary2na(integer *, int, int, int *);
|
31
|
+
/* not implemented
|
32
|
+
static VALUE ccomplexary2na(complex *, int, char *);
|
33
|
+
*/
|
34
|
+
|
35
|
+
|
36
|
+
/*
|
37
|
+
* dcl_cxxxary2obj() : convert c xxx type array to ruby object
|
38
|
+
* dcl_ccharary2obj()
|
39
|
+
* dcl_cintegerary2obj()
|
40
|
+
* dcl_crealary2obj()
|
41
|
+
* dcl_ccomplexary2obj() : not implemented
|
42
|
+
* dcl_clogicalary2obj()
|
43
|
+
*/
|
44
|
+
VALUE
|
45
|
+
dcl_ccharary2obj(cary, size, len)
|
46
|
+
char *cary;
|
47
|
+
int size;
|
48
|
+
int len;
|
49
|
+
{
|
50
|
+
VALUE obj;
|
51
|
+
|
52
|
+
obj = ccharary2ary(cary, size, len);
|
53
|
+
|
54
|
+
return obj;
|
55
|
+
}
|
56
|
+
|
57
|
+
VALUE
|
58
|
+
dcl_cintegerary2obj(cary, size, rank, shape)
|
59
|
+
integer *cary;
|
60
|
+
int size;
|
61
|
+
int rank;
|
62
|
+
int *shape;
|
63
|
+
{
|
64
|
+
VALUE obj;
|
65
|
+
|
66
|
+
/* if ( rank == 1 ) {
|
67
|
+
obj = cintegerary2ary(cary, size);
|
68
|
+
} else { */
|
69
|
+
obj = cintegerary2na(cary, size, rank, shape);
|
70
|
+
/*}*/
|
71
|
+
|
72
|
+
return obj;
|
73
|
+
}
|
74
|
+
|
75
|
+
VALUE
|
76
|
+
dcl_crealary2obj(cary, size, rank, shape)
|
77
|
+
real *cary;
|
78
|
+
int size;
|
79
|
+
int rank;
|
80
|
+
int *shape;
|
81
|
+
{
|
82
|
+
VALUE obj;
|
83
|
+
|
84
|
+
/* if ( rank == 1 ) {
|
85
|
+
obj = crealary2ary(cary, size);
|
86
|
+
} else { */
|
87
|
+
obj = crealary2na(cary, size, rank, shape);
|
88
|
+
/*}*/
|
89
|
+
|
90
|
+
return obj;
|
91
|
+
}
|
92
|
+
|
93
|
+
/* not implemented
|
94
|
+
VALUE
|
95
|
+
dcl_ccomplexary2obj(cary, size, type)
|
96
|
+
complex *cary;
|
97
|
+
int size;
|
98
|
+
char *type;
|
99
|
+
{
|
100
|
+
VALUE obj;
|
101
|
+
|
102
|
+
if ((type == NULL) || ( *type == '\0' )) {
|
103
|
+
obj = ccomplexary2ary(cary, size);
|
104
|
+
} else {
|
105
|
+
obj = ccomplexary2na(cary, size, type);
|
106
|
+
}
|
107
|
+
|
108
|
+
return obj;
|
109
|
+
}
|
110
|
+
*/
|
111
|
+
|
112
|
+
VALUE
|
113
|
+
dcl_clogicalary2obj(cary, size, rank, shape)
|
114
|
+
logical *cary;
|
115
|
+
int size;
|
116
|
+
int rank;
|
117
|
+
int *shape;
|
118
|
+
{
|
119
|
+
VALUE obj;
|
120
|
+
|
121
|
+
obj = clogicalary2ary(cary, size);
|
122
|
+
|
123
|
+
/*if ( rank == 0) {
|
124
|
+
obj = clogicalary2ary(cary, size);
|
125
|
+
} else {*/
|
126
|
+
obj = clogicalary2na(cary, size, rank, shape);
|
127
|
+
/*}*/
|
128
|
+
|
129
|
+
return obj;
|
130
|
+
}
|
131
|
+
|
132
|
+
|
133
|
+
/*
|
134
|
+
* cxxxary2ary() : convert c xxx type array to Array object
|
135
|
+
* called by cxxxary2obj()
|
136
|
+
* ccharary2ary()
|
137
|
+
* cintegerary2ary()
|
138
|
+
* crealary2ary()
|
139
|
+
* ccomplexary2ary() : not implemented
|
140
|
+
* clogicalary2ary()
|
141
|
+
*/
|
142
|
+
static VALUE
|
143
|
+
ccharary2ary(cary, size, len)
|
144
|
+
char *cary;
|
145
|
+
int size;
|
146
|
+
int len;
|
147
|
+
{
|
148
|
+
VALUE obj, item;
|
149
|
+
char *buf, *hd, *ed;
|
150
|
+
int i, j;
|
151
|
+
|
152
|
+
if (cary == NULL)
|
153
|
+
rb_raise(rb_eRuntimeError, "cannot create Array");
|
154
|
+
|
155
|
+
obj = rb_ary_new2(size/len);
|
156
|
+
buf = ALLOCA_N(char, len+1);
|
157
|
+
hd = cary;
|
158
|
+
for (i = 0; i < size/len; i++) {
|
159
|
+
j = len - 1;
|
160
|
+
ed = hd + j;
|
161
|
+
while ((j >= 0) && (*ed == ' ' || *ed == '\0')) {
|
162
|
+
ed--;
|
163
|
+
j--;
|
164
|
+
}
|
165
|
+
if (j >= 0) memcpy(buf, hd, j+1);
|
166
|
+
buf[j+1] = '\0';
|
167
|
+
item = rb_str_new2(buf);
|
168
|
+
rb_ary_push(obj, item);
|
169
|
+
hd += len;
|
170
|
+
}
|
171
|
+
|
172
|
+
return obj;
|
173
|
+
}
|
174
|
+
|
175
|
+
static VALUE
|
176
|
+
cintegerary2ary(cary, size)
|
177
|
+
integer *cary;
|
178
|
+
int size;
|
179
|
+
{
|
180
|
+
VALUE obj, item;
|
181
|
+
int i;
|
182
|
+
|
183
|
+
if (cary == NULL)
|
184
|
+
rb_raise(rb_eRuntimeError, "cannot create Array");
|
185
|
+
|
186
|
+
obj = rb_ary_new2(size);
|
187
|
+
|
188
|
+
for (i = 0; i < size; i++) {
|
189
|
+
item = INT2NUM(cary[i]);
|
190
|
+
rb_ary_push(obj, item);
|
191
|
+
}
|
192
|
+
|
193
|
+
return obj;
|
194
|
+
}
|
195
|
+
|
196
|
+
static VALUE
|
197
|
+
crealary2ary(cary, size)
|
198
|
+
real *cary;
|
199
|
+
int size;
|
200
|
+
{
|
201
|
+
VALUE obj, item;
|
202
|
+
int i;
|
203
|
+
|
204
|
+
if (cary == NULL)
|
205
|
+
rb_raise(rb_eRuntimeError, "cannot create Array");
|
206
|
+
|
207
|
+
obj = rb_ary_new2(size);
|
208
|
+
|
209
|
+
for (i = 0; i < size; i++) {
|
210
|
+
item = rb_float_new((double)cary[i]);
|
211
|
+
rb_ary_push(obj, item);
|
212
|
+
}
|
213
|
+
|
214
|
+
return obj;
|
215
|
+
}
|
216
|
+
|
217
|
+
/* not inplemented
|
218
|
+
static VALUE
|
219
|
+
ccomplexary2ary(cary, size)
|
220
|
+
complex *cary;
|
221
|
+
int size;
|
222
|
+
{
|
223
|
+
VALUE obj, item;
|
224
|
+
int i;
|
225
|
+
|
226
|
+
if (cary == NULL)
|
227
|
+
rb_raise(rb_eRuntimeError, "cannot create Array");
|
228
|
+
|
229
|
+
obj = rb_ary_new2(size);
|
230
|
+
|
231
|
+
for (i = 0; i < size; i++) {
|
232
|
+
item = ... cary[i];
|
233
|
+
rb_ary_push(obj, item);
|
234
|
+
}
|
235
|
+
|
236
|
+
return obj;
|
237
|
+
}
|
238
|
+
*/
|
239
|
+
|
240
|
+
static VALUE
|
241
|
+
clogicalary2ary(cary, size)
|
242
|
+
logical *cary;
|
243
|
+
int size;
|
244
|
+
{
|
245
|
+
VALUE obj, item;
|
246
|
+
int i;
|
247
|
+
|
248
|
+
if (cary == NULL)
|
249
|
+
rb_raise(rb_eRuntimeError, "cannot create Array");
|
250
|
+
|
251
|
+
obj = rb_ary_new2(size);
|
252
|
+
|
253
|
+
for (i = 0; i < size; i++) {
|
254
|
+
item = (cary[i] == FALSE_) ? Qfalse : Qtrue;
|
255
|
+
rb_ary_push(obj, item);
|
256
|
+
}
|
257
|
+
|
258
|
+
return obj;
|
259
|
+
}
|
260
|
+
|
261
|
+
|
262
|
+
/* kuro: depend on numarray.so */
|
263
|
+
/*
|
264
|
+
* cxxxary2na() : convert c xxx type array to NumArray object
|
265
|
+
* called by cxxxary2obj()
|
266
|
+
* cintegerary2na() : not implemented
|
267
|
+
* crealary2na()
|
268
|
+
* ccomplexary2na() : not implemented
|
269
|
+
* clogicalary2na()
|
270
|
+
*/
|
271
|
+
static VALUE
|
272
|
+
crealary2na(cary, size, rank, shape)
|
273
|
+
real *cary;
|
274
|
+
int size;
|
275
|
+
int rank;
|
276
|
+
int *shape;
|
277
|
+
{
|
278
|
+
VALUE obj;
|
279
|
+
struct NARRAY *na;
|
280
|
+
int i;
|
281
|
+
float *ptr;
|
282
|
+
|
283
|
+
if (cary == NULL)
|
284
|
+
rb_raise(rb_eRuntimeError, "cannot create NArray");
|
285
|
+
if (rank <= 0)
|
286
|
+
rb_raise(rb_eRuntimeError, "cannot create NArray");
|
287
|
+
|
288
|
+
obj = na_make_object(NA_SFLOAT, rank, shape, cNArray);
|
289
|
+
GetNArray(obj, na);
|
290
|
+
ptr = (float *) NA_PTR(na, 0);
|
291
|
+
|
292
|
+
for (i = 0; i < size; i++) {
|
293
|
+
ptr[i] = (float)cary[i];
|
294
|
+
}
|
295
|
+
|
296
|
+
return obj;
|
297
|
+
}
|
298
|
+
|
299
|
+
static VALUE
|
300
|
+
cintegerary2na(cary, size, rank, shape)
|
301
|
+
integer *cary;
|
302
|
+
int size;
|
303
|
+
int rank;
|
304
|
+
int *shape;
|
305
|
+
{
|
306
|
+
VALUE obj;
|
307
|
+
struct NARRAY *na;
|
308
|
+
int i;
|
309
|
+
int32_t *ptr;
|
310
|
+
|
311
|
+
if (cary == NULL)
|
312
|
+
rb_raise(rb_eRuntimeError, "cannot create NArray");
|
313
|
+
if (rank <= 0)
|
314
|
+
rb_raise(rb_eRuntimeError, "cannot create NArray");
|
315
|
+
|
316
|
+
obj = na_make_object(NA_LINT, rank, shape, cNArray);
|
317
|
+
GetNArray(obj, na);
|
318
|
+
ptr = (int32_t *) NA_PTR(na, 0);
|
319
|
+
|
320
|
+
for (i = 0; i < size; i++) {
|
321
|
+
ptr[i] = (int32_t)cary[i];
|
322
|
+
}
|
323
|
+
|
324
|
+
return obj;
|
325
|
+
}
|
326
|
+
|
327
|
+
static VALUE
|
328
|
+
clogicalary2na(cary, size, rank, shape)
|
329
|
+
logical *cary;
|
330
|
+
int size;
|
331
|
+
int rank;
|
332
|
+
int *shape;
|
333
|
+
{
|
334
|
+
VALUE obj;
|
335
|
+
struct NARRAY *na;
|
336
|
+
int i;
|
337
|
+
u_int8_t *ptr;
|
338
|
+
|
339
|
+
if (cary == NULL)
|
340
|
+
rb_raise(rb_eRuntimeError, "cannot create NumArray");
|
341
|
+
if (rank <= 0)
|
342
|
+
rb_raise(rb_eRuntimeError, "cannot create NArray");
|
343
|
+
|
344
|
+
obj = na_make_object(NA_BYTE, rank, shape, cNArray);
|
345
|
+
GetNArray(obj, na);
|
346
|
+
ptr = (u_int8_t *) NA_PTR(na, 0);
|
347
|
+
|
348
|
+
for (i = 0; i < size; i++) {
|
349
|
+
ptr[i] = (u_int8_t)cary[i];
|
350
|
+
}
|
351
|
+
|
352
|
+
return obj;
|
353
|
+
}
|
354
|
+
|
@@ -0,0 +1,518 @@
|
|
1
|
+
|
2
|
+
/*
|
3
|
+
* Original methods of Ruby-DCL
|
4
|
+
*
|
5
|
+
* Alert: DO NOT EDIT THIS FILE!!!
|
6
|
+
* This file was automatically generated by GenWrapper/dcl_narray_funcs.rb
|
7
|
+
*/
|
8
|
+
|
9
|
+
#include <stdio.h>
|
10
|
+
#include "ruby.h"
|
11
|
+
#include "libtinyf2c.h"
|
12
|
+
#include "narray.h"
|
13
|
+
|
14
|
+
#ifndef RARRAY_LEN
|
15
|
+
# define RARRAY_LEN(ary) (RARRAY(ary)->len)
|
16
|
+
#endif
|
17
|
+
|
18
|
+
#define DFLT_SIZE 32
|
19
|
+
|
20
|
+
extern char *dcl_obj2ccharary(VALUE, int, int);
|
21
|
+
extern integer *dcl_obj2cintegerary(VALUE);
|
22
|
+
extern real *dcl_obj2crealary(VALUE);
|
23
|
+
extern complex *dcl_obj2ccomplexary(VALUE);
|
24
|
+
extern logical *dcl_obj2clogicalary(VALUE);
|
25
|
+
|
26
|
+
extern VALUE dcl_ccharary2obj(char *, int, int);
|
27
|
+
extern VALUE dcl_cintegerary2obj(integer *, int, int, int *);
|
28
|
+
extern VALUE dcl_crealary2obj(real *, int, int, int *);
|
29
|
+
extern VALUE dcl_ccomplexary2obj(complex *, int, char *);
|
30
|
+
extern VALUE dcl_clogicalary2obj(logical *, int, int, int *);
|
31
|
+
|
32
|
+
extern void dcl_freeccharary(char *);
|
33
|
+
extern void dcl_freecintegerary(integer *);
|
34
|
+
extern void dcl_freecrealary(real *);
|
35
|
+
extern void dcl_freeccomplexary(complex *);
|
36
|
+
extern void dcl_freeclogicalary(logical *);
|
37
|
+
|
38
|
+
/* for functions which return doublereal */
|
39
|
+
/* fnclib */
|
40
|
+
extern doublereal rd2r_(real *);
|
41
|
+
extern doublereal rr2d_(real *);
|
42
|
+
extern doublereal rexp_(real *, integer *, integer *);
|
43
|
+
extern doublereal rfpi_(void);
|
44
|
+
extern doublereal rmod_(real *, real *);
|
45
|
+
/* gnmlib */
|
46
|
+
extern doublereal rgnlt_(real *);
|
47
|
+
extern doublereal rgnle_(real *);
|
48
|
+
extern doublereal rgngt_(real *);
|
49
|
+
extern doublereal rgnge_(real *);
|
50
|
+
/* rfalib */
|
51
|
+
extern doublereal rmax_(real *, integer *, integer *);
|
52
|
+
extern doublereal rmin_(real *, integer *, integer *);
|
53
|
+
extern doublereal rsum_(real *, integer *, integer *);
|
54
|
+
extern doublereal rave_(real *, integer *, integer *);
|
55
|
+
extern doublereal rvar_(real *, integer *, integer *);
|
56
|
+
extern doublereal rstd_(real *, integer *, integer *);
|
57
|
+
extern doublereal rrms_(real *, integer *, integer *);
|
58
|
+
extern doublereal ramp_(real *, integer *, integer *);
|
59
|
+
/* rfblib */
|
60
|
+
extern doublereal rprd_(real *, real *, integer *, integer *, integer *);
|
61
|
+
extern doublereal rcov_(real *, real *, integer *, integer *, integer *);
|
62
|
+
extern doublereal rcor_(real *, real *, integer *, integer *, integer *);
|
63
|
+
|
64
|
+
|
65
|
+
extern int stftrf_(real*,real*,real*,real*);
|
66
|
+
|
67
|
+
extern int stitrf_(real*,real*,real*,real*);
|
68
|
+
|
69
|
+
extern int stfpr2_(real*,real*,real*,real*);
|
70
|
+
|
71
|
+
extern int stipr2_(real*,real*,real*,real*);
|
72
|
+
|
73
|
+
extern int mpfcyl_(real*,real*,real*,real*);
|
74
|
+
|
75
|
+
extern int mpicyl_(real*,real*,real*,real*);
|
76
|
+
|
77
|
+
extern int mpfmer_(real*,real*,real*,real*);
|
78
|
+
|
79
|
+
extern int mpimer_(real*,real*,real*,real*);
|
80
|
+
|
81
|
+
extern int mpfmwd_(real*,real*,real*,real*);
|
82
|
+
|
83
|
+
extern int mpimwd_(real*,real*,real*,real*);
|
84
|
+
|
85
|
+
extern int mpfmwl_(real*,real*,real*,real*);
|
86
|
+
|
87
|
+
extern int mpimwl_(real*,real*,real*,real*);
|
88
|
+
|
89
|
+
extern int mpfhmr_(real*,real*,real*,real*);
|
90
|
+
|
91
|
+
extern int mpihmr_(real*,real*,real*,real*);
|
92
|
+
|
93
|
+
extern int mpfek6_(real*,real*,real*,real*);
|
94
|
+
|
95
|
+
extern int mpiek6_(real*,real*,real*,real*);
|
96
|
+
|
97
|
+
extern int mpfktd_(real*,real*,real*,real*);
|
98
|
+
|
99
|
+
extern int mpiktd_(real*,real*,real*,real*);
|
100
|
+
|
101
|
+
extern int mpfcon_(real*,real*,real*,real*);
|
102
|
+
|
103
|
+
extern int mpicon_(real*,real*,real*,real*);
|
104
|
+
|
105
|
+
extern int mpfcoa_(real*,real*,real*,real*);
|
106
|
+
|
107
|
+
extern int mpicoa_(real*,real*,real*,real*);
|
108
|
+
|
109
|
+
extern int mpfcoc_(real*,real*,real*,real*);
|
110
|
+
|
111
|
+
extern int mpicoc_(real*,real*,real*,real*);
|
112
|
+
|
113
|
+
extern int mpfbon_(real*,real*,real*,real*);
|
114
|
+
|
115
|
+
extern int mpibon_(real*,real*,real*,real*);
|
116
|
+
|
117
|
+
extern int mpfotg_(real*,real*,real*,real*);
|
118
|
+
|
119
|
+
extern int mpiotg_(real*,real*,real*,real*);
|
120
|
+
|
121
|
+
extern int mpfpst_(real*,real*,real*,real*);
|
122
|
+
|
123
|
+
extern int mpipst_(real*,real*,real*,real*);
|
124
|
+
|
125
|
+
extern int mpfazm_(real*,real*,real*,real*);
|
126
|
+
|
127
|
+
extern int mpiazm_(real*,real*,real*,real*);
|
128
|
+
|
129
|
+
extern int mpfaza_(real*,real*,real*,real*);
|
130
|
+
|
131
|
+
extern int mpiaza_(real*,real*,real*,real*);
|
132
|
+
|
133
|
+
extern int ct2pc_(real*,real*,real*,real*);
|
134
|
+
|
135
|
+
extern int ct2cp_(real*,real*,real*,real*);
|
136
|
+
|
137
|
+
extern int ct2ec_(real*,real*,real*,real*);
|
138
|
+
|
139
|
+
extern int ct2bc_(real*,real*,real*,real*);
|
140
|
+
|
141
|
+
extern int ct2hc_(real*,real*,real*,real*);
|
142
|
+
|
143
|
+
extern int ct2ch_(real*,real*,real*,real*);
|
144
|
+
|
145
|
+
|
146
|
+
extern VALUE mDCL;
|
147
|
+
|
148
|
+
/* driver of real*2->real*2 functions such as STFTRF
|
149
|
+
*/
|
150
|
+
static VALUE
|
151
|
+
dcl_rr2rr_num(obj, ux, uy, func)
|
152
|
+
VALUE obj, ux, uy;
|
153
|
+
int (*func)(real*,real*,real*,real*);
|
154
|
+
{
|
155
|
+
real i_ux;
|
156
|
+
real i_uy;
|
157
|
+
real o_vx;
|
158
|
+
real o_vy;
|
159
|
+
VALUE vx;
|
160
|
+
VALUE vy;
|
161
|
+
|
162
|
+
if (TYPE(ux) != T_FLOAT) {
|
163
|
+
ux = rb_funcall(ux, rb_intern("to_f"), 0);
|
164
|
+
}
|
165
|
+
if (TYPE(uy) != T_FLOAT) {
|
166
|
+
uy = rb_funcall(uy, rb_intern("to_f"), 0);
|
167
|
+
}
|
168
|
+
|
169
|
+
i_ux = (real)NUM2DBL(ux);
|
170
|
+
i_uy = (real)NUM2DBL(uy);
|
171
|
+
|
172
|
+
|
173
|
+
(*func)(&i_ux, &i_uy, &o_vx, &o_vy);
|
174
|
+
|
175
|
+
vx = rb_float_new((double)o_vx);
|
176
|
+
vy = rb_float_new((double)o_vy);
|
177
|
+
|
178
|
+
|
179
|
+
return rb_ary_new3(2, vx, vy);
|
180
|
+
|
181
|
+
}
|
182
|
+
|
183
|
+
/* driver of real*2->real*2 functions such as STFTRF
|
184
|
+
*/
|
185
|
+
static VALUE
|
186
|
+
dcl_rr2rr_na(obj, p, q, func)
|
187
|
+
VALUE obj, p, q;
|
188
|
+
int (*func)(real*,real*,real*,real*);
|
189
|
+
{
|
190
|
+
VALUE r, s; // return value
|
191
|
+
real *i_p, *i_q;
|
192
|
+
real *i_r, *i_s;
|
193
|
+
size_t len,j,lenq;
|
194
|
+
|
195
|
+
i_p = dcl_obj2crealary(p);
|
196
|
+
i_q = dcl_obj2crealary(q);
|
197
|
+
len = (TYPE(p)==T_ARRAY) ? RARRAY_LEN(p) : NA_TOTAL(p) ;
|
198
|
+
lenq = (TYPE(q)==T_ARRAY) ? RARRAY_LEN(q) : NA_TOTAL(q) ;
|
199
|
+
if (len != lenq) {
|
200
|
+
rb_raise(rb_eArgError, "lengths of the 1st & 2nd args do not agree");
|
201
|
+
}
|
202
|
+
|
203
|
+
r = na_make_object(NA_SFLOAT, 1, &len, cNArray);
|
204
|
+
s = na_make_object(NA_SFLOAT, 1, &len, cNArray);
|
205
|
+
i_r = NA_PTR_TYPE(r,real*);
|
206
|
+
i_s = NA_PTR_TYPE(s,real*);
|
207
|
+
|
208
|
+
for(j=0; j<len; j++){
|
209
|
+
(*func)(i_p+j, i_q+j, i_r+j, i_s+j);
|
210
|
+
}
|
211
|
+
|
212
|
+
return rb_ary_new3(2, r, s);
|
213
|
+
}
|
214
|
+
|
215
|
+
static VALUE
|
216
|
+
dcl_rr2rr(obj, p, q, func)
|
217
|
+
VALUE obj, p, q;
|
218
|
+
int (*func)(real*,real*,real*,real*);
|
219
|
+
{
|
220
|
+
switch (TYPE(p)){
|
221
|
+
case T_DATA:
|
222
|
+
case T_ARRAY:
|
223
|
+
return( dcl_rr2rr_na(obj, p, q, func) );
|
224
|
+
default:
|
225
|
+
return( dcl_rr2rr_num(obj, p, q, func) );
|
226
|
+
}
|
227
|
+
}
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
static VALUE
|
232
|
+
dcl_stftrf(obj, p, q)
|
233
|
+
VALUE obj, p, q;
|
234
|
+
{ return( dcl_rr2rr(obj, p, q, &stftrf_) ); }
|
235
|
+
|
236
|
+
static VALUE
|
237
|
+
dcl_stitrf(obj, p, q)
|
238
|
+
VALUE obj, p, q;
|
239
|
+
{ return( dcl_rr2rr(obj, p, q, &stitrf_) ); }
|
240
|
+
|
241
|
+
static VALUE
|
242
|
+
dcl_stfpr2(obj, p, q)
|
243
|
+
VALUE obj, p, q;
|
244
|
+
{ return( dcl_rr2rr(obj, p, q, &stfpr2_) ); }
|
245
|
+
|
246
|
+
static VALUE
|
247
|
+
dcl_stipr2(obj, p, q)
|
248
|
+
VALUE obj, p, q;
|
249
|
+
{ return( dcl_rr2rr(obj, p, q, &stipr2_) ); }
|
250
|
+
|
251
|
+
static VALUE
|
252
|
+
dcl_mpfcyl(obj, p, q)
|
253
|
+
VALUE obj, p, q;
|
254
|
+
{ return( dcl_rr2rr(obj, p, q, &mpfcyl_) ); }
|
255
|
+
|
256
|
+
static VALUE
|
257
|
+
dcl_mpicyl(obj, p, q)
|
258
|
+
VALUE obj, p, q;
|
259
|
+
{ return( dcl_rr2rr(obj, p, q, &mpicyl_) ); }
|
260
|
+
|
261
|
+
static VALUE
|
262
|
+
dcl_mpfmer(obj, p, q)
|
263
|
+
VALUE obj, p, q;
|
264
|
+
{ return( dcl_rr2rr(obj, p, q, &mpfmer_) ); }
|
265
|
+
|
266
|
+
static VALUE
|
267
|
+
dcl_mpimer(obj, p, q)
|
268
|
+
VALUE obj, p, q;
|
269
|
+
{ return( dcl_rr2rr(obj, p, q, &mpimer_) ); }
|
270
|
+
|
271
|
+
static VALUE
|
272
|
+
dcl_mpfmwd(obj, p, q)
|
273
|
+
VALUE obj, p, q;
|
274
|
+
{ return( dcl_rr2rr(obj, p, q, &mpfmwd_) ); }
|
275
|
+
|
276
|
+
static VALUE
|
277
|
+
dcl_mpimwd(obj, p, q)
|
278
|
+
VALUE obj, p, q;
|
279
|
+
{ return( dcl_rr2rr(obj, p, q, &mpimwd_) ); }
|
280
|
+
|
281
|
+
static VALUE
|
282
|
+
dcl_mpfmwl(obj, p, q)
|
283
|
+
VALUE obj, p, q;
|
284
|
+
{ return( dcl_rr2rr(obj, p, q, &mpfmwl_) ); }
|
285
|
+
|
286
|
+
static VALUE
|
287
|
+
dcl_mpimwl(obj, p, q)
|
288
|
+
VALUE obj, p, q;
|
289
|
+
{ return( dcl_rr2rr(obj, p, q, &mpimwl_) ); }
|
290
|
+
|
291
|
+
static VALUE
|
292
|
+
dcl_mpfhmr(obj, p, q)
|
293
|
+
VALUE obj, p, q;
|
294
|
+
{ return( dcl_rr2rr(obj, p, q, &mpfhmr_) ); }
|
295
|
+
|
296
|
+
static VALUE
|
297
|
+
dcl_mpihmr(obj, p, q)
|
298
|
+
VALUE obj, p, q;
|
299
|
+
{ return( dcl_rr2rr(obj, p, q, &mpihmr_) ); }
|
300
|
+
|
301
|
+
static VALUE
|
302
|
+
dcl_mpfek6(obj, p, q)
|
303
|
+
VALUE obj, p, q;
|
304
|
+
{ return( dcl_rr2rr(obj, p, q, &mpfek6_) ); }
|
305
|
+
|
306
|
+
static VALUE
|
307
|
+
dcl_mpiek6(obj, p, q)
|
308
|
+
VALUE obj, p, q;
|
309
|
+
{ return( dcl_rr2rr(obj, p, q, &mpiek6_) ); }
|
310
|
+
|
311
|
+
static VALUE
|
312
|
+
dcl_mpfktd(obj, p, q)
|
313
|
+
VALUE obj, p, q;
|
314
|
+
{ return( dcl_rr2rr(obj, p, q, &mpfktd_) ); }
|
315
|
+
|
316
|
+
static VALUE
|
317
|
+
dcl_mpiktd(obj, p, q)
|
318
|
+
VALUE obj, p, q;
|
319
|
+
{ return( dcl_rr2rr(obj, p, q, &mpiktd_) ); }
|
320
|
+
|
321
|
+
static VALUE
|
322
|
+
dcl_mpfcon(obj, p, q)
|
323
|
+
VALUE obj, p, q;
|
324
|
+
{ return( dcl_rr2rr(obj, p, q, &mpfcon_) ); }
|
325
|
+
|
326
|
+
static VALUE
|
327
|
+
dcl_mpicon(obj, p, q)
|
328
|
+
VALUE obj, p, q;
|
329
|
+
{ return( dcl_rr2rr(obj, p, q, &mpicon_) ); }
|
330
|
+
|
331
|
+
static VALUE
|
332
|
+
dcl_mpfcoa(obj, p, q)
|
333
|
+
VALUE obj, p, q;
|
334
|
+
{ return( dcl_rr2rr(obj, p, q, &mpfcoa_) ); }
|
335
|
+
|
336
|
+
static VALUE
|
337
|
+
dcl_mpicoa(obj, p, q)
|
338
|
+
VALUE obj, p, q;
|
339
|
+
{ return( dcl_rr2rr(obj, p, q, &mpicoa_) ); }
|
340
|
+
|
341
|
+
static VALUE
|
342
|
+
dcl_mpfcoc(obj, p, q)
|
343
|
+
VALUE obj, p, q;
|
344
|
+
{ return( dcl_rr2rr(obj, p, q, &mpfcoc_) ); }
|
345
|
+
|
346
|
+
static VALUE
|
347
|
+
dcl_mpicoc(obj, p, q)
|
348
|
+
VALUE obj, p, q;
|
349
|
+
{ return( dcl_rr2rr(obj, p, q, &mpicoc_) ); }
|
350
|
+
|
351
|
+
static VALUE
|
352
|
+
dcl_mpfbon(obj, p, q)
|
353
|
+
VALUE obj, p, q;
|
354
|
+
{ return( dcl_rr2rr(obj, p, q, &mpfbon_) ); }
|
355
|
+
|
356
|
+
static VALUE
|
357
|
+
dcl_mpibon(obj, p, q)
|
358
|
+
VALUE obj, p, q;
|
359
|
+
{ return( dcl_rr2rr(obj, p, q, &mpibon_) ); }
|
360
|
+
|
361
|
+
static VALUE
|
362
|
+
dcl_mpfotg(obj, p, q)
|
363
|
+
VALUE obj, p, q;
|
364
|
+
{ return( dcl_rr2rr(obj, p, q, &mpfotg_) ); }
|
365
|
+
|
366
|
+
static VALUE
|
367
|
+
dcl_mpiotg(obj, p, q)
|
368
|
+
VALUE obj, p, q;
|
369
|
+
{ return( dcl_rr2rr(obj, p, q, &mpiotg_) ); }
|
370
|
+
|
371
|
+
static VALUE
|
372
|
+
dcl_mpfpst(obj, p, q)
|
373
|
+
VALUE obj, p, q;
|
374
|
+
{ return( dcl_rr2rr(obj, p, q, &mpfpst_) ); }
|
375
|
+
|
376
|
+
static VALUE
|
377
|
+
dcl_mpipst(obj, p, q)
|
378
|
+
VALUE obj, p, q;
|
379
|
+
{ return( dcl_rr2rr(obj, p, q, &mpipst_) ); }
|
380
|
+
|
381
|
+
static VALUE
|
382
|
+
dcl_mpfazm(obj, p, q)
|
383
|
+
VALUE obj, p, q;
|
384
|
+
{ return( dcl_rr2rr(obj, p, q, &mpfazm_) ); }
|
385
|
+
|
386
|
+
static VALUE
|
387
|
+
dcl_mpiazm(obj, p, q)
|
388
|
+
VALUE obj, p, q;
|
389
|
+
{ return( dcl_rr2rr(obj, p, q, &mpiazm_) ); }
|
390
|
+
|
391
|
+
static VALUE
|
392
|
+
dcl_mpfaza(obj, p, q)
|
393
|
+
VALUE obj, p, q;
|
394
|
+
{ return( dcl_rr2rr(obj, p, q, &mpfaza_) ); }
|
395
|
+
|
396
|
+
static VALUE
|
397
|
+
dcl_mpiaza(obj, p, q)
|
398
|
+
VALUE obj, p, q;
|
399
|
+
{ return( dcl_rr2rr(obj, p, q, &mpiaza_) ); }
|
400
|
+
|
401
|
+
static VALUE
|
402
|
+
dcl_ct2pc(obj, p, q)
|
403
|
+
VALUE obj, p, q;
|
404
|
+
{ return( dcl_rr2rr(obj, p, q, &ct2pc_) ); }
|
405
|
+
|
406
|
+
static VALUE
|
407
|
+
dcl_ct2cp(obj, p, q)
|
408
|
+
VALUE obj, p, q;
|
409
|
+
{ return( dcl_rr2rr(obj, p, q, &ct2cp_) ); }
|
410
|
+
|
411
|
+
static VALUE
|
412
|
+
dcl_ct2ec(obj, p, q)
|
413
|
+
VALUE obj, p, q;
|
414
|
+
{ return( dcl_rr2rr(obj, p, q, &ct2ec_) ); }
|
415
|
+
|
416
|
+
static VALUE
|
417
|
+
dcl_ct2bc(obj, p, q)
|
418
|
+
VALUE obj, p, q;
|
419
|
+
{ return( dcl_rr2rr(obj, p, q, &ct2bc_) ); }
|
420
|
+
|
421
|
+
static VALUE
|
422
|
+
dcl_ct2hc(obj, p, q)
|
423
|
+
VALUE obj, p, q;
|
424
|
+
{ return( dcl_rr2rr(obj, p, q, &ct2hc_) ); }
|
425
|
+
|
426
|
+
static VALUE
|
427
|
+
dcl_ct2ch(obj, p, q)
|
428
|
+
VALUE obj, p, q;
|
429
|
+
{ return( dcl_rr2rr(obj, p, q, &ct2ch_) ); }
|
430
|
+
|
431
|
+
|
432
|
+
void
|
433
|
+
init_narrayed_funcs(mDCL)
|
434
|
+
VALUE mDCL;
|
435
|
+
{
|
436
|
+
|
437
|
+
rb_define_module_function(mDCL, "stftrf", dcl_stftrf, 2);
|
438
|
+
|
439
|
+
rb_define_module_function(mDCL, "stitrf", dcl_stitrf, 2);
|
440
|
+
|
441
|
+
rb_define_module_function(mDCL, "stfpr2", dcl_stfpr2, 2);
|
442
|
+
|
443
|
+
rb_define_module_function(mDCL, "stipr2", dcl_stipr2, 2);
|
444
|
+
|
445
|
+
rb_define_module_function(mDCL, "mpfcyl", dcl_mpfcyl, 2);
|
446
|
+
|
447
|
+
rb_define_module_function(mDCL, "mpicyl", dcl_mpicyl, 2);
|
448
|
+
|
449
|
+
rb_define_module_function(mDCL, "mpfmer", dcl_mpfmer, 2);
|
450
|
+
|
451
|
+
rb_define_module_function(mDCL, "mpimer", dcl_mpimer, 2);
|
452
|
+
|
453
|
+
rb_define_module_function(mDCL, "mpfmwd", dcl_mpfmwd, 2);
|
454
|
+
|
455
|
+
rb_define_module_function(mDCL, "mpimwd", dcl_mpimwd, 2);
|
456
|
+
|
457
|
+
rb_define_module_function(mDCL, "mpfmwl", dcl_mpfmwl, 2);
|
458
|
+
|
459
|
+
rb_define_module_function(mDCL, "mpimwl", dcl_mpimwl, 2);
|
460
|
+
|
461
|
+
rb_define_module_function(mDCL, "mpfhmr", dcl_mpfhmr, 2);
|
462
|
+
|
463
|
+
rb_define_module_function(mDCL, "mpihmr", dcl_mpihmr, 2);
|
464
|
+
|
465
|
+
rb_define_module_function(mDCL, "mpfek6", dcl_mpfek6, 2);
|
466
|
+
|
467
|
+
rb_define_module_function(mDCL, "mpiek6", dcl_mpiek6, 2);
|
468
|
+
|
469
|
+
rb_define_module_function(mDCL, "mpfktd", dcl_mpfktd, 2);
|
470
|
+
|
471
|
+
rb_define_module_function(mDCL, "mpiktd", dcl_mpiktd, 2);
|
472
|
+
|
473
|
+
rb_define_module_function(mDCL, "mpfcon", dcl_mpfcon, 2);
|
474
|
+
|
475
|
+
rb_define_module_function(mDCL, "mpicon", dcl_mpicon, 2);
|
476
|
+
|
477
|
+
rb_define_module_function(mDCL, "mpfcoa", dcl_mpfcoa, 2);
|
478
|
+
|
479
|
+
rb_define_module_function(mDCL, "mpicoa", dcl_mpicoa, 2);
|
480
|
+
|
481
|
+
rb_define_module_function(mDCL, "mpfcoc", dcl_mpfcoc, 2);
|
482
|
+
|
483
|
+
rb_define_module_function(mDCL, "mpicoc", dcl_mpicoc, 2);
|
484
|
+
|
485
|
+
rb_define_module_function(mDCL, "mpfbon", dcl_mpfbon, 2);
|
486
|
+
|
487
|
+
rb_define_module_function(mDCL, "mpibon", dcl_mpibon, 2);
|
488
|
+
|
489
|
+
rb_define_module_function(mDCL, "mpfotg", dcl_mpfotg, 2);
|
490
|
+
|
491
|
+
rb_define_module_function(mDCL, "mpiotg", dcl_mpiotg, 2);
|
492
|
+
|
493
|
+
rb_define_module_function(mDCL, "mpfpst", dcl_mpfpst, 2);
|
494
|
+
|
495
|
+
rb_define_module_function(mDCL, "mpipst", dcl_mpipst, 2);
|
496
|
+
|
497
|
+
rb_define_module_function(mDCL, "mpfazm", dcl_mpfazm, 2);
|
498
|
+
|
499
|
+
rb_define_module_function(mDCL, "mpiazm", dcl_mpiazm, 2);
|
500
|
+
|
501
|
+
rb_define_module_function(mDCL, "mpfaza", dcl_mpfaza, 2);
|
502
|
+
|
503
|
+
rb_define_module_function(mDCL, "mpiaza", dcl_mpiaza, 2);
|
504
|
+
|
505
|
+
rb_define_module_function(mDCL, "ct2pc", dcl_ct2pc, 2);
|
506
|
+
|
507
|
+
rb_define_module_function(mDCL, "ct2cp", dcl_ct2cp, 2);
|
508
|
+
|
509
|
+
rb_define_module_function(mDCL, "ct2ec", dcl_ct2ec, 2);
|
510
|
+
|
511
|
+
rb_define_module_function(mDCL, "ct2bc", dcl_ct2bc, 2);
|
512
|
+
|
513
|
+
rb_define_module_function(mDCL, "ct2hc", dcl_ct2hc, 2);
|
514
|
+
|
515
|
+
rb_define_module_function(mDCL, "ct2ch", dcl_ct2ch, 2);
|
516
|
+
|
517
|
+
}
|
518
|
+
|