liblinear-ruby 1.0.2 → 1.0.3
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 +5 -5
- data/README.md +2 -2
- data/ext/liblinear_wrap.cxx +434 -398
- data/ext/linear.cpp +251 -90
- data/ext/linear.h +2 -2
- data/ext/tron.cpp +72 -33
- data/ext/tron.h +2 -1
- data/lib/liblinear/parameter.rb +1 -1
- data/lib/liblinear/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 0d4e6d14bf44472452e05c55d63cab86759b2f9e7107bda60a65832dd9d5de44
|
4
|
+
data.tar.gz: 66d398cecfb93149d893ea1121a0036cdc693df2277ff61843c6cd2cdf3aa378
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0af2ce48fac51c2105bc30ff862112c6474cf6f60f5fc2e88a39902be2802fd5d7147b0c269c34a30f03db38ed0011a928d8186a5fcbec82d1cd94a716aea6a4
|
7
|
+
data.tar.gz: af6fff865e416d1a87e9874b32c39f4180c2c96b090557a77a9d9806fa397595503a4f1cd34f577293d28458f3dd0f90192ed19977b0dc75f76dc210e30716ab
|
data/README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# Liblinear-Ruby
|
2
2
|
[](http://badge.fury.io/rb/liblinear-ruby)
|
3
3
|
|
4
|
-
Liblinear-Ruby is Ruby interface of LIBLINEAR using SWIG.
|
5
|
-
Now, this interface is supporting LIBLINEAR 2.
|
4
|
+
Liblinear-Ruby is Ruby interface of LIBLINEAR using SWIG.
|
5
|
+
Now, this interface is supporting LIBLINEAR 2.30.
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
data/ext/liblinear_wrap.cxx
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
/* ----------------------------------------------------------------------------
|
2
2
|
* This file was automatically generated by SWIG (http://www.swig.org).
|
3
3
|
* Version 2.0.4
|
4
|
-
*
|
5
|
-
* This file is not intended to be easily readable and contains a number of
|
4
|
+
*
|
5
|
+
* This file is not intended to be easily readable and contains a number of
|
6
6
|
* coding conventions designed to improve portability and efficiency. Do not make
|
7
|
-
* changes to this file unless you know what you are doing--modify the SWIG
|
8
|
-
* interface file instead.
|
7
|
+
* changes to this file unless you know what you are doing--modify the SWIG
|
8
|
+
* interface file instead.
|
9
9
|
* ----------------------------------------------------------------------------- */
|
10
10
|
|
11
11
|
#define SWIGRUBY
|
@@ -65,28 +65,28 @@ template <typename T> T SwigValueInit() {
|
|
65
65
|
#ifndef SWIGUNUSED
|
66
66
|
# if defined(__GNUC__)
|
67
67
|
# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
|
68
|
-
# define SWIGUNUSED __attribute__ ((__unused__))
|
68
|
+
# define SWIGUNUSED __attribute__ ((__unused__))
|
69
69
|
# else
|
70
70
|
# define SWIGUNUSED
|
71
71
|
# endif
|
72
72
|
# elif defined(__ICC)
|
73
|
-
# define SWIGUNUSED __attribute__ ((__unused__))
|
73
|
+
# define SWIGUNUSED __attribute__ ((__unused__))
|
74
74
|
# else
|
75
|
-
# define SWIGUNUSED
|
75
|
+
# define SWIGUNUSED
|
76
76
|
# endif
|
77
77
|
#endif
|
78
78
|
|
79
79
|
#ifndef SWIG_MSC_UNSUPPRESS_4505
|
80
80
|
# if defined(_MSC_VER)
|
81
81
|
# pragma warning(disable : 4505) /* unreferenced local function has been removed */
|
82
|
-
# endif
|
82
|
+
# endif
|
83
83
|
#endif
|
84
84
|
|
85
85
|
#ifndef SWIGUNUSEDPARM
|
86
86
|
# ifdef __cplusplus
|
87
87
|
# define SWIGUNUSEDPARM(p)
|
88
88
|
# else
|
89
|
-
# define SWIGUNUSEDPARM(p) p SWIGUNUSED
|
89
|
+
# define SWIGUNUSEDPARM(p) p SWIGUNUSED
|
90
90
|
# endif
|
91
91
|
#endif
|
92
92
|
|
@@ -129,7 +129,7 @@ template <typename T> T SwigValueInit() {
|
|
129
129
|
# define SWIGSTDCALL __stdcall
|
130
130
|
# else
|
131
131
|
# define SWIGSTDCALL
|
132
|
-
# endif
|
132
|
+
# endif
|
133
133
|
#endif
|
134
134
|
|
135
135
|
/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
|
@@ -174,28 +174,28 @@ template <typename T> T SwigValueInit() {
|
|
174
174
|
#ifndef SWIGUNUSED
|
175
175
|
# if defined(__GNUC__)
|
176
176
|
# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
|
177
|
-
# define SWIGUNUSED __attribute__ ((__unused__))
|
177
|
+
# define SWIGUNUSED __attribute__ ((__unused__))
|
178
178
|
# else
|
179
179
|
# define SWIGUNUSED
|
180
180
|
# endif
|
181
181
|
# elif defined(__ICC)
|
182
|
-
# define SWIGUNUSED __attribute__ ((__unused__))
|
182
|
+
# define SWIGUNUSED __attribute__ ((__unused__))
|
183
183
|
# else
|
184
|
-
# define SWIGUNUSED
|
184
|
+
# define SWIGUNUSED
|
185
185
|
# endif
|
186
186
|
#endif
|
187
187
|
|
188
188
|
#ifndef SWIG_MSC_UNSUPPRESS_4505
|
189
189
|
# if defined(_MSC_VER)
|
190
190
|
# pragma warning(disable : 4505) /* unreferenced local function has been removed */
|
191
|
-
# endif
|
191
|
+
# endif
|
192
192
|
#endif
|
193
193
|
|
194
194
|
#ifndef SWIGUNUSEDPARM
|
195
195
|
# ifdef __cplusplus
|
196
196
|
# define SWIGUNUSEDPARM(p)
|
197
197
|
# else
|
198
|
-
# define SWIGUNUSEDPARM(p) p SWIGUNUSED
|
198
|
+
# define SWIGUNUSEDPARM(p) p SWIGUNUSED
|
199
199
|
# endif
|
200
200
|
#endif
|
201
201
|
|
@@ -238,7 +238,7 @@ template <typename T> T SwigValueInit() {
|
|
238
238
|
# define SWIGSTDCALL __stdcall
|
239
239
|
# else
|
240
240
|
# define SWIGSTDCALL
|
241
|
-
# endif
|
241
|
+
# endif
|
242
242
|
#endif
|
243
243
|
|
244
244
|
/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
|
@@ -276,7 +276,7 @@ template <typename T> T SwigValueInit() {
|
|
276
276
|
You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
|
277
277
|
creating a static or dynamic library from the SWIG runtime code.
|
278
278
|
In 99.9% of the cases, SWIG just needs to declare them as 'static'.
|
279
|
-
|
279
|
+
|
280
280
|
But only do this if strictly necessary, ie, if you have problems
|
281
281
|
with your compiler or suchlike.
|
282
282
|
*/
|
@@ -302,16 +302,16 @@ template <typename T> T SwigValueInit() {
|
|
302
302
|
#define SWIG_POINTER_OWN 0x1
|
303
303
|
|
304
304
|
|
305
|
-
/*
|
305
|
+
/*
|
306
306
|
Flags/methods for returning states.
|
307
|
-
|
308
|
-
The SWIG conversion methods, as ConvertPtr, return an integer
|
307
|
+
|
308
|
+
The SWIG conversion methods, as ConvertPtr, return an integer
|
309
309
|
that tells if the conversion was successful or not. And if not,
|
310
310
|
an error code can be returned (see swigerrors.swg for the codes).
|
311
|
-
|
311
|
+
|
312
312
|
Use the following macros/flags to set or process the returning
|
313
313
|
states.
|
314
|
-
|
314
|
+
|
315
315
|
In old versions of SWIG, code such as the following was usually written:
|
316
316
|
|
317
317
|
if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
|
@@ -344,23 +344,23 @@ template <typename T> T SwigValueInit() {
|
|
344
344
|
} else {
|
345
345
|
// fail code
|
346
346
|
}
|
347
|
-
|
347
|
+
|
348
348
|
I.e., now SWIG_ConvertPtr can return new objects and you can
|
349
349
|
identify the case and take care of the deallocation. Of course that
|
350
350
|
also requires SWIG_ConvertPtr to return new result values, such as
|
351
351
|
|
352
|
-
int SWIG_ConvertPtr(obj, ptr,...) {
|
353
|
-
if (<obj is ok>) {
|
354
|
-
if (<need new object>) {
|
355
|
-
*ptr = <ptr to new allocated object>;
|
356
|
-
return SWIG_NEWOBJ;
|
357
|
-
} else {
|
358
|
-
*ptr = <ptr to old object>;
|
359
|
-
return SWIG_OLDOBJ;
|
360
|
-
}
|
361
|
-
} else {
|
362
|
-
return SWIG_BADOBJ;
|
363
|
-
}
|
352
|
+
int SWIG_ConvertPtr(obj, ptr,...) {
|
353
|
+
if (<obj is ok>) {
|
354
|
+
if (<need new object>) {
|
355
|
+
*ptr = <ptr to new allocated object>;
|
356
|
+
return SWIG_NEWOBJ;
|
357
|
+
} else {
|
358
|
+
*ptr = <ptr to old object>;
|
359
|
+
return SWIG_OLDOBJ;
|
360
|
+
}
|
361
|
+
} else {
|
362
|
+
return SWIG_BADOBJ;
|
363
|
+
}
|
364
364
|
}
|
365
365
|
|
366
366
|
Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
|
@@ -374,17 +374,17 @@ template <typename T> T SwigValueInit() {
|
|
374
374
|
int fooi(int);
|
375
375
|
|
376
376
|
and you call
|
377
|
-
|
377
|
+
|
378
378
|
food(1) // cast rank '1' (1 -> 1.0)
|
379
379
|
fooi(1) // cast rank '0'
|
380
380
|
|
381
381
|
just use the SWIG_AddCast()/SWIG_CheckState()
|
382
382
|
*/
|
383
383
|
|
384
|
-
#define SWIG_OK (0)
|
384
|
+
#define SWIG_OK (0)
|
385
385
|
#define SWIG_ERROR (-1)
|
386
386
|
#define SWIG_IsOK(r) (r >= 0)
|
387
|
-
#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
|
387
|
+
#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
|
388
388
|
|
389
389
|
/* The CastRankLimit says how many bits are used for the cast rank */
|
390
390
|
#define SWIG_CASTRANKLIMIT (1 << 8)
|
@@ -415,11 +415,11 @@ template <typename T> T SwigValueInit() {
|
|
415
415
|
# endif
|
416
416
|
# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
|
417
417
|
# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
|
418
|
-
SWIGINTERNINLINE int SWIG_AddCast(int r) {
|
418
|
+
SWIGINTERNINLINE int SWIG_AddCast(int r) {
|
419
419
|
return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
|
420
420
|
}
|
421
|
-
SWIGINTERNINLINE int SWIG_CheckState(int r) {
|
422
|
-
return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
|
421
|
+
SWIGINTERNINLINE int SWIG_CheckState(int r) {
|
422
|
+
return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
|
423
423
|
}
|
424
424
|
#else /* no cast-rank mode */
|
425
425
|
# define SWIG_AddCast
|
@@ -466,7 +466,7 @@ typedef struct swig_module_info {
|
|
466
466
|
void *clientdata; /* Language specific module data */
|
467
467
|
} swig_module_info;
|
468
468
|
|
469
|
-
/*
|
469
|
+
/*
|
470
470
|
Compare two type names skipping the space characters, therefore
|
471
471
|
"char*" == "char *" and "Class<int>" == "Class<int >", etc.
|
472
472
|
|
@@ -550,7 +550,7 @@ SWIG_TypeCheck(const char *c, swig_type_info *ty) {
|
|
550
550
|
return 0;
|
551
551
|
}
|
552
552
|
|
553
|
-
/*
|
553
|
+
/*
|
554
554
|
Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
|
555
555
|
*/
|
556
556
|
SWIGRUNTIME swig_cast_info *
|
@@ -585,7 +585,7 @@ SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
|
|
585
585
|
return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
|
586
586
|
}
|
587
587
|
|
588
|
-
/*
|
588
|
+
/*
|
589
589
|
Dynamic pointer casting. Down an inheritance hierarchy
|
590
590
|
*/
|
591
591
|
SWIGRUNTIME swig_type_info *
|
@@ -629,7 +629,7 @@ SWIG_TypePrettyName(const swig_type_info *type) {
|
|
629
629
|
return type->name;
|
630
630
|
}
|
631
631
|
|
632
|
-
/*
|
632
|
+
/*
|
633
633
|
Set the clientdata field for a type
|
634
634
|
*/
|
635
635
|
SWIGRUNTIME void
|
@@ -637,14 +637,14 @@ SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
|
|
637
637
|
swig_cast_info *cast = ti->cast;
|
638
638
|
/* if (ti->clientdata == clientdata) return; */
|
639
639
|
ti->clientdata = clientdata;
|
640
|
-
|
640
|
+
|
641
641
|
while (cast) {
|
642
642
|
if (!cast->converter) {
|
643
643
|
swig_type_info *tc = cast->type;
|
644
644
|
if (!tc->clientdata) {
|
645
645
|
SWIG_TypeClientData(tc, clientdata);
|
646
646
|
}
|
647
|
-
}
|
647
|
+
}
|
648
648
|
cast = cast->next;
|
649
649
|
}
|
650
650
|
}
|
@@ -653,18 +653,18 @@ SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
|
|
653
653
|
SWIG_TypeClientData(ti, clientdata);
|
654
654
|
ti->owndata = 1;
|
655
655
|
}
|
656
|
-
|
656
|
+
|
657
657
|
/*
|
658
658
|
Search for a swig_type_info structure only by mangled name
|
659
659
|
Search is a O(log #types)
|
660
|
-
|
661
|
-
We start searching at module start, and finish searching when start == end.
|
660
|
+
|
661
|
+
We start searching at module start, and finish searching when start == end.
|
662
662
|
Note: if start == end at the beginning of the function, we go all the way around
|
663
663
|
the circular list.
|
664
664
|
*/
|
665
665
|
SWIGRUNTIME swig_type_info *
|
666
|
-
SWIG_MangledTypeQueryModule(swig_module_info *start,
|
667
|
-
swig_module_info *end,
|
666
|
+
SWIG_MangledTypeQueryModule(swig_module_info *start,
|
667
|
+
swig_module_info *end,
|
668
668
|
const char *name) {
|
669
669
|
swig_module_info *iter = start;
|
670
670
|
do {
|
@@ -673,11 +673,11 @@ SWIG_MangledTypeQueryModule(swig_module_info *start,
|
|
673
673
|
register size_t r = iter->size - 1;
|
674
674
|
do {
|
675
675
|
/* since l+r >= 0, we can (>> 1) instead (/ 2) */
|
676
|
-
register size_t i = (l + r) >> 1;
|
676
|
+
register size_t i = (l + r) >> 1;
|
677
677
|
const char *iname = iter->types[i]->name;
|
678
678
|
if (iname) {
|
679
679
|
register int compare = strcmp(name, iname);
|
680
|
-
if (compare == 0) {
|
680
|
+
if (compare == 0) {
|
681
681
|
return iter->types[i];
|
682
682
|
} else if (compare < 0) {
|
683
683
|
if (i) {
|
@@ -702,14 +702,14 @@ SWIG_MangledTypeQueryModule(swig_module_info *start,
|
|
702
702
|
Search for a swig_type_info structure for either a mangled name or a human readable name.
|
703
703
|
It first searches the mangled names of the types, which is a O(log #types)
|
704
704
|
If a type is not found it then searches the human readable names, which is O(#types).
|
705
|
-
|
706
|
-
We start searching at module start, and finish searching when start == end.
|
705
|
+
|
706
|
+
We start searching at module start, and finish searching when start == end.
|
707
707
|
Note: if start == end at the beginning of the function, we go all the way around
|
708
708
|
the circular list.
|
709
709
|
*/
|
710
710
|
SWIGRUNTIME swig_type_info *
|
711
|
-
SWIG_TypeQueryModule(swig_module_info *start,
|
712
|
-
swig_module_info *end,
|
711
|
+
SWIG_TypeQueryModule(swig_module_info *start,
|
712
|
+
swig_module_info *end,
|
713
713
|
const char *name) {
|
714
714
|
/* STEP 1: Search the name field using binary search */
|
715
715
|
swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
|
@@ -728,12 +728,12 @@ SWIG_TypeQueryModule(swig_module_info *start,
|
|
728
728
|
iter = iter->next;
|
729
729
|
} while (iter != end);
|
730
730
|
}
|
731
|
-
|
731
|
+
|
732
732
|
/* neither found a match */
|
733
733
|
return 0;
|
734
734
|
}
|
735
735
|
|
736
|
-
/*
|
736
|
+
/*
|
737
737
|
Pack binary data into a string
|
738
738
|
*/
|
739
739
|
SWIGRUNTIME char *
|
@@ -749,7 +749,7 @@ SWIG_PackData(char *c, void *ptr, size_t sz) {
|
|
749
749
|
return c;
|
750
750
|
}
|
751
751
|
|
752
|
-
/*
|
752
|
+
/*
|
753
753
|
Unpack binary data from a string
|
754
754
|
*/
|
755
755
|
SWIGRUNTIME const char *
|
@@ -763,21 +763,21 @@ SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
|
|
763
763
|
uu = ((d - '0') << 4);
|
764
764
|
else if ((d >= 'a') && (d <= 'f'))
|
765
765
|
uu = ((d - ('a'-10)) << 4);
|
766
|
-
else
|
766
|
+
else
|
767
767
|
return (char *) 0;
|
768
768
|
d = *(c++);
|
769
769
|
if ((d >= '0') && (d <= '9'))
|
770
770
|
uu |= (d - '0');
|
771
771
|
else if ((d >= 'a') && (d <= 'f'))
|
772
772
|
uu |= (d - ('a'-10));
|
773
|
-
else
|
773
|
+
else
|
774
774
|
return (char *) 0;
|
775
775
|
*u = uu;
|
776
776
|
}
|
777
777
|
return c;
|
778
778
|
}
|
779
779
|
|
780
|
-
/*
|
780
|
+
/*
|
781
781
|
Pack 'void *' into a string buffer.
|
782
782
|
*/
|
783
783
|
SWIGRUNTIME char *
|
@@ -837,18 +837,18 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
|
|
837
837
|
#endif
|
838
838
|
|
839
839
|
/* Errors in SWIG */
|
840
|
-
#define SWIG_UnknownError -1
|
841
|
-
#define SWIG_IOError -2
|
842
|
-
#define SWIG_RuntimeError -3
|
843
|
-
#define SWIG_IndexError -4
|
844
|
-
#define SWIG_TypeError -5
|
845
|
-
#define SWIG_DivisionByZero -6
|
846
|
-
#define SWIG_OverflowError -7
|
847
|
-
#define SWIG_SyntaxError -8
|
848
|
-
#define SWIG_ValueError -9
|
840
|
+
#define SWIG_UnknownError -1
|
841
|
+
#define SWIG_IOError -2
|
842
|
+
#define SWIG_RuntimeError -3
|
843
|
+
#define SWIG_IndexError -4
|
844
|
+
#define SWIG_TypeError -5
|
845
|
+
#define SWIG_DivisionByZero -6
|
846
|
+
#define SWIG_OverflowError -7
|
847
|
+
#define SWIG_SyntaxError -8
|
848
|
+
#define SWIG_ValueError -9
|
849
849
|
#define SWIG_SystemError -10
|
850
850
|
#define SWIG_AttributeError -11
|
851
|
-
#define SWIG_MemoryError -12
|
851
|
+
#define SWIG_MemoryError -12
|
852
852
|
#define SWIG_NullReferenceError -13
|
853
853
|
|
854
854
|
|
@@ -962,7 +962,7 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
|
|
962
962
|
* can be passed as an argument to API functions like Data_Wrap_Struct()
|
963
963
|
* and Data_Make_Struct().
|
964
964
|
*/
|
965
|
-
|
965
|
+
|
966
966
|
#ifdef __cplusplus
|
967
967
|
# ifndef RUBY_METHOD_FUNC /* These definitions should work for Ruby 1.4.6 */
|
968
968
|
# define PROTECTFUNC(f) ((VALUE (*)()) f)
|
@@ -1024,7 +1024,7 @@ static VALUE _mSWIG = Qnil;
|
|
1024
1024
|
exceptions. Note this only works for C++ since a global cannot be
|
1025
1025
|
initialized by a function in C. For C, fallback to rb_eRuntimeError.*/
|
1026
1026
|
|
1027
|
-
SWIGINTERN VALUE
|
1027
|
+
SWIGINTERN VALUE
|
1028
1028
|
getNullReferenceError(void) {
|
1029
1029
|
static int init = 0;
|
1030
1030
|
static VALUE rb_eNullReferenceError ;
|
@@ -1033,9 +1033,9 @@ getNullReferenceError(void) {
|
|
1033
1033
|
rb_eNullReferenceError = rb_define_class("NullReferenceError", rb_eRuntimeError);
|
1034
1034
|
}
|
1035
1035
|
return rb_eNullReferenceError;
|
1036
|
-
}
|
1036
|
+
}
|
1037
1037
|
|
1038
|
-
SWIGINTERN VALUE
|
1038
|
+
SWIGINTERN VALUE
|
1039
1039
|
getObjectPreviouslyDeletedError(void) {
|
1040
1040
|
static int init = 0;
|
1041
1041
|
static VALUE rb_eObjectPreviouslyDeleted ;
|
@@ -1044,7 +1044,7 @@ getObjectPreviouslyDeletedError(void) {
|
|
1044
1044
|
rb_eObjectPreviouslyDeleted = rb_define_class("ObjectPreviouslyDeleted", rb_eRuntimeError);
|
1045
1045
|
}
|
1046
1046
|
return rb_eObjectPreviouslyDeleted;
|
1047
|
-
}
|
1047
|
+
}
|
1048
1048
|
|
1049
1049
|
|
1050
1050
|
SWIGINTERN VALUE
|
@@ -1103,10 +1103,10 @@ SWIG_Ruby_ErrorType(int SWIG_code) {
|
|
1103
1103
|
/* This function is called when a user inputs a wrong argument to
|
1104
1104
|
a method.
|
1105
1105
|
*/
|
1106
|
-
SWIGINTERN
|
1106
|
+
SWIGINTERN
|
1107
1107
|
const char* Ruby_Format_TypeError( const char* msg,
|
1108
|
-
const char* type,
|
1109
|
-
const char* name,
|
1108
|
+
const char* type,
|
1109
|
+
const char* name,
|
1110
1110
|
const int argn,
|
1111
1111
|
VALUE input )
|
1112
1112
|
{
|
@@ -1151,17 +1151,17 @@ const char* Ruby_Format_TypeError( const char* msg,
|
|
1151
1151
|
}
|
1152
1152
|
|
1153
1153
|
/* This function is called when an overloaded method fails */
|
1154
|
-
SWIGINTERN
|
1154
|
+
SWIGINTERN
|
1155
1155
|
void Ruby_Format_OverloadedError(
|
1156
1156
|
const int argc,
|
1157
1157
|
const int maxargs,
|
1158
|
-
const char* method,
|
1159
|
-
const char* prototypes
|
1158
|
+
const char* method,
|
1159
|
+
const char* prototypes
|
1160
1160
|
)
|
1161
1161
|
{
|
1162
1162
|
const char* msg = "Wrong # of arguments";
|
1163
1163
|
if ( argc <= maxargs ) msg = "Wrong arguments";
|
1164
|
-
rb_raise(rb_eArgError,"%s for overloaded method '%s'.\n"
|
1164
|
+
rb_raise(rb_eArgError,"%s for overloaded method '%s'.\n"
|
1165
1165
|
"Possible C/C++ prototypes are:\n%s",
|
1166
1166
|
msg, method, prototypes);
|
1167
1167
|
}
|
@@ -1169,7 +1169,7 @@ void Ruby_Format_OverloadedError(
|
|
1169
1169
|
/* -----------------------------------------------------------------------------
|
1170
1170
|
* rubytracking.swg
|
1171
1171
|
*
|
1172
|
-
* This file contains support for tracking mappings from
|
1172
|
+
* This file contains support for tracking mappings from
|
1173
1173
|
* Ruby objects to C++ objects. This functionality is needed
|
1174
1174
|
* to implement mark functions for Ruby's mark and sweep
|
1175
1175
|
* garbage collector.
|
@@ -1192,7 +1192,7 @@ extern "C" {
|
|
1192
1192
|
|
1193
1193
|
|
1194
1194
|
/* Global Ruby hash table to store Trackings from C/C++
|
1195
|
-
structs to Ruby Objects.
|
1195
|
+
structs to Ruby Objects.
|
1196
1196
|
*/
|
1197
1197
|
static VALUE swig_ruby_trackings = Qnil;
|
1198
1198
|
|
@@ -1202,10 +1202,10 @@ static ID swig_ruby_hash_delete;
|
|
1202
1202
|
|
1203
1203
|
/* Setup a Ruby hash table to store Trackings */
|
1204
1204
|
SWIGRUNTIME void SWIG_RubyInitializeTrackings(void) {
|
1205
|
-
/* Create a ruby hash table to store Trackings from C++
|
1205
|
+
/* Create a ruby hash table to store Trackings from C++
|
1206
1206
|
objects to Ruby objects. */
|
1207
1207
|
|
1208
|
-
/* Try to see if some other .so has already created a
|
1208
|
+
/* Try to see if some other .so has already created a
|
1209
1209
|
tracking hash table, which we keep hidden in an instance var
|
1210
1210
|
in the SWIG module.
|
1211
1211
|
This is done to allow multiple DSOs to share the same
|
@@ -1217,7 +1217,7 @@ SWIGRUNTIME void SWIG_RubyInitializeTrackings(void) {
|
|
1217
1217
|
swig_ruby_trackings = rb_ivar_get( _mSWIG, trackings_id );
|
1218
1218
|
rb_gv_set("VERBOSE", verbose);
|
1219
1219
|
|
1220
|
-
/* No, it hasn't. Create one ourselves */
|
1220
|
+
/* No, it hasn't. Create one ourselves */
|
1221
1221
|
if ( swig_ruby_trackings == Qnil )
|
1222
1222
|
{
|
1223
1223
|
swig_ruby_trackings = rb_hash_new();
|
@@ -1284,7 +1284,7 @@ SWIGRUNTIME VALUE SWIG_RubyInstanceFor(void* ptr) {
|
|
1284
1284
|
|
1285
1285
|
/* Now lookup the value stored in the global hash table */
|
1286
1286
|
VALUE value = rb_hash_aref(swig_ruby_trackings, key);
|
1287
|
-
|
1287
|
+
|
1288
1288
|
if (value == Qnil) {
|
1289
1289
|
/* No object exists - return nil. */
|
1290
1290
|
return Qnil;
|
@@ -1398,24 +1398,24 @@ SWIG_Ruby_AppendOutput(VALUE target, VALUE o) {
|
|
1398
1398
|
|
1399
1399
|
/* Runtime API */
|
1400
1400
|
|
1401
|
-
#define SWIG_GetModule(clientdata) SWIG_Ruby_GetModule()
|
1401
|
+
#define SWIG_GetModule(clientdata) SWIG_Ruby_GetModule()
|
1402
1402
|
#define SWIG_SetModule(clientdata, pointer) SWIG_Ruby_SetModule(pointer)
|
1403
1403
|
|
1404
1404
|
|
1405
1405
|
/* Error manipulation */
|
1406
1406
|
|
1407
|
-
#define SWIG_ErrorType(code) SWIG_Ruby_ErrorType(code)
|
1407
|
+
#define SWIG_ErrorType(code) SWIG_Ruby_ErrorType(code)
|
1408
1408
|
#define SWIG_Error(code, msg) rb_raise(SWIG_Ruby_ErrorType(code), "%s", msg)
|
1409
|
-
#define SWIG_fail goto fail
|
1409
|
+
#define SWIG_fail goto fail
|
1410
1410
|
|
1411
1411
|
|
1412
1412
|
/* Ruby-specific SWIG API */
|
1413
1413
|
|
1414
|
-
#define SWIG_InitRuntime() SWIG_Ruby_InitRuntime()
|
1414
|
+
#define SWIG_InitRuntime() SWIG_Ruby_InitRuntime()
|
1415
1415
|
#define SWIG_define_class(ty) SWIG_Ruby_define_class(ty)
|
1416
1416
|
#define SWIG_NewClassInstance(value, ty) SWIG_Ruby_NewClassInstance(value, ty)
|
1417
|
-
#define SWIG_MangleStr(value) SWIG_Ruby_MangleStr(value)
|
1418
|
-
#define SWIG_CheckConvert(value, ty) SWIG_Ruby_CheckConvert(value, ty)
|
1417
|
+
#define SWIG_MangleStr(value) SWIG_Ruby_MangleStr(value)
|
1418
|
+
#define SWIG_CheckConvert(value, ty) SWIG_Ruby_CheckConvert(value, ty)
|
1419
1419
|
|
1420
1420
|
#include "assert.h"
|
1421
1421
|
|
@@ -1446,9 +1446,9 @@ static ID swig_call_id = 0;
|
|
1446
1446
|
|
1447
1447
|
/*
|
1448
1448
|
If your swig extension is to be run within an embedded ruby and has
|
1449
|
-
director callbacks, you should set -DRUBY_EMBEDDED during compilation.
|
1450
|
-
This will reset ruby's stack frame on each entry point from the main
|
1451
|
-
program the first time a virtual director function is invoked (in a
|
1449
|
+
director callbacks, you should set -DRUBY_EMBEDDED during compilation.
|
1450
|
+
This will reset ruby's stack frame on each entry point from the main
|
1451
|
+
program the first time a virtual director function is invoked (in a
|
1452
1452
|
non-recursive way).
|
1453
1453
|
If this is not done, you run the risk of Ruby trashing the stack.
|
1454
1454
|
*/
|
@@ -1474,7 +1474,7 @@ static ID swig_call_id = 0;
|
|
1474
1474
|
#endif /* RUBY_EMBEDDED */
|
1475
1475
|
|
1476
1476
|
|
1477
|
-
SWIGRUNTIME VALUE
|
1477
|
+
SWIGRUNTIME VALUE
|
1478
1478
|
getExceptionClass(void) {
|
1479
1479
|
static int init = 0;
|
1480
1480
|
static VALUE rubyExceptionClass ;
|
@@ -1483,7 +1483,7 @@ getExceptionClass(void) {
|
|
1483
1483
|
rubyExceptionClass = rb_const_get(_mSWIG, rb_intern("Exception"));
|
1484
1484
|
}
|
1485
1485
|
return rubyExceptionClass;
|
1486
|
-
}
|
1486
|
+
}
|
1487
1487
|
|
1488
1488
|
/* This code checks to see if the Ruby object being raised as part
|
1489
1489
|
of an exception inherits from the Ruby class Exception. If so,
|
@@ -1529,31 +1529,31 @@ SWIG_Ruby_define_class(swig_type_info *type)
|
|
1529
1529
|
SWIGRUNTIME VALUE
|
1530
1530
|
SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
|
1531
1531
|
{
|
1532
|
-
int own = flags & SWIG_POINTER_OWN;
|
1532
|
+
int own = flags & SWIG_POINTER_OWN;
|
1533
1533
|
int track;
|
1534
1534
|
char *klass_name;
|
1535
1535
|
swig_class *sklass;
|
1536
1536
|
VALUE klass;
|
1537
1537
|
VALUE obj;
|
1538
|
-
|
1538
|
+
|
1539
1539
|
if (!ptr)
|
1540
1540
|
return Qnil;
|
1541
|
-
|
1541
|
+
|
1542
1542
|
if (type->clientdata) {
|
1543
1543
|
sklass = (swig_class *) type->clientdata;
|
1544
|
-
|
1544
|
+
|
1545
1545
|
/* Are we tracking this class and have we already returned this Ruby object? */
|
1546
1546
|
track = sklass->trackObjects;
|
1547
1547
|
if (track) {
|
1548
1548
|
obj = SWIG_RubyInstanceFor(ptr);
|
1549
|
-
|
1549
|
+
|
1550
1550
|
/* Check the object's type and make sure it has the correct type.
|
1551
|
-
It might not in cases where methods do things like
|
1551
|
+
It might not in cases where methods do things like
|
1552
1552
|
downcast methods. */
|
1553
1553
|
if (obj != Qnil) {
|
1554
1554
|
VALUE value = rb_iv_get(obj, "@__swigtype__");
|
1555
1555
|
char* type_name = RSTRING_PTR(value);
|
1556
|
-
|
1556
|
+
|
1557
1557
|
if (strcmp(type->name, type_name) == 0) {
|
1558
1558
|
return obj;
|
1559
1559
|
}
|
@@ -1561,8 +1561,8 @@ SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
|
|
1561
1561
|
}
|
1562
1562
|
|
1563
1563
|
/* Create a new Ruby object */
|
1564
|
-
obj = Data_Wrap_Struct(sklass->klass, VOIDFUNC(sklass->mark),
|
1565
|
-
( own ? VOIDFUNC(sklass->destroy) :
|
1564
|
+
obj = Data_Wrap_Struct(sklass->klass, VOIDFUNC(sklass->mark),
|
1565
|
+
( own ? VOIDFUNC(sklass->destroy) :
|
1566
1566
|
(track ? VOIDFUNC(SWIG_RubyRemoveTracking) : 0 )
|
1567
1567
|
), ptr);
|
1568
1568
|
|
@@ -1578,7 +1578,7 @@ SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
|
|
1578
1578
|
obj = Data_Wrap_Struct(klass, 0, 0, ptr);
|
1579
1579
|
}
|
1580
1580
|
rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name));
|
1581
|
-
|
1581
|
+
|
1582
1582
|
return obj;
|
1583
1583
|
}
|
1584
1584
|
|
@@ -1633,13 +1633,13 @@ SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags,
|
|
1633
1633
|
}
|
1634
1634
|
Data_Get_Struct(obj, void, vptr);
|
1635
1635
|
}
|
1636
|
-
|
1636
|
+
|
1637
1637
|
if (own) *own = RDATA(obj)->dfree;
|
1638
|
-
|
1638
|
+
|
1639
1639
|
/* Check to see if the input object is giving up ownership
|
1640
1640
|
of the underlying C struct or C++ object. If so then we
|
1641
|
-
need to reset the destructor since the Ruby object no
|
1642
|
-
longer owns the underlying C++ object.*/
|
1641
|
+
need to reset the destructor since the Ruby object no
|
1642
|
+
longer owns the underlying C++ object.*/
|
1643
1643
|
if (flags & SWIG_POINTER_DISOWN) {
|
1644
1644
|
/* Is tracking on for this class? */
|
1645
1645
|
int track = 0;
|
@@ -1647,16 +1647,16 @@ SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags,
|
|
1647
1647
|
swig_class *sklass = (swig_class *) ty->clientdata;
|
1648
1648
|
track = sklass->trackObjects;
|
1649
1649
|
}
|
1650
|
-
|
1650
|
+
|
1651
1651
|
if (track) {
|
1652
1652
|
/* We are tracking objects for this class. Thus we change the destructor
|
1653
1653
|
* to SWIG_RubyRemoveTracking. This allows us to
|
1654
1654
|
* remove the mapping from the C++ to Ruby object
|
1655
1655
|
* when the Ruby object is garbage collected. If we don't
|
1656
|
-
* do this, then it is possible we will return a reference
|
1656
|
+
* do this, then it is possible we will return a reference
|
1657
1657
|
* to a Ruby object that no longer exists thereby crashing Ruby. */
|
1658
1658
|
RDATA(obj)->dfree = SWIG_RubyRemoveTracking;
|
1659
|
-
} else {
|
1659
|
+
} else {
|
1660
1660
|
RDATA(obj)->dfree = 0;
|
1661
1661
|
}
|
1662
1662
|
}
|
@@ -1687,7 +1687,7 @@ SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags,
|
|
1687
1687
|
} else {
|
1688
1688
|
*ptr = vptr;
|
1689
1689
|
}
|
1690
|
-
|
1690
|
+
|
1691
1691
|
return SWIG_OK;
|
1692
1692
|
}
|
1693
1693
|
|
@@ -1742,7 +1742,7 @@ SWIG_Ruby_GetModule(void)
|
|
1742
1742
|
|
1743
1743
|
/* temporarily disable warnings, since the pointer check causes warnings with 'ruby -w' */
|
1744
1744
|
rb_gv_set("VERBOSE", Qfalse);
|
1745
|
-
|
1745
|
+
|
1746
1746
|
/* first check if pointer already created */
|
1747
1747
|
pointer = rb_gv_get("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
|
1748
1748
|
if (pointer != Qnil) {
|
@@ -1754,7 +1754,7 @@ SWIG_Ruby_GetModule(void)
|
|
1754
1754
|
return ret;
|
1755
1755
|
}
|
1756
1756
|
|
1757
|
-
SWIGRUNTIME void
|
1757
|
+
SWIGRUNTIME void
|
1758
1758
|
SWIG_Ruby_SetModule(swig_module_info *pointer)
|
1759
1759
|
{
|
1760
1760
|
/* register a new class */
|
@@ -1805,9 +1805,9 @@ int SWIG_Ruby_arity( VALUE proc, int minimal )
|
|
1805
1805
|
|
1806
1806
|
|
1807
1807
|
|
1808
|
-
#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
|
1808
|
+
#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
|
1809
1809
|
|
1810
|
-
#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
|
1810
|
+
#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
|
1811
1811
|
|
1812
1812
|
|
1813
1813
|
|
@@ -1839,12 +1839,12 @@ static VALUE mLiblinearswig;
|
|
1839
1839
|
#define SWIG_RUBY_THREAD_END_BLOCK
|
1840
1840
|
|
1841
1841
|
|
1842
|
-
#define SWIGVERSION 0x020004
|
1842
|
+
#define SWIGVERSION 0x020004
|
1843
1843
|
#define SWIG_VERSION SWIGVERSION
|
1844
1844
|
|
1845
1845
|
|
1846
|
-
#define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
|
1847
|
-
#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
|
1846
|
+
#define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
|
1847
|
+
#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
|
1848
1848
|
|
1849
1849
|
|
1850
1850
|
#include <stdexcept>
|
@@ -1863,11 +1863,21 @@ static VALUE mLiblinearswig;
|
|
1863
1863
|
#endif
|
1864
1864
|
|
1865
1865
|
|
1866
|
+
#define SWIG_From_long LONG2NUM
|
1867
|
+
|
1868
|
+
|
1869
|
+
SWIGINTERNINLINE VALUE
|
1870
|
+
SWIG_From_int (int value)
|
1871
|
+
{
|
1872
|
+
return SWIG_From_long (value);
|
1873
|
+
}
|
1874
|
+
|
1875
|
+
|
1866
1876
|
SWIGINTERN VALUE
|
1867
1877
|
SWIG_ruby_failed(void)
|
1868
1878
|
{
|
1869
1879
|
return Qnil;
|
1870
|
-
}
|
1880
|
+
}
|
1871
1881
|
|
1872
1882
|
|
1873
1883
|
/*@SWIG:/usr/local/share/swig/2.0.4/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
|
@@ -1910,21 +1920,11 @@ SWIG_AsVal_int (VALUE obj, int *val)
|
|
1910
1920
|
} else {
|
1911
1921
|
if (val) *val = static_cast< int >(v);
|
1912
1922
|
}
|
1913
|
-
}
|
1923
|
+
}
|
1914
1924
|
return res;
|
1915
1925
|
}
|
1916
1926
|
|
1917
1927
|
|
1918
|
-
#define SWIG_From_long LONG2NUM
|
1919
|
-
|
1920
|
-
|
1921
|
-
SWIGINTERNINLINE VALUE
|
1922
|
-
SWIG_From_int (int value)
|
1923
|
-
{
|
1924
|
-
return SWIG_From_long (value);
|
1925
|
-
}
|
1926
|
-
|
1927
|
-
|
1928
1928
|
/*@SWIG:/usr/local/share/swig/2.0.4/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
|
1929
1929
|
SWIGINTERN VALUE SWIG_AUX_NUM2DBL(VALUE *args)
|
1930
1930
|
{
|
@@ -1954,7 +1954,7 @@ SWIG_AsVal_double (VALUE obj, double *val)
|
|
1954
1954
|
}
|
1955
1955
|
|
1956
1956
|
|
1957
|
-
#define SWIG_From_double rb_float_new
|
1957
|
+
#define SWIG_From_double rb_float_new
|
1958
1958
|
|
1959
1959
|
|
1960
1960
|
SWIGINTERN swig_type_info*
|
@@ -1975,7 +1975,7 @@ SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc)
|
|
1975
1975
|
{
|
1976
1976
|
if (TYPE(obj) == T_STRING) {
|
1977
1977
|
#if defined(StringValuePtr)
|
1978
|
-
char *cstr = StringValuePtr(obj);
|
1978
|
+
char *cstr = StringValuePtr(obj);
|
1979
1979
|
#else
|
1980
1980
|
char *cstr = STR2CSTR(obj);
|
1981
1981
|
#endif
|
@@ -2003,7 +2003,7 @@ SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc)
|
|
2003
2003
|
return SWIG_OK;
|
2004
2004
|
}
|
2005
2005
|
}
|
2006
|
-
}
|
2006
|
+
}
|
2007
2007
|
return SWIG_TypeError;
|
2008
2008
|
}
|
2009
2009
|
|
@@ -2011,13 +2011,13 @@ SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc)
|
|
2011
2011
|
|
2012
2012
|
|
2013
2013
|
|
2014
|
-
SWIGINTERNINLINE VALUE
|
2014
|
+
SWIGINTERNINLINE VALUE
|
2015
2015
|
SWIG_FromCharPtrAndSize(const char* carray, size_t size)
|
2016
2016
|
{
|
2017
2017
|
if (carray) {
|
2018
2018
|
if (size > LONG_MAX) {
|
2019
2019
|
swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
|
2020
|
-
return pchar_descriptor ?
|
2020
|
+
return pchar_descriptor ?
|
2021
2021
|
SWIG_NewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : Qnil;
|
2022
2022
|
} else {
|
2023
2023
|
return rb_str_new(carray, static_cast< long >(size));
|
@@ -2028,14 +2028,14 @@ SWIG_FromCharPtrAndSize(const char* carray, size_t size)
|
|
2028
2028
|
}
|
2029
2029
|
|
2030
2030
|
|
2031
|
-
SWIGINTERNINLINE VALUE
|
2031
|
+
SWIGINTERNINLINE VALUE
|
2032
2032
|
SWIG_FromCharPtr(const char *cptr)
|
2033
|
-
{
|
2033
|
+
{
|
2034
2034
|
return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
|
2035
2035
|
}
|
2036
2036
|
|
2037
2037
|
|
2038
|
-
static int *new_int(size_t nelements) {
|
2038
|
+
static int *new_int(size_t nelements) {
|
2039
2039
|
return (new int[nelements]);
|
2040
2040
|
}
|
2041
2041
|
|
@@ -2063,7 +2063,7 @@ SWIGINTERN VALUE SWIG_AUX_NUM2ULONG(VALUE *args)
|
|
2063
2063
|
/*@SWIG@*/
|
2064
2064
|
|
2065
2065
|
SWIGINTERN int
|
2066
|
-
SWIG_AsVal_unsigned_SS_long (VALUE obj, unsigned long *val)
|
2066
|
+
SWIG_AsVal_unsigned_SS_long (VALUE obj, unsigned long *val)
|
2067
2067
|
{
|
2068
2068
|
VALUE type = TYPE(obj);
|
2069
2069
|
if ((type == T_FIXNUM) || (type == T_BIGNUM)) {
|
@@ -2090,7 +2090,7 @@ SWIG_AsVal_size_t (VALUE obj, size_t *val)
|
|
2090
2090
|
}
|
2091
2091
|
|
2092
2092
|
|
2093
|
-
static double *new_double(size_t nelements) {
|
2093
|
+
static double *new_double(size_t nelements) {
|
2094
2094
|
return (new double[nelements]);
|
2095
2095
|
}
|
2096
2096
|
|
@@ -2154,6 +2154,31 @@ void disable_stdout() {
|
|
2154
2154
|
}
|
2155
2155
|
|
2156
2156
|
|
2157
|
+
SWIGINTERN VALUE
|
2158
|
+
_wrap_liblinear_version_get(VALUE self) {
|
2159
|
+
VALUE _val;
|
2160
|
+
|
2161
|
+
_val = SWIG_From_int(static_cast< int >(liblinear_version));
|
2162
|
+
return _val;
|
2163
|
+
}
|
2164
|
+
|
2165
|
+
|
2166
|
+
SWIGINTERN VALUE
|
2167
|
+
_wrap_liblinear_version_set(VALUE self, VALUE _val) {
|
2168
|
+
{
|
2169
|
+
int val;
|
2170
|
+
int res = SWIG_AsVal_int(_val, &val);
|
2171
|
+
if (!SWIG_IsOK(res)) {
|
2172
|
+
SWIG_exception_fail(SWIG_ArgError(res), "in variable '""liblinear_version""' of type '""int""'");
|
2173
|
+
}
|
2174
|
+
liblinear_version = static_cast< int >(val);
|
2175
|
+
}
|
2176
|
+
return _val;
|
2177
|
+
fail:
|
2178
|
+
return Qnil;
|
2179
|
+
}
|
2180
|
+
|
2181
|
+
|
2157
2182
|
swig_class SwigClassFeature_node;
|
2158
2183
|
|
2159
2184
|
SWIGINTERN VALUE
|
@@ -2164,19 +2189,19 @@ _wrap_feature_node_index_set(int argc, VALUE *argv, VALUE self) {
|
|
2164
2189
|
int res1 = 0 ;
|
2165
2190
|
int val2 ;
|
2166
2191
|
int ecode2 = 0 ;
|
2167
|
-
|
2192
|
+
|
2168
2193
|
if ((argc < 1) || (argc > 1)) {
|
2169
2194
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
2170
2195
|
}
|
2171
2196
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_feature_node, 0 | 0 );
|
2172
2197
|
if (!SWIG_IsOK(res1)) {
|
2173
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "feature_node *","index", 1, self ));
|
2198
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "feature_node *","index", 1, self ));
|
2174
2199
|
}
|
2175
2200
|
arg1 = reinterpret_cast< feature_node * >(argp1);
|
2176
2201
|
ecode2 = SWIG_AsVal_int(argv[0], &val2);
|
2177
2202
|
if (!SWIG_IsOK(ecode2)) {
|
2178
2203
|
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","index", 2, argv[0] ));
|
2179
|
-
}
|
2204
|
+
}
|
2180
2205
|
arg2 = static_cast< int >(val2);
|
2181
2206
|
if (arg1) (arg1)->index = arg2;
|
2182
2207
|
return Qnil;
|
@@ -2192,13 +2217,13 @@ _wrap_feature_node_index_get(int argc, VALUE *argv, VALUE self) {
|
|
2192
2217
|
int res1 = 0 ;
|
2193
2218
|
int result;
|
2194
2219
|
VALUE vresult = Qnil;
|
2195
|
-
|
2220
|
+
|
2196
2221
|
if ((argc < 0) || (argc > 0)) {
|
2197
2222
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
2198
2223
|
}
|
2199
2224
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_feature_node, 0 | 0 );
|
2200
2225
|
if (!SWIG_IsOK(res1)) {
|
2201
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "feature_node *","index", 1, self ));
|
2226
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "feature_node *","index", 1, self ));
|
2202
2227
|
}
|
2203
2228
|
arg1 = reinterpret_cast< feature_node * >(argp1);
|
2204
2229
|
result = (int) ((arg1)->index);
|
@@ -2217,19 +2242,19 @@ _wrap_feature_node_value_set(int argc, VALUE *argv, VALUE self) {
|
|
2217
2242
|
int res1 = 0 ;
|
2218
2243
|
double val2 ;
|
2219
2244
|
int ecode2 = 0 ;
|
2220
|
-
|
2245
|
+
|
2221
2246
|
if ((argc < 1) || (argc > 1)) {
|
2222
2247
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
2223
2248
|
}
|
2224
2249
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_feature_node, 0 | 0 );
|
2225
2250
|
if (!SWIG_IsOK(res1)) {
|
2226
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "feature_node *","value", 1, self ));
|
2251
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "feature_node *","value", 1, self ));
|
2227
2252
|
}
|
2228
2253
|
arg1 = reinterpret_cast< feature_node * >(argp1);
|
2229
2254
|
ecode2 = SWIG_AsVal_double(argv[0], &val2);
|
2230
2255
|
if (!SWIG_IsOK(ecode2)) {
|
2231
2256
|
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","value", 2, argv[0] ));
|
2232
|
-
}
|
2257
|
+
}
|
2233
2258
|
arg2 = static_cast< double >(val2);
|
2234
2259
|
if (arg1) (arg1)->value = arg2;
|
2235
2260
|
return Qnil;
|
@@ -2245,13 +2270,13 @@ _wrap_feature_node_value_get(int argc, VALUE *argv, VALUE self) {
|
|
2245
2270
|
int res1 = 0 ;
|
2246
2271
|
double result;
|
2247
2272
|
VALUE vresult = Qnil;
|
2248
|
-
|
2273
|
+
|
2249
2274
|
if ((argc < 0) || (argc > 0)) {
|
2250
2275
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
2251
2276
|
}
|
2252
2277
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_feature_node, 0 | 0 );
|
2253
2278
|
if (!SWIG_IsOK(res1)) {
|
2254
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "feature_node *","value", 1, self ));
|
2279
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "feature_node *","value", 1, self ));
|
2255
2280
|
}
|
2256
2281
|
arg1 = reinterpret_cast< feature_node * >(argp1);
|
2257
2282
|
result = (double) ((arg1)->value);
|
@@ -2269,20 +2294,20 @@ _wrap_feature_node_allocate(VALUE self) {
|
|
2269
2294
|
SWIGINTERN VALUE
|
2270
2295
|
_wrap_feature_node_allocate(int argc, VALUE *argv, VALUE self) {
|
2271
2296
|
#endif
|
2272
|
-
|
2273
|
-
|
2297
|
+
|
2298
|
+
|
2274
2299
|
VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_feature_node);
|
2275
2300
|
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
|
2276
2301
|
rb_obj_call_init(vresult, argc, argv);
|
2277
2302
|
#endif
|
2278
2303
|
return vresult;
|
2279
2304
|
}
|
2280
|
-
|
2305
|
+
|
2281
2306
|
|
2282
2307
|
SWIGINTERN VALUE
|
2283
2308
|
_wrap_new_feature_node(int argc, VALUE *argv, VALUE self) {
|
2284
2309
|
feature_node *result = 0 ;
|
2285
|
-
|
2310
|
+
|
2286
2311
|
if ((argc < 0) || (argc > 0)) {
|
2287
2312
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
2288
2313
|
}
|
@@ -2309,19 +2334,19 @@ _wrap_problem_l_set(int argc, VALUE *argv, VALUE self) {
|
|
2309
2334
|
int res1 = 0 ;
|
2310
2335
|
int val2 ;
|
2311
2336
|
int ecode2 = 0 ;
|
2312
|
-
|
2337
|
+
|
2313
2338
|
if ((argc < 1) || (argc > 1)) {
|
2314
2339
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
2315
2340
|
}
|
2316
2341
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_problem, 0 | 0 );
|
2317
2342
|
if (!SWIG_IsOK(res1)) {
|
2318
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "problem *","l", 1, self ));
|
2343
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "problem *","l", 1, self ));
|
2319
2344
|
}
|
2320
2345
|
arg1 = reinterpret_cast< problem * >(argp1);
|
2321
2346
|
ecode2 = SWIG_AsVal_int(argv[0], &val2);
|
2322
2347
|
if (!SWIG_IsOK(ecode2)) {
|
2323
2348
|
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","l", 2, argv[0] ));
|
2324
|
-
}
|
2349
|
+
}
|
2325
2350
|
arg2 = static_cast< int >(val2);
|
2326
2351
|
if (arg1) (arg1)->l = arg2;
|
2327
2352
|
return Qnil;
|
@@ -2337,13 +2362,13 @@ _wrap_problem_l_get(int argc, VALUE *argv, VALUE self) {
|
|
2337
2362
|
int res1 = 0 ;
|
2338
2363
|
int result;
|
2339
2364
|
VALUE vresult = Qnil;
|
2340
|
-
|
2365
|
+
|
2341
2366
|
if ((argc < 0) || (argc > 0)) {
|
2342
2367
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
2343
2368
|
}
|
2344
2369
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_problem, 0 | 0 );
|
2345
2370
|
if (!SWIG_IsOK(res1)) {
|
2346
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "problem *","l", 1, self ));
|
2371
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "problem *","l", 1, self ));
|
2347
2372
|
}
|
2348
2373
|
arg1 = reinterpret_cast< problem * >(argp1);
|
2349
2374
|
result = (int) ((arg1)->l);
|
@@ -2362,19 +2387,19 @@ _wrap_problem_n_set(int argc, VALUE *argv, VALUE self) {
|
|
2362
2387
|
int res1 = 0 ;
|
2363
2388
|
int val2 ;
|
2364
2389
|
int ecode2 = 0 ;
|
2365
|
-
|
2390
|
+
|
2366
2391
|
if ((argc < 1) || (argc > 1)) {
|
2367
2392
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
2368
2393
|
}
|
2369
2394
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_problem, 0 | 0 );
|
2370
2395
|
if (!SWIG_IsOK(res1)) {
|
2371
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "problem *","n", 1, self ));
|
2396
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "problem *","n", 1, self ));
|
2372
2397
|
}
|
2373
2398
|
arg1 = reinterpret_cast< problem * >(argp1);
|
2374
2399
|
ecode2 = SWIG_AsVal_int(argv[0], &val2);
|
2375
2400
|
if (!SWIG_IsOK(ecode2)) {
|
2376
2401
|
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","n", 2, argv[0] ));
|
2377
|
-
}
|
2402
|
+
}
|
2378
2403
|
arg2 = static_cast< int >(val2);
|
2379
2404
|
if (arg1) (arg1)->n = arg2;
|
2380
2405
|
return Qnil;
|
@@ -2390,13 +2415,13 @@ _wrap_problem_n_get(int argc, VALUE *argv, VALUE self) {
|
|
2390
2415
|
int res1 = 0 ;
|
2391
2416
|
int result;
|
2392
2417
|
VALUE vresult = Qnil;
|
2393
|
-
|
2418
|
+
|
2394
2419
|
if ((argc < 0) || (argc > 0)) {
|
2395
2420
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
2396
2421
|
}
|
2397
2422
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_problem, 0 | 0 );
|
2398
2423
|
if (!SWIG_IsOK(res1)) {
|
2399
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "problem *","n", 1, self ));
|
2424
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "problem *","n", 1, self ));
|
2400
2425
|
}
|
2401
2426
|
arg1 = reinterpret_cast< problem * >(argp1);
|
2402
2427
|
result = (int) ((arg1)->n);
|
@@ -2415,18 +2440,18 @@ _wrap_problem_y_set(int argc, VALUE *argv, VALUE self) {
|
|
2415
2440
|
int res1 = 0 ;
|
2416
2441
|
void *argp2 = 0 ;
|
2417
2442
|
int res2 = 0 ;
|
2418
|
-
|
2443
|
+
|
2419
2444
|
if ((argc < 1) || (argc > 1)) {
|
2420
2445
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
2421
2446
|
}
|
2422
2447
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_problem, 0 | 0 );
|
2423
2448
|
if (!SWIG_IsOK(res1)) {
|
2424
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "problem *","y", 1, self ));
|
2449
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "problem *","y", 1, self ));
|
2425
2450
|
}
|
2426
2451
|
arg1 = reinterpret_cast< problem * >(argp1);
|
2427
2452
|
res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_double, SWIG_POINTER_DISOWN | 0 );
|
2428
2453
|
if (!SWIG_IsOK(res2)) {
|
2429
|
-
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "double *","y", 2, argv[0] ));
|
2454
|
+
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "double *","y", 2, argv[0] ));
|
2430
2455
|
}
|
2431
2456
|
arg2 = reinterpret_cast< double * >(argp2);
|
2432
2457
|
if (arg1) (arg1)->y = arg2;
|
@@ -2443,13 +2468,13 @@ _wrap_problem_y_get(int argc, VALUE *argv, VALUE self) {
|
|
2443
2468
|
int res1 = 0 ;
|
2444
2469
|
double *result = 0 ;
|
2445
2470
|
VALUE vresult = Qnil;
|
2446
|
-
|
2471
|
+
|
2447
2472
|
if ((argc < 0) || (argc > 0)) {
|
2448
2473
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
2449
2474
|
}
|
2450
2475
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_problem, 0 | 0 );
|
2451
2476
|
if (!SWIG_IsOK(res1)) {
|
2452
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "problem *","y", 1, self ));
|
2477
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "problem *","y", 1, self ));
|
2453
2478
|
}
|
2454
2479
|
arg1 = reinterpret_cast< problem * >(argp1);
|
2455
2480
|
result = (double *) ((arg1)->y);
|
@@ -2468,18 +2493,18 @@ _wrap_problem_x_set(int argc, VALUE *argv, VALUE self) {
|
|
2468
2493
|
int res1 = 0 ;
|
2469
2494
|
void *argp2 = 0 ;
|
2470
2495
|
int res2 = 0 ;
|
2471
|
-
|
2496
|
+
|
2472
2497
|
if ((argc < 1) || (argc > 1)) {
|
2473
2498
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
2474
2499
|
}
|
2475
2500
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_problem, 0 | 0 );
|
2476
2501
|
if (!SWIG_IsOK(res1)) {
|
2477
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "problem *","x", 1, self ));
|
2502
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "problem *","x", 1, self ));
|
2478
2503
|
}
|
2479
2504
|
arg1 = reinterpret_cast< problem * >(argp1);
|
2480
2505
|
res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_p_feature_node, 0 | 0 );
|
2481
2506
|
if (!SWIG_IsOK(res2)) {
|
2482
|
-
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "feature_node **","x", 2, argv[0] ));
|
2507
|
+
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "feature_node **","x", 2, argv[0] ));
|
2483
2508
|
}
|
2484
2509
|
arg2 = reinterpret_cast< feature_node ** >(argp2);
|
2485
2510
|
if (arg1) (arg1)->x = arg2;
|
@@ -2496,13 +2521,13 @@ _wrap_problem_x_get(int argc, VALUE *argv, VALUE self) {
|
|
2496
2521
|
int res1 = 0 ;
|
2497
2522
|
feature_node **result = 0 ;
|
2498
2523
|
VALUE vresult = Qnil;
|
2499
|
-
|
2524
|
+
|
2500
2525
|
if ((argc < 0) || (argc > 0)) {
|
2501
2526
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
2502
2527
|
}
|
2503
2528
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_problem, 0 | 0 );
|
2504
2529
|
if (!SWIG_IsOK(res1)) {
|
2505
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "problem *","x", 1, self ));
|
2530
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "problem *","x", 1, self ));
|
2506
2531
|
}
|
2507
2532
|
arg1 = reinterpret_cast< problem * >(argp1);
|
2508
2533
|
result = (feature_node **) ((arg1)->x);
|
@@ -2521,19 +2546,19 @@ _wrap_problem_bias_set(int argc, VALUE *argv, VALUE self) {
|
|
2521
2546
|
int res1 = 0 ;
|
2522
2547
|
double val2 ;
|
2523
2548
|
int ecode2 = 0 ;
|
2524
|
-
|
2549
|
+
|
2525
2550
|
if ((argc < 1) || (argc > 1)) {
|
2526
2551
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
2527
2552
|
}
|
2528
2553
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_problem, 0 | 0 );
|
2529
2554
|
if (!SWIG_IsOK(res1)) {
|
2530
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "problem *","bias", 1, self ));
|
2555
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "problem *","bias", 1, self ));
|
2531
2556
|
}
|
2532
2557
|
arg1 = reinterpret_cast< problem * >(argp1);
|
2533
2558
|
ecode2 = SWIG_AsVal_double(argv[0], &val2);
|
2534
2559
|
if (!SWIG_IsOK(ecode2)) {
|
2535
2560
|
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","bias", 2, argv[0] ));
|
2536
|
-
}
|
2561
|
+
}
|
2537
2562
|
arg2 = static_cast< double >(val2);
|
2538
2563
|
if (arg1) (arg1)->bias = arg2;
|
2539
2564
|
return Qnil;
|
@@ -2549,13 +2574,13 @@ _wrap_problem_bias_get(int argc, VALUE *argv, VALUE self) {
|
|
2549
2574
|
int res1 = 0 ;
|
2550
2575
|
double result;
|
2551
2576
|
VALUE vresult = Qnil;
|
2552
|
-
|
2577
|
+
|
2553
2578
|
if ((argc < 0) || (argc > 0)) {
|
2554
2579
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
2555
2580
|
}
|
2556
2581
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_problem, 0 | 0 );
|
2557
2582
|
if (!SWIG_IsOK(res1)) {
|
2558
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "problem *","bias", 1, self ));
|
2583
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "problem *","bias", 1, self ));
|
2559
2584
|
}
|
2560
2585
|
arg1 = reinterpret_cast< problem * >(argp1);
|
2561
2586
|
result = (double) ((arg1)->bias);
|
@@ -2573,20 +2598,20 @@ _wrap_problem_allocate(VALUE self) {
|
|
2573
2598
|
SWIGINTERN VALUE
|
2574
2599
|
_wrap_problem_allocate(int argc, VALUE *argv, VALUE self) {
|
2575
2600
|
#endif
|
2576
|
-
|
2577
|
-
|
2601
|
+
|
2602
|
+
|
2578
2603
|
VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_problem);
|
2579
2604
|
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
|
2580
2605
|
rb_obj_call_init(vresult, argc, argv);
|
2581
2606
|
#endif
|
2582
2607
|
return vresult;
|
2583
2608
|
}
|
2584
|
-
|
2609
|
+
|
2585
2610
|
|
2586
2611
|
SWIGINTERN VALUE
|
2587
2612
|
_wrap_new_problem(int argc, VALUE *argv, VALUE self) {
|
2588
2613
|
problem *result = 0 ;
|
2589
|
-
|
2614
|
+
|
2590
2615
|
if ((argc < 0) || (argc > 0)) {
|
2591
2616
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
2592
2617
|
}
|
@@ -2613,19 +2638,19 @@ _wrap_parameter_solver_type_set(int argc, VALUE *argv, VALUE self) {
|
|
2613
2638
|
int res1 = 0 ;
|
2614
2639
|
int val2 ;
|
2615
2640
|
int ecode2 = 0 ;
|
2616
|
-
|
2641
|
+
|
2617
2642
|
if ((argc < 1) || (argc > 1)) {
|
2618
2643
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
2619
2644
|
}
|
2620
2645
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_parameter, 0 | 0 );
|
2621
2646
|
if (!SWIG_IsOK(res1)) {
|
2622
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "parameter *","solver_type", 1, self ));
|
2647
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "parameter *","solver_type", 1, self ));
|
2623
2648
|
}
|
2624
2649
|
arg1 = reinterpret_cast< parameter * >(argp1);
|
2625
2650
|
ecode2 = SWIG_AsVal_int(argv[0], &val2);
|
2626
2651
|
if (!SWIG_IsOK(ecode2)) {
|
2627
2652
|
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","solver_type", 2, argv[0] ));
|
2628
|
-
}
|
2653
|
+
}
|
2629
2654
|
arg2 = static_cast< int >(val2);
|
2630
2655
|
if (arg1) (arg1)->solver_type = arg2;
|
2631
2656
|
return Qnil;
|
@@ -2641,13 +2666,13 @@ _wrap_parameter_solver_type_get(int argc, VALUE *argv, VALUE self) {
|
|
2641
2666
|
int res1 = 0 ;
|
2642
2667
|
int result;
|
2643
2668
|
VALUE vresult = Qnil;
|
2644
|
-
|
2669
|
+
|
2645
2670
|
if ((argc < 0) || (argc > 0)) {
|
2646
2671
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
2647
2672
|
}
|
2648
2673
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_parameter, 0 | 0 );
|
2649
2674
|
if (!SWIG_IsOK(res1)) {
|
2650
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "parameter *","solver_type", 1, self ));
|
2675
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "parameter *","solver_type", 1, self ));
|
2651
2676
|
}
|
2652
2677
|
arg1 = reinterpret_cast< parameter * >(argp1);
|
2653
2678
|
result = (int) ((arg1)->solver_type);
|
@@ -2666,19 +2691,19 @@ _wrap_parameter_eps_set(int argc, VALUE *argv, VALUE self) {
|
|
2666
2691
|
int res1 = 0 ;
|
2667
2692
|
double val2 ;
|
2668
2693
|
int ecode2 = 0 ;
|
2669
|
-
|
2694
|
+
|
2670
2695
|
if ((argc < 1) || (argc > 1)) {
|
2671
2696
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
2672
2697
|
}
|
2673
2698
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_parameter, 0 | 0 );
|
2674
2699
|
if (!SWIG_IsOK(res1)) {
|
2675
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "parameter *","eps", 1, self ));
|
2700
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "parameter *","eps", 1, self ));
|
2676
2701
|
}
|
2677
2702
|
arg1 = reinterpret_cast< parameter * >(argp1);
|
2678
2703
|
ecode2 = SWIG_AsVal_double(argv[0], &val2);
|
2679
2704
|
if (!SWIG_IsOK(ecode2)) {
|
2680
2705
|
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","eps", 2, argv[0] ));
|
2681
|
-
}
|
2706
|
+
}
|
2682
2707
|
arg2 = static_cast< double >(val2);
|
2683
2708
|
if (arg1) (arg1)->eps = arg2;
|
2684
2709
|
return Qnil;
|
@@ -2694,13 +2719,13 @@ _wrap_parameter_eps_get(int argc, VALUE *argv, VALUE self) {
|
|
2694
2719
|
int res1 = 0 ;
|
2695
2720
|
double result;
|
2696
2721
|
VALUE vresult = Qnil;
|
2697
|
-
|
2722
|
+
|
2698
2723
|
if ((argc < 0) || (argc > 0)) {
|
2699
2724
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
2700
2725
|
}
|
2701
2726
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_parameter, 0 | 0 );
|
2702
2727
|
if (!SWIG_IsOK(res1)) {
|
2703
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "parameter *","eps", 1, self ));
|
2728
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "parameter *","eps", 1, self ));
|
2704
2729
|
}
|
2705
2730
|
arg1 = reinterpret_cast< parameter * >(argp1);
|
2706
2731
|
result = (double) ((arg1)->eps);
|
@@ -2719,19 +2744,19 @@ _wrap_parameter_C_set(int argc, VALUE *argv, VALUE self) {
|
|
2719
2744
|
int res1 = 0 ;
|
2720
2745
|
double val2 ;
|
2721
2746
|
int ecode2 = 0 ;
|
2722
|
-
|
2747
|
+
|
2723
2748
|
if ((argc < 1) || (argc > 1)) {
|
2724
2749
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
2725
2750
|
}
|
2726
2751
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_parameter, 0 | 0 );
|
2727
2752
|
if (!SWIG_IsOK(res1)) {
|
2728
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "parameter *","C", 1, self ));
|
2753
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "parameter *","C", 1, self ));
|
2729
2754
|
}
|
2730
2755
|
arg1 = reinterpret_cast< parameter * >(argp1);
|
2731
2756
|
ecode2 = SWIG_AsVal_double(argv[0], &val2);
|
2732
2757
|
if (!SWIG_IsOK(ecode2)) {
|
2733
2758
|
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","C", 2, argv[0] ));
|
2734
|
-
}
|
2759
|
+
}
|
2735
2760
|
arg2 = static_cast< double >(val2);
|
2736
2761
|
if (arg1) (arg1)->C = arg2;
|
2737
2762
|
return Qnil;
|
@@ -2747,13 +2772,13 @@ _wrap_parameter_C_get(int argc, VALUE *argv, VALUE self) {
|
|
2747
2772
|
int res1 = 0 ;
|
2748
2773
|
double result;
|
2749
2774
|
VALUE vresult = Qnil;
|
2750
|
-
|
2775
|
+
|
2751
2776
|
if ((argc < 0) || (argc > 0)) {
|
2752
2777
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
2753
2778
|
}
|
2754
2779
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_parameter, 0 | 0 );
|
2755
2780
|
if (!SWIG_IsOK(res1)) {
|
2756
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "parameter *","C", 1, self ));
|
2781
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "parameter *","C", 1, self ));
|
2757
2782
|
}
|
2758
2783
|
arg1 = reinterpret_cast< parameter * >(argp1);
|
2759
2784
|
result = (double) ((arg1)->C);
|
@@ -2772,19 +2797,19 @@ _wrap_parameter_nr_weight_set(int argc, VALUE *argv, VALUE self) {
|
|
2772
2797
|
int res1 = 0 ;
|
2773
2798
|
int val2 ;
|
2774
2799
|
int ecode2 = 0 ;
|
2775
|
-
|
2800
|
+
|
2776
2801
|
if ((argc < 1) || (argc > 1)) {
|
2777
2802
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
2778
2803
|
}
|
2779
2804
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_parameter, 0 | 0 );
|
2780
2805
|
if (!SWIG_IsOK(res1)) {
|
2781
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "parameter *","nr_weight", 1, self ));
|
2806
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "parameter *","nr_weight", 1, self ));
|
2782
2807
|
}
|
2783
2808
|
arg1 = reinterpret_cast< parameter * >(argp1);
|
2784
2809
|
ecode2 = SWIG_AsVal_int(argv[0], &val2);
|
2785
2810
|
if (!SWIG_IsOK(ecode2)) {
|
2786
2811
|
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","nr_weight", 2, argv[0] ));
|
2787
|
-
}
|
2812
|
+
}
|
2788
2813
|
arg2 = static_cast< int >(val2);
|
2789
2814
|
if (arg1) (arg1)->nr_weight = arg2;
|
2790
2815
|
return Qnil;
|
@@ -2800,13 +2825,13 @@ _wrap_parameter_nr_weight_get(int argc, VALUE *argv, VALUE self) {
|
|
2800
2825
|
int res1 = 0 ;
|
2801
2826
|
int result;
|
2802
2827
|
VALUE vresult = Qnil;
|
2803
|
-
|
2828
|
+
|
2804
2829
|
if ((argc < 0) || (argc > 0)) {
|
2805
2830
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
2806
2831
|
}
|
2807
2832
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_parameter, 0 | 0 );
|
2808
2833
|
if (!SWIG_IsOK(res1)) {
|
2809
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "parameter *","nr_weight", 1, self ));
|
2834
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "parameter *","nr_weight", 1, self ));
|
2810
2835
|
}
|
2811
2836
|
arg1 = reinterpret_cast< parameter * >(argp1);
|
2812
2837
|
result = (int) ((arg1)->nr_weight);
|
@@ -2825,18 +2850,18 @@ _wrap_parameter_weight_label_set(int argc, VALUE *argv, VALUE self) {
|
|
2825
2850
|
int res1 = 0 ;
|
2826
2851
|
void *argp2 = 0 ;
|
2827
2852
|
int res2 = 0 ;
|
2828
|
-
|
2853
|
+
|
2829
2854
|
if ((argc < 1) || (argc > 1)) {
|
2830
2855
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
2831
2856
|
}
|
2832
2857
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_parameter, 0 | 0 );
|
2833
2858
|
if (!SWIG_IsOK(res1)) {
|
2834
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "parameter *","weight_label", 1, self ));
|
2859
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "parameter *","weight_label", 1, self ));
|
2835
2860
|
}
|
2836
2861
|
arg1 = reinterpret_cast< parameter * >(argp1);
|
2837
2862
|
res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_int, SWIG_POINTER_DISOWN | 0 );
|
2838
2863
|
if (!SWIG_IsOK(res2)) {
|
2839
|
-
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "int *","weight_label", 2, argv[0] ));
|
2864
|
+
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "int *","weight_label", 2, argv[0] ));
|
2840
2865
|
}
|
2841
2866
|
arg2 = reinterpret_cast< int * >(argp2);
|
2842
2867
|
if (arg1) (arg1)->weight_label = arg2;
|
@@ -2853,13 +2878,13 @@ _wrap_parameter_weight_label_get(int argc, VALUE *argv, VALUE self) {
|
|
2853
2878
|
int res1 = 0 ;
|
2854
2879
|
int *result = 0 ;
|
2855
2880
|
VALUE vresult = Qnil;
|
2856
|
-
|
2881
|
+
|
2857
2882
|
if ((argc < 0) || (argc > 0)) {
|
2858
2883
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
2859
2884
|
}
|
2860
2885
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_parameter, 0 | 0 );
|
2861
2886
|
if (!SWIG_IsOK(res1)) {
|
2862
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "parameter *","weight_label", 1, self ));
|
2887
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "parameter *","weight_label", 1, self ));
|
2863
2888
|
}
|
2864
2889
|
arg1 = reinterpret_cast< parameter * >(argp1);
|
2865
2890
|
result = (int *) ((arg1)->weight_label);
|
@@ -2878,18 +2903,18 @@ _wrap_parameter_weight_set(int argc, VALUE *argv, VALUE self) {
|
|
2878
2903
|
int res1 = 0 ;
|
2879
2904
|
void *argp2 = 0 ;
|
2880
2905
|
int res2 = 0 ;
|
2881
|
-
|
2906
|
+
|
2882
2907
|
if ((argc < 1) || (argc > 1)) {
|
2883
2908
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
2884
2909
|
}
|
2885
2910
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_parameter, 0 | 0 );
|
2886
2911
|
if (!SWIG_IsOK(res1)) {
|
2887
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "parameter *","weight", 1, self ));
|
2912
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "parameter *","weight", 1, self ));
|
2888
2913
|
}
|
2889
2914
|
arg1 = reinterpret_cast< parameter * >(argp1);
|
2890
2915
|
res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_double, SWIG_POINTER_DISOWN | 0 );
|
2891
2916
|
if (!SWIG_IsOK(res2)) {
|
2892
|
-
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "double *","weight", 2, argv[0] ));
|
2917
|
+
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "double *","weight", 2, argv[0] ));
|
2893
2918
|
}
|
2894
2919
|
arg2 = reinterpret_cast< double * >(argp2);
|
2895
2920
|
if (arg1) (arg1)->weight = arg2;
|
@@ -2906,13 +2931,13 @@ _wrap_parameter_weight_get(int argc, VALUE *argv, VALUE self) {
|
|
2906
2931
|
int res1 = 0 ;
|
2907
2932
|
double *result = 0 ;
|
2908
2933
|
VALUE vresult = Qnil;
|
2909
|
-
|
2934
|
+
|
2910
2935
|
if ((argc < 0) || (argc > 0)) {
|
2911
2936
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
2912
2937
|
}
|
2913
2938
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_parameter, 0 | 0 );
|
2914
2939
|
if (!SWIG_IsOK(res1)) {
|
2915
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "parameter *","weight", 1, self ));
|
2940
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "parameter *","weight", 1, self ));
|
2916
2941
|
}
|
2917
2942
|
arg1 = reinterpret_cast< parameter * >(argp1);
|
2918
2943
|
result = (double *) ((arg1)->weight);
|
@@ -2931,19 +2956,19 @@ _wrap_parameter_p_set(int argc, VALUE *argv, VALUE self) {
|
|
2931
2956
|
int res1 = 0 ;
|
2932
2957
|
double val2 ;
|
2933
2958
|
int ecode2 = 0 ;
|
2934
|
-
|
2959
|
+
|
2935
2960
|
if ((argc < 1) || (argc > 1)) {
|
2936
2961
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
2937
2962
|
}
|
2938
2963
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_parameter, 0 | 0 );
|
2939
2964
|
if (!SWIG_IsOK(res1)) {
|
2940
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "parameter *","p", 1, self ));
|
2965
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "parameter *","p", 1, self ));
|
2941
2966
|
}
|
2942
2967
|
arg1 = reinterpret_cast< parameter * >(argp1);
|
2943
2968
|
ecode2 = SWIG_AsVal_double(argv[0], &val2);
|
2944
2969
|
if (!SWIG_IsOK(ecode2)) {
|
2945
2970
|
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","p", 2, argv[0] ));
|
2946
|
-
}
|
2971
|
+
}
|
2947
2972
|
arg2 = static_cast< double >(val2);
|
2948
2973
|
if (arg1) (arg1)->p = arg2;
|
2949
2974
|
return Qnil;
|
@@ -2959,13 +2984,13 @@ _wrap_parameter_p_get(int argc, VALUE *argv, VALUE self) {
|
|
2959
2984
|
int res1 = 0 ;
|
2960
2985
|
double result;
|
2961
2986
|
VALUE vresult = Qnil;
|
2962
|
-
|
2987
|
+
|
2963
2988
|
if ((argc < 0) || (argc > 0)) {
|
2964
2989
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
2965
2990
|
}
|
2966
2991
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_parameter, 0 | 0 );
|
2967
2992
|
if (!SWIG_IsOK(res1)) {
|
2968
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "parameter *","p", 1, self ));
|
2993
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "parameter *","p", 1, self ));
|
2969
2994
|
}
|
2970
2995
|
arg1 = reinterpret_cast< parameter * >(argp1);
|
2971
2996
|
result = (double) ((arg1)->p);
|
@@ -2984,18 +3009,18 @@ _wrap_parameter_init_sol_set(int argc, VALUE *argv, VALUE self) {
|
|
2984
3009
|
int res1 = 0 ;
|
2985
3010
|
void *argp2 = 0 ;
|
2986
3011
|
int res2 = 0 ;
|
2987
|
-
|
3012
|
+
|
2988
3013
|
if ((argc < 1) || (argc > 1)) {
|
2989
3014
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
2990
3015
|
}
|
2991
3016
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_parameter, 0 | 0 );
|
2992
3017
|
if (!SWIG_IsOK(res1)) {
|
2993
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "parameter *","init_sol", 1, self ));
|
3018
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "parameter *","init_sol", 1, self ));
|
2994
3019
|
}
|
2995
3020
|
arg1 = reinterpret_cast< parameter * >(argp1);
|
2996
3021
|
res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_double, SWIG_POINTER_DISOWN | 0 );
|
2997
3022
|
if (!SWIG_IsOK(res2)) {
|
2998
|
-
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "double *","init_sol", 2, argv[0] ));
|
3023
|
+
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "double *","init_sol", 2, argv[0] ));
|
2999
3024
|
}
|
3000
3025
|
arg2 = reinterpret_cast< double * >(argp2);
|
3001
3026
|
if (arg1) (arg1)->init_sol = arg2;
|
@@ -3012,13 +3037,13 @@ _wrap_parameter_init_sol_get(int argc, VALUE *argv, VALUE self) {
|
|
3012
3037
|
int res1 = 0 ;
|
3013
3038
|
double *result = 0 ;
|
3014
3039
|
VALUE vresult = Qnil;
|
3015
|
-
|
3040
|
+
|
3016
3041
|
if ((argc < 0) || (argc > 0)) {
|
3017
3042
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
3018
3043
|
}
|
3019
3044
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_parameter, 0 | 0 );
|
3020
3045
|
if (!SWIG_IsOK(res1)) {
|
3021
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "parameter *","init_sol", 1, self ));
|
3046
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "parameter *","init_sol", 1, self ));
|
3022
3047
|
}
|
3023
3048
|
arg1 = reinterpret_cast< parameter * >(argp1);
|
3024
3049
|
result = (double *) ((arg1)->init_sol);
|
@@ -3036,20 +3061,20 @@ _wrap_parameter_allocate(VALUE self) {
|
|
3036
3061
|
SWIGINTERN VALUE
|
3037
3062
|
_wrap_parameter_allocate(int argc, VALUE *argv, VALUE self) {
|
3038
3063
|
#endif
|
3039
|
-
|
3040
|
-
|
3064
|
+
|
3065
|
+
|
3041
3066
|
VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_parameter);
|
3042
3067
|
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
|
3043
3068
|
rb_obj_call_init(vresult, argc, argv);
|
3044
3069
|
#endif
|
3045
3070
|
return vresult;
|
3046
3071
|
}
|
3047
|
-
|
3072
|
+
|
3048
3073
|
|
3049
3074
|
SWIGINTERN VALUE
|
3050
3075
|
_wrap_new_parameter(int argc, VALUE *argv, VALUE self) {
|
3051
3076
|
parameter *result = 0 ;
|
3052
|
-
|
3077
|
+
|
3053
3078
|
if ((argc < 0) || (argc > 0)) {
|
3054
3079
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
3055
3080
|
}
|
@@ -3076,18 +3101,18 @@ _wrap_model_param_set(int argc, VALUE *argv, VALUE self) {
|
|
3076
3101
|
int res1 = 0 ;
|
3077
3102
|
void *argp2 = 0 ;
|
3078
3103
|
int res2 = 0 ;
|
3079
|
-
|
3104
|
+
|
3080
3105
|
if ((argc < 1) || (argc > 1)) {
|
3081
3106
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
3082
3107
|
}
|
3083
3108
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_model, 0 | 0 );
|
3084
3109
|
if (!SWIG_IsOK(res1)) {
|
3085
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "model *","param", 1, self ));
|
3110
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "model *","param", 1, self ));
|
3086
3111
|
}
|
3087
3112
|
arg1 = reinterpret_cast< model * >(argp1);
|
3088
3113
|
res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_parameter, 0 | 0 );
|
3089
3114
|
if (!SWIG_IsOK(res2)) {
|
3090
|
-
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "parameter *","param", 2, argv[0] ));
|
3115
|
+
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "parameter *","param", 2, argv[0] ));
|
3091
3116
|
}
|
3092
3117
|
arg2 = reinterpret_cast< parameter * >(argp2);
|
3093
3118
|
if (arg1) (arg1)->param = *arg2;
|
@@ -3104,13 +3129,13 @@ _wrap_model_param_get(int argc, VALUE *argv, VALUE self) {
|
|
3104
3129
|
int res1 = 0 ;
|
3105
3130
|
parameter *result = 0 ;
|
3106
3131
|
VALUE vresult = Qnil;
|
3107
|
-
|
3132
|
+
|
3108
3133
|
if ((argc < 0) || (argc > 0)) {
|
3109
3134
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
3110
3135
|
}
|
3111
3136
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_model, 0 | 0 );
|
3112
3137
|
if (!SWIG_IsOK(res1)) {
|
3113
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "model *","param", 1, self ));
|
3138
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "model *","param", 1, self ));
|
3114
3139
|
}
|
3115
3140
|
arg1 = reinterpret_cast< model * >(argp1);
|
3116
3141
|
result = (parameter *)& ((arg1)->param);
|
@@ -3129,19 +3154,19 @@ _wrap_model_nr_class_set(int argc, VALUE *argv, VALUE self) {
|
|
3129
3154
|
int res1 = 0 ;
|
3130
3155
|
int val2 ;
|
3131
3156
|
int ecode2 = 0 ;
|
3132
|
-
|
3157
|
+
|
3133
3158
|
if ((argc < 1) || (argc > 1)) {
|
3134
3159
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
3135
3160
|
}
|
3136
3161
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_model, 0 | 0 );
|
3137
3162
|
if (!SWIG_IsOK(res1)) {
|
3138
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "model *","nr_class", 1, self ));
|
3163
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "model *","nr_class", 1, self ));
|
3139
3164
|
}
|
3140
3165
|
arg1 = reinterpret_cast< model * >(argp1);
|
3141
3166
|
ecode2 = SWIG_AsVal_int(argv[0], &val2);
|
3142
3167
|
if (!SWIG_IsOK(ecode2)) {
|
3143
3168
|
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","nr_class", 2, argv[0] ));
|
3144
|
-
}
|
3169
|
+
}
|
3145
3170
|
arg2 = static_cast< int >(val2);
|
3146
3171
|
if (arg1) (arg1)->nr_class = arg2;
|
3147
3172
|
return Qnil;
|
@@ -3157,13 +3182,13 @@ _wrap_model_nr_class_get(int argc, VALUE *argv, VALUE self) {
|
|
3157
3182
|
int res1 = 0 ;
|
3158
3183
|
int result;
|
3159
3184
|
VALUE vresult = Qnil;
|
3160
|
-
|
3185
|
+
|
3161
3186
|
if ((argc < 0) || (argc > 0)) {
|
3162
3187
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
3163
3188
|
}
|
3164
3189
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_model, 0 | 0 );
|
3165
3190
|
if (!SWIG_IsOK(res1)) {
|
3166
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "model *","nr_class", 1, self ));
|
3191
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "model *","nr_class", 1, self ));
|
3167
3192
|
}
|
3168
3193
|
arg1 = reinterpret_cast< model * >(argp1);
|
3169
3194
|
result = (int) ((arg1)->nr_class);
|
@@ -3182,19 +3207,19 @@ _wrap_model_nr_feature_set(int argc, VALUE *argv, VALUE self) {
|
|
3182
3207
|
int res1 = 0 ;
|
3183
3208
|
int val2 ;
|
3184
3209
|
int ecode2 = 0 ;
|
3185
|
-
|
3210
|
+
|
3186
3211
|
if ((argc < 1) || (argc > 1)) {
|
3187
3212
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
3188
3213
|
}
|
3189
3214
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_model, 0 | 0 );
|
3190
3215
|
if (!SWIG_IsOK(res1)) {
|
3191
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "model *","nr_feature", 1, self ));
|
3216
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "model *","nr_feature", 1, self ));
|
3192
3217
|
}
|
3193
3218
|
arg1 = reinterpret_cast< model * >(argp1);
|
3194
3219
|
ecode2 = SWIG_AsVal_int(argv[0], &val2);
|
3195
3220
|
if (!SWIG_IsOK(ecode2)) {
|
3196
3221
|
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","nr_feature", 2, argv[0] ));
|
3197
|
-
}
|
3222
|
+
}
|
3198
3223
|
arg2 = static_cast< int >(val2);
|
3199
3224
|
if (arg1) (arg1)->nr_feature = arg2;
|
3200
3225
|
return Qnil;
|
@@ -3210,13 +3235,13 @@ _wrap_model_nr_feature_get(int argc, VALUE *argv, VALUE self) {
|
|
3210
3235
|
int res1 = 0 ;
|
3211
3236
|
int result;
|
3212
3237
|
VALUE vresult = Qnil;
|
3213
|
-
|
3238
|
+
|
3214
3239
|
if ((argc < 0) || (argc > 0)) {
|
3215
3240
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
3216
3241
|
}
|
3217
3242
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_model, 0 | 0 );
|
3218
3243
|
if (!SWIG_IsOK(res1)) {
|
3219
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "model *","nr_feature", 1, self ));
|
3244
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "model *","nr_feature", 1, self ));
|
3220
3245
|
}
|
3221
3246
|
arg1 = reinterpret_cast< model * >(argp1);
|
3222
3247
|
result = (int) ((arg1)->nr_feature);
|
@@ -3235,18 +3260,18 @@ _wrap_model_w_set(int argc, VALUE *argv, VALUE self) {
|
|
3235
3260
|
int res1 = 0 ;
|
3236
3261
|
void *argp2 = 0 ;
|
3237
3262
|
int res2 = 0 ;
|
3238
|
-
|
3263
|
+
|
3239
3264
|
if ((argc < 1) || (argc > 1)) {
|
3240
3265
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
3241
3266
|
}
|
3242
3267
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_model, 0 | 0 );
|
3243
3268
|
if (!SWIG_IsOK(res1)) {
|
3244
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "model *","w", 1, self ));
|
3269
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "model *","w", 1, self ));
|
3245
3270
|
}
|
3246
3271
|
arg1 = reinterpret_cast< model * >(argp1);
|
3247
3272
|
res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_double, SWIG_POINTER_DISOWN | 0 );
|
3248
3273
|
if (!SWIG_IsOK(res2)) {
|
3249
|
-
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "double *","w", 2, argv[0] ));
|
3274
|
+
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "double *","w", 2, argv[0] ));
|
3250
3275
|
}
|
3251
3276
|
arg2 = reinterpret_cast< double * >(argp2);
|
3252
3277
|
if (arg1) (arg1)->w = arg2;
|
@@ -3263,13 +3288,13 @@ _wrap_model_w_get(int argc, VALUE *argv, VALUE self) {
|
|
3263
3288
|
int res1 = 0 ;
|
3264
3289
|
double *result = 0 ;
|
3265
3290
|
VALUE vresult = Qnil;
|
3266
|
-
|
3291
|
+
|
3267
3292
|
if ((argc < 0) || (argc > 0)) {
|
3268
3293
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
3269
3294
|
}
|
3270
3295
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_model, 0 | 0 );
|
3271
3296
|
if (!SWIG_IsOK(res1)) {
|
3272
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "model *","w", 1, self ));
|
3297
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "model *","w", 1, self ));
|
3273
3298
|
}
|
3274
3299
|
arg1 = reinterpret_cast< model * >(argp1);
|
3275
3300
|
result = (double *) ((arg1)->w);
|
@@ -3288,18 +3313,18 @@ _wrap_model_label_set(int argc, VALUE *argv, VALUE self) {
|
|
3288
3313
|
int res1 = 0 ;
|
3289
3314
|
void *argp2 = 0 ;
|
3290
3315
|
int res2 = 0 ;
|
3291
|
-
|
3316
|
+
|
3292
3317
|
if ((argc < 1) || (argc > 1)) {
|
3293
3318
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
3294
3319
|
}
|
3295
3320
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_model, 0 | 0 );
|
3296
3321
|
if (!SWIG_IsOK(res1)) {
|
3297
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "model *","label", 1, self ));
|
3322
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "model *","label", 1, self ));
|
3298
3323
|
}
|
3299
3324
|
arg1 = reinterpret_cast< model * >(argp1);
|
3300
3325
|
res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_int, SWIG_POINTER_DISOWN | 0 );
|
3301
3326
|
if (!SWIG_IsOK(res2)) {
|
3302
|
-
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "int *","label", 2, argv[0] ));
|
3327
|
+
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "int *","label", 2, argv[0] ));
|
3303
3328
|
}
|
3304
3329
|
arg2 = reinterpret_cast< int * >(argp2);
|
3305
3330
|
if (arg1) (arg1)->label = arg2;
|
@@ -3316,13 +3341,13 @@ _wrap_model_label_get(int argc, VALUE *argv, VALUE self) {
|
|
3316
3341
|
int res1 = 0 ;
|
3317
3342
|
int *result = 0 ;
|
3318
3343
|
VALUE vresult = Qnil;
|
3319
|
-
|
3344
|
+
|
3320
3345
|
if ((argc < 0) || (argc > 0)) {
|
3321
3346
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
3322
3347
|
}
|
3323
3348
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_model, 0 | 0 );
|
3324
3349
|
if (!SWIG_IsOK(res1)) {
|
3325
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "model *","label", 1, self ));
|
3350
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "model *","label", 1, self ));
|
3326
3351
|
}
|
3327
3352
|
arg1 = reinterpret_cast< model * >(argp1);
|
3328
3353
|
result = (int *) ((arg1)->label);
|
@@ -3341,19 +3366,19 @@ _wrap_model_bias_set(int argc, VALUE *argv, VALUE self) {
|
|
3341
3366
|
int res1 = 0 ;
|
3342
3367
|
double val2 ;
|
3343
3368
|
int ecode2 = 0 ;
|
3344
|
-
|
3369
|
+
|
3345
3370
|
if ((argc < 1) || (argc > 1)) {
|
3346
3371
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
3347
3372
|
}
|
3348
3373
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_model, 0 | 0 );
|
3349
3374
|
if (!SWIG_IsOK(res1)) {
|
3350
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "model *","bias", 1, self ));
|
3375
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "model *","bias", 1, self ));
|
3351
3376
|
}
|
3352
3377
|
arg1 = reinterpret_cast< model * >(argp1);
|
3353
3378
|
ecode2 = SWIG_AsVal_double(argv[0], &val2);
|
3354
3379
|
if (!SWIG_IsOK(ecode2)) {
|
3355
3380
|
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","bias", 2, argv[0] ));
|
3356
|
-
}
|
3381
|
+
}
|
3357
3382
|
arg2 = static_cast< double >(val2);
|
3358
3383
|
if (arg1) (arg1)->bias = arg2;
|
3359
3384
|
return Qnil;
|
@@ -3369,13 +3394,13 @@ _wrap_model_bias_get(int argc, VALUE *argv, VALUE self) {
|
|
3369
3394
|
int res1 = 0 ;
|
3370
3395
|
double result;
|
3371
3396
|
VALUE vresult = Qnil;
|
3372
|
-
|
3397
|
+
|
3373
3398
|
if ((argc < 0) || (argc > 0)) {
|
3374
3399
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
3375
3400
|
}
|
3376
3401
|
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_model, 0 | 0 );
|
3377
3402
|
if (!SWIG_IsOK(res1)) {
|
3378
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "model *","bias", 1, self ));
|
3403
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "model *","bias", 1, self ));
|
3379
3404
|
}
|
3380
3405
|
arg1 = reinterpret_cast< model * >(argp1);
|
3381
3406
|
result = (double) ((arg1)->bias);
|
@@ -3393,20 +3418,20 @@ _wrap_model_allocate(VALUE self) {
|
|
3393
3418
|
SWIGINTERN VALUE
|
3394
3419
|
_wrap_model_allocate(int argc, VALUE *argv, VALUE self) {
|
3395
3420
|
#endif
|
3396
|
-
|
3397
|
-
|
3421
|
+
|
3422
|
+
|
3398
3423
|
VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_model);
|
3399
3424
|
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
|
3400
3425
|
rb_obj_call_init(vresult, argc, argv);
|
3401
3426
|
#endif
|
3402
3427
|
return vresult;
|
3403
3428
|
}
|
3404
|
-
|
3429
|
+
|
3405
3430
|
|
3406
3431
|
SWIGINTERN VALUE
|
3407
3432
|
_wrap_new_model(int argc, VALUE *argv, VALUE self) {
|
3408
3433
|
model *result = 0 ;
|
3409
|
-
|
3434
|
+
|
3410
3435
|
if ((argc < 0) || (argc > 0)) {
|
3411
3436
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
3412
3437
|
}
|
@@ -3433,18 +3458,18 @@ _wrap_train(int argc, VALUE *argv, VALUE self) {
|
|
3433
3458
|
int res2 = 0 ;
|
3434
3459
|
model *result = 0 ;
|
3435
3460
|
VALUE vresult = Qnil;
|
3436
|
-
|
3461
|
+
|
3437
3462
|
if ((argc < 2) || (argc > 2)) {
|
3438
3463
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
|
3439
3464
|
}
|
3440
3465
|
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_problem, 0 | 0 );
|
3441
3466
|
if (!SWIG_IsOK(res1)) {
|
3442
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "problem const *","train", 1, argv[0] ));
|
3467
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "problem const *","train", 1, argv[0] ));
|
3443
3468
|
}
|
3444
3469
|
arg1 = reinterpret_cast< problem * >(argp1);
|
3445
3470
|
res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_parameter, 0 | 0 );
|
3446
3471
|
if (!SWIG_IsOK(res2)) {
|
3447
|
-
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "parameter const *","train", 2, argv[1] ));
|
3472
|
+
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "parameter const *","train", 2, argv[1] ));
|
3448
3473
|
}
|
3449
3474
|
arg2 = reinterpret_cast< parameter * >(argp2);
|
3450
3475
|
result = (model *)train((problem const *)arg1,(parameter const *)arg2);
|
@@ -3469,28 +3494,28 @@ _wrap_cross_validation(int argc, VALUE *argv, VALUE self) {
|
|
3469
3494
|
int ecode3 = 0 ;
|
3470
3495
|
void *argp4 = 0 ;
|
3471
3496
|
int res4 = 0 ;
|
3472
|
-
|
3497
|
+
|
3473
3498
|
if ((argc < 4) || (argc > 4)) {
|
3474
3499
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
|
3475
3500
|
}
|
3476
3501
|
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_problem, 0 | 0 );
|
3477
3502
|
if (!SWIG_IsOK(res1)) {
|
3478
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "problem const *","cross_validation", 1, argv[0] ));
|
3503
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "problem const *","cross_validation", 1, argv[0] ));
|
3479
3504
|
}
|
3480
3505
|
arg1 = reinterpret_cast< problem * >(argp1);
|
3481
3506
|
res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_parameter, 0 | 0 );
|
3482
3507
|
if (!SWIG_IsOK(res2)) {
|
3483
|
-
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "parameter const *","cross_validation", 2, argv[1] ));
|
3508
|
+
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "parameter const *","cross_validation", 2, argv[1] ));
|
3484
3509
|
}
|
3485
3510
|
arg2 = reinterpret_cast< parameter * >(argp2);
|
3486
3511
|
ecode3 = SWIG_AsVal_int(argv[2], &val3);
|
3487
3512
|
if (!SWIG_IsOK(ecode3)) {
|
3488
3513
|
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","cross_validation", 3, argv[2] ));
|
3489
|
-
}
|
3514
|
+
}
|
3490
3515
|
arg3 = static_cast< int >(val3);
|
3491
3516
|
res4 = SWIG_ConvertPtr(argv[3], &argp4,SWIGTYPE_p_double, 0 | 0 );
|
3492
3517
|
if (!SWIG_IsOK(res4)) {
|
3493
|
-
SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "double *","cross_validation", 4, argv[3] ));
|
3518
|
+
SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "double *","cross_validation", 4, argv[3] ));
|
3494
3519
|
}
|
3495
3520
|
arg4 = reinterpret_cast< double * >(argp4);
|
3496
3521
|
cross_validation((problem const *)arg1,(parameter const *)arg2,arg3,arg4);
|
@@ -3501,7 +3526,7 @@ fail:
|
|
3501
3526
|
|
3502
3527
|
|
3503
3528
|
SWIGINTERN VALUE
|
3504
|
-
|
3529
|
+
_wrap_find_parameters(int argc, VALUE *argv, VALUE self) {
|
3505
3530
|
problem *arg1 = (problem *) 0 ;
|
3506
3531
|
parameter *arg2 = (parameter *) 0 ;
|
3507
3532
|
int arg3 ;
|
@@ -3509,6 +3534,7 @@ _wrap_find_parameter_C(int argc, VALUE *argv, VALUE self) {
|
|
3509
3534
|
double arg5 ;
|
3510
3535
|
double *arg6 = (double *) 0 ;
|
3511
3536
|
double *arg7 = (double *) 0 ;
|
3537
|
+
double *arg8 = (double *) 0 ;
|
3512
3538
|
void *argp1 = 0 ;
|
3513
3539
|
int res1 = 0 ;
|
3514
3540
|
void *argp2 = 0 ;
|
@@ -3523,46 +3549,53 @@ _wrap_find_parameter_C(int argc, VALUE *argv, VALUE self) {
|
|
3523
3549
|
int res6 = 0 ;
|
3524
3550
|
void *argp7 = 0 ;
|
3525
3551
|
int res7 = 0 ;
|
3526
|
-
|
3527
|
-
|
3528
|
-
|
3552
|
+
void *argp8 = 0 ;
|
3553
|
+
int res8 = 0 ;
|
3554
|
+
|
3555
|
+
if ((argc < 8) || (argc > 8)) {
|
3556
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 8)",argc); SWIG_fail;
|
3529
3557
|
}
|
3530
3558
|
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_problem, 0 | 0 );
|
3531
3559
|
if (!SWIG_IsOK(res1)) {
|
3532
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "problem const *","
|
3560
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "problem const *","find_parameters", 1, argv[0] ));
|
3533
3561
|
}
|
3534
3562
|
arg1 = reinterpret_cast< problem * >(argp1);
|
3535
3563
|
res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_parameter, 0 | 0 );
|
3536
3564
|
if (!SWIG_IsOK(res2)) {
|
3537
|
-
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "parameter const *","
|
3565
|
+
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "parameter const *","find_parameters", 2, argv[1] ));
|
3538
3566
|
}
|
3539
3567
|
arg2 = reinterpret_cast< parameter * >(argp2);
|
3540
3568
|
ecode3 = SWIG_AsVal_int(argv[2], &val3);
|
3541
3569
|
if (!SWIG_IsOK(ecode3)) {
|
3542
|
-
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","
|
3543
|
-
}
|
3570
|
+
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","find_parameters", 3, argv[2] ));
|
3571
|
+
}
|
3544
3572
|
arg3 = static_cast< int >(val3);
|
3545
3573
|
ecode4 = SWIG_AsVal_double(argv[3], &val4);
|
3546
3574
|
if (!SWIG_IsOK(ecode4)) {
|
3547
|
-
SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","
|
3548
|
-
}
|
3575
|
+
SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","find_parameters", 4, argv[3] ));
|
3576
|
+
}
|
3549
3577
|
arg4 = static_cast< double >(val4);
|
3550
3578
|
ecode5 = SWIG_AsVal_double(argv[4], &val5);
|
3551
3579
|
if (!SWIG_IsOK(ecode5)) {
|
3552
|
-
SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "double","
|
3553
|
-
}
|
3580
|
+
SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "double","find_parameters", 5, argv[4] ));
|
3581
|
+
}
|
3554
3582
|
arg5 = static_cast< double >(val5);
|
3555
3583
|
res6 = SWIG_ConvertPtr(argv[5], &argp6,SWIGTYPE_p_double, 0 | 0 );
|
3556
3584
|
if (!SWIG_IsOK(res6)) {
|
3557
|
-
SWIG_exception_fail(SWIG_ArgError(res6), Ruby_Format_TypeError( "", "double *","
|
3585
|
+
SWIG_exception_fail(SWIG_ArgError(res6), Ruby_Format_TypeError( "", "double *","find_parameters", 6, argv[5] ));
|
3558
3586
|
}
|
3559
3587
|
arg6 = reinterpret_cast< double * >(argp6);
|
3560
3588
|
res7 = SWIG_ConvertPtr(argv[6], &argp7,SWIGTYPE_p_double, 0 | 0 );
|
3561
3589
|
if (!SWIG_IsOK(res7)) {
|
3562
|
-
SWIG_exception_fail(SWIG_ArgError(res7), Ruby_Format_TypeError( "", "double *","
|
3590
|
+
SWIG_exception_fail(SWIG_ArgError(res7), Ruby_Format_TypeError( "", "double *","find_parameters", 7, argv[6] ));
|
3563
3591
|
}
|
3564
3592
|
arg7 = reinterpret_cast< double * >(argp7);
|
3565
|
-
|
3593
|
+
res8 = SWIG_ConvertPtr(argv[7], &argp8,SWIGTYPE_p_double, 0 | 0 );
|
3594
|
+
if (!SWIG_IsOK(res8)) {
|
3595
|
+
SWIG_exception_fail(SWIG_ArgError(res8), Ruby_Format_TypeError( "", "double *","find_parameters", 8, argv[7] ));
|
3596
|
+
}
|
3597
|
+
arg8 = reinterpret_cast< double * >(argp8);
|
3598
|
+
find_parameters((problem const *)arg1,(parameter const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8);
|
3566
3599
|
return Qnil;
|
3567
3600
|
fail:
|
3568
3601
|
return Qnil;
|
@@ -3582,23 +3615,23 @@ _wrap_predict_values(int argc, VALUE *argv, VALUE self) {
|
|
3582
3615
|
int res3 = 0 ;
|
3583
3616
|
double result;
|
3584
3617
|
VALUE vresult = Qnil;
|
3585
|
-
|
3618
|
+
|
3586
3619
|
if ((argc < 3) || (argc > 3)) {
|
3587
3620
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
|
3588
3621
|
}
|
3589
3622
|
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_model, 0 | 0 );
|
3590
3623
|
if (!SWIG_IsOK(res1)) {
|
3591
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "model const *","predict_values", 1, argv[0] ));
|
3624
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "model const *","predict_values", 1, argv[0] ));
|
3592
3625
|
}
|
3593
3626
|
arg1 = reinterpret_cast< model * >(argp1);
|
3594
3627
|
res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_feature_node, 0 | 0 );
|
3595
3628
|
if (!SWIG_IsOK(res2)) {
|
3596
|
-
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "feature_node const *","predict_values", 2, argv[1] ));
|
3629
|
+
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "feature_node const *","predict_values", 2, argv[1] ));
|
3597
3630
|
}
|
3598
3631
|
arg2 = reinterpret_cast< feature_node * >(argp2);
|
3599
3632
|
res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_double, 0 | 0 );
|
3600
3633
|
if (!SWIG_IsOK(res3)) {
|
3601
|
-
SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "double *","predict_values", 3, argv[2] ));
|
3634
|
+
SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "double *","predict_values", 3, argv[2] ));
|
3602
3635
|
}
|
3603
3636
|
arg3 = reinterpret_cast< double * >(argp3);
|
3604
3637
|
result = (double)predict_values((model const *)arg1,(feature_node const *)arg2,arg3);
|
@@ -3619,18 +3652,18 @@ _wrap_predict(int argc, VALUE *argv, VALUE self) {
|
|
3619
3652
|
int res2 = 0 ;
|
3620
3653
|
double result;
|
3621
3654
|
VALUE vresult = Qnil;
|
3622
|
-
|
3655
|
+
|
3623
3656
|
if ((argc < 2) || (argc > 2)) {
|
3624
3657
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
|
3625
3658
|
}
|
3626
3659
|
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_model, 0 | 0 );
|
3627
3660
|
if (!SWIG_IsOK(res1)) {
|
3628
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "model const *","predict", 1, argv[0] ));
|
3661
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "model const *","predict", 1, argv[0] ));
|
3629
3662
|
}
|
3630
3663
|
arg1 = reinterpret_cast< model * >(argp1);
|
3631
3664
|
res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_feature_node, 0 | 0 );
|
3632
3665
|
if (!SWIG_IsOK(res2)) {
|
3633
|
-
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "feature_node const *","predict", 2, argv[1] ));
|
3666
|
+
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "feature_node const *","predict", 2, argv[1] ));
|
3634
3667
|
}
|
3635
3668
|
arg2 = reinterpret_cast< feature_node * >(argp2);
|
3636
3669
|
result = (double)predict((model const *)arg1,(feature_node const *)arg2);
|
@@ -3654,23 +3687,23 @@ _wrap_predict_probability(int argc, VALUE *argv, VALUE self) {
|
|
3654
3687
|
int res3 = 0 ;
|
3655
3688
|
double result;
|
3656
3689
|
VALUE vresult = Qnil;
|
3657
|
-
|
3690
|
+
|
3658
3691
|
if ((argc < 3) || (argc > 3)) {
|
3659
3692
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
|
3660
3693
|
}
|
3661
3694
|
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_model, 0 | 0 );
|
3662
3695
|
if (!SWIG_IsOK(res1)) {
|
3663
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "model const *","predict_probability", 1, argv[0] ));
|
3696
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "model const *","predict_probability", 1, argv[0] ));
|
3664
3697
|
}
|
3665
3698
|
arg1 = reinterpret_cast< model * >(argp1);
|
3666
3699
|
res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_feature_node, 0 | 0 );
|
3667
3700
|
if (!SWIG_IsOK(res2)) {
|
3668
|
-
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "feature_node const *","predict_probability", 2, argv[1] ));
|
3701
|
+
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "feature_node const *","predict_probability", 2, argv[1] ));
|
3669
3702
|
}
|
3670
3703
|
arg2 = reinterpret_cast< feature_node * >(argp2);
|
3671
3704
|
res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_double, 0 | 0 );
|
3672
3705
|
if (!SWIG_IsOK(res3)) {
|
3673
|
-
SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "double *","predict_probability", 3, argv[2] ));
|
3706
|
+
SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "double *","predict_probability", 3, argv[2] ));
|
3674
3707
|
}
|
3675
3708
|
arg3 = reinterpret_cast< double * >(argp3);
|
3676
3709
|
result = (double)predict_probability((model const *)arg1,(feature_node const *)arg2,arg3);
|
@@ -3692,7 +3725,7 @@ _wrap_save_model(int argc, VALUE *argv, VALUE self) {
|
|
3692
3725
|
int res2 = 0 ;
|
3693
3726
|
int result;
|
3694
3727
|
VALUE vresult = Qnil;
|
3695
|
-
|
3728
|
+
|
3696
3729
|
if ((argc < 2) || (argc > 2)) {
|
3697
3730
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
|
3698
3731
|
}
|
@@ -3703,7 +3736,7 @@ _wrap_save_model(int argc, VALUE *argv, VALUE self) {
|
|
3703
3736
|
arg1 = reinterpret_cast< char * >(buf1);
|
3704
3737
|
res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_model, 0 | 0 );
|
3705
3738
|
if (!SWIG_IsOK(res2)) {
|
3706
|
-
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "model const *","save_model", 2, argv[1] ));
|
3739
|
+
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "model const *","save_model", 2, argv[1] ));
|
3707
3740
|
}
|
3708
3741
|
arg2 = reinterpret_cast< model * >(argp2);
|
3709
3742
|
result = (int)save_model((char const *)arg1,(model const *)arg2);
|
@@ -3724,7 +3757,7 @@ _wrap_load_model(int argc, VALUE *argv, VALUE self) {
|
|
3724
3757
|
int alloc1 = 0 ;
|
3725
3758
|
model *result = 0 ;
|
3726
3759
|
VALUE vresult = Qnil;
|
3727
|
-
|
3760
|
+
|
3728
3761
|
if ((argc < 1) || (argc > 1)) {
|
3729
3762
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
3730
3763
|
}
|
@@ -3750,13 +3783,13 @@ _wrap_get_nr_feature(int argc, VALUE *argv, VALUE self) {
|
|
3750
3783
|
int res1 = 0 ;
|
3751
3784
|
int result;
|
3752
3785
|
VALUE vresult = Qnil;
|
3753
|
-
|
3786
|
+
|
3754
3787
|
if ((argc < 1) || (argc > 1)) {
|
3755
3788
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
3756
3789
|
}
|
3757
3790
|
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_model, 0 | 0 );
|
3758
3791
|
if (!SWIG_IsOK(res1)) {
|
3759
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "model const *","get_nr_feature", 1, argv[0] ));
|
3792
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "model const *","get_nr_feature", 1, argv[0] ));
|
3760
3793
|
}
|
3761
3794
|
arg1 = reinterpret_cast< model * >(argp1);
|
3762
3795
|
result = (int)get_nr_feature((model const *)arg1);
|
@@ -3774,13 +3807,13 @@ _wrap_get_nr_class(int argc, VALUE *argv, VALUE self) {
|
|
3774
3807
|
int res1 = 0 ;
|
3775
3808
|
int result;
|
3776
3809
|
VALUE vresult = Qnil;
|
3777
|
-
|
3810
|
+
|
3778
3811
|
if ((argc < 1) || (argc > 1)) {
|
3779
3812
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
3780
3813
|
}
|
3781
3814
|
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_model, 0 | 0 );
|
3782
3815
|
if (!SWIG_IsOK(res1)) {
|
3783
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "model const *","get_nr_class", 1, argv[0] ));
|
3816
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "model const *","get_nr_class", 1, argv[0] ));
|
3784
3817
|
}
|
3785
3818
|
arg1 = reinterpret_cast< model * >(argp1);
|
3786
3819
|
result = (int)get_nr_class((model const *)arg1);
|
@@ -3799,18 +3832,18 @@ _wrap_get_labels(int argc, VALUE *argv, VALUE self) {
|
|
3799
3832
|
int res1 = 0 ;
|
3800
3833
|
void *argp2 = 0 ;
|
3801
3834
|
int res2 = 0 ;
|
3802
|
-
|
3835
|
+
|
3803
3836
|
if ((argc < 2) || (argc > 2)) {
|
3804
3837
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
|
3805
3838
|
}
|
3806
3839
|
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_model, 0 | 0 );
|
3807
3840
|
if (!SWIG_IsOK(res1)) {
|
3808
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "model const *","get_labels", 1, argv[0] ));
|
3841
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "model const *","get_labels", 1, argv[0] ));
|
3809
3842
|
}
|
3810
3843
|
arg1 = reinterpret_cast< model * >(argp1);
|
3811
3844
|
res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_int, 0 | 0 );
|
3812
3845
|
if (!SWIG_IsOK(res2)) {
|
3813
|
-
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "int *","get_labels", 2, argv[1] ));
|
3846
|
+
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "int *","get_labels", 2, argv[1] ));
|
3814
3847
|
}
|
3815
3848
|
arg2 = reinterpret_cast< int * >(argp2);
|
3816
3849
|
get_labels((model const *)arg1,arg2);
|
@@ -3833,24 +3866,24 @@ _wrap_get_decfun_coef(int argc, VALUE *argv, VALUE self) {
|
|
3833
3866
|
int ecode3 = 0 ;
|
3834
3867
|
double result;
|
3835
3868
|
VALUE vresult = Qnil;
|
3836
|
-
|
3869
|
+
|
3837
3870
|
if ((argc < 3) || (argc > 3)) {
|
3838
3871
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
|
3839
3872
|
}
|
3840
3873
|
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_model, 0 | 0 );
|
3841
3874
|
if (!SWIG_IsOK(res1)) {
|
3842
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "model const *","get_decfun_coef", 1, argv[0] ));
|
3875
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "model const *","get_decfun_coef", 1, argv[0] ));
|
3843
3876
|
}
|
3844
3877
|
arg1 = reinterpret_cast< model * >(argp1);
|
3845
3878
|
ecode2 = SWIG_AsVal_int(argv[1], &val2);
|
3846
3879
|
if (!SWIG_IsOK(ecode2)) {
|
3847
3880
|
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","get_decfun_coef", 2, argv[1] ));
|
3848
|
-
}
|
3881
|
+
}
|
3849
3882
|
arg2 = static_cast< int >(val2);
|
3850
3883
|
ecode3 = SWIG_AsVal_int(argv[2], &val3);
|
3851
3884
|
if (!SWIG_IsOK(ecode3)) {
|
3852
3885
|
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","get_decfun_coef", 3, argv[2] ));
|
3853
|
-
}
|
3886
|
+
}
|
3854
3887
|
arg3 = static_cast< int >(val3);
|
3855
3888
|
result = (double)get_decfun_coef((model const *)arg1,arg2,arg3);
|
3856
3889
|
vresult = SWIG_From_double(static_cast< double >(result));
|
@@ -3870,19 +3903,19 @@ _wrap_get_decfun_bias(int argc, VALUE *argv, VALUE self) {
|
|
3870
3903
|
int ecode2 = 0 ;
|
3871
3904
|
double result;
|
3872
3905
|
VALUE vresult = Qnil;
|
3873
|
-
|
3906
|
+
|
3874
3907
|
if ((argc < 2) || (argc > 2)) {
|
3875
3908
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
|
3876
3909
|
}
|
3877
3910
|
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_model, 0 | 0 );
|
3878
3911
|
if (!SWIG_IsOK(res1)) {
|
3879
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "model const *","get_decfun_bias", 1, argv[0] ));
|
3912
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "model const *","get_decfun_bias", 1, argv[0] ));
|
3880
3913
|
}
|
3881
3914
|
arg1 = reinterpret_cast< model * >(argp1);
|
3882
3915
|
ecode2 = SWIG_AsVal_int(argv[1], &val2);
|
3883
3916
|
if (!SWIG_IsOK(ecode2)) {
|
3884
3917
|
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","get_decfun_bias", 2, argv[1] ));
|
3885
|
-
}
|
3918
|
+
}
|
3886
3919
|
arg2 = static_cast< int >(val2);
|
3887
3920
|
result = (double)get_decfun_bias((model const *)arg1,arg2);
|
3888
3921
|
vresult = SWIG_From_double(static_cast< double >(result));
|
@@ -3897,13 +3930,13 @@ _wrap_free_model_content(int argc, VALUE *argv, VALUE self) {
|
|
3897
3930
|
model *arg1 = (model *) 0 ;
|
3898
3931
|
void *argp1 = 0 ;
|
3899
3932
|
int res1 = 0 ;
|
3900
|
-
|
3933
|
+
|
3901
3934
|
if ((argc < 1) || (argc > 1)) {
|
3902
3935
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
3903
3936
|
}
|
3904
3937
|
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_model, 0 | 0 );
|
3905
3938
|
if (!SWIG_IsOK(res1)) {
|
3906
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "model *","free_model_content", 1, argv[0] ));
|
3939
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "model *","free_model_content", 1, argv[0] ));
|
3907
3940
|
}
|
3908
3941
|
arg1 = reinterpret_cast< model * >(argp1);
|
3909
3942
|
free_model_content(arg1);
|
@@ -3918,13 +3951,13 @@ _wrap_free_and_destroy_model(int argc, VALUE *argv, VALUE self) {
|
|
3918
3951
|
model **arg1 = (model **) 0 ;
|
3919
3952
|
void *argp1 = 0 ;
|
3920
3953
|
int res1 = 0 ;
|
3921
|
-
|
3954
|
+
|
3922
3955
|
if ((argc < 1) || (argc > 1)) {
|
3923
3956
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
3924
3957
|
}
|
3925
3958
|
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_p_model, 0 | 0 );
|
3926
3959
|
if (!SWIG_IsOK(res1)) {
|
3927
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "model **","free_and_destroy_model", 1, argv[0] ));
|
3960
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "model **","free_and_destroy_model", 1, argv[0] ));
|
3928
3961
|
}
|
3929
3962
|
arg1 = reinterpret_cast< model ** >(argp1);
|
3930
3963
|
free_and_destroy_model(arg1);
|
@@ -3939,13 +3972,13 @@ _wrap_destroy_param(int argc, VALUE *argv, VALUE self) {
|
|
3939
3972
|
parameter *arg1 = (parameter *) 0 ;
|
3940
3973
|
void *argp1 = 0 ;
|
3941
3974
|
int res1 = 0 ;
|
3942
|
-
|
3975
|
+
|
3943
3976
|
if ((argc < 1) || (argc > 1)) {
|
3944
3977
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
3945
3978
|
}
|
3946
3979
|
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_parameter, 0 | 0 );
|
3947
3980
|
if (!SWIG_IsOK(res1)) {
|
3948
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "parameter *","destroy_param", 1, argv[0] ));
|
3981
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "parameter *","destroy_param", 1, argv[0] ));
|
3949
3982
|
}
|
3950
3983
|
arg1 = reinterpret_cast< parameter * >(argp1);
|
3951
3984
|
destroy_param(arg1);
|
@@ -3965,18 +3998,18 @@ _wrap_check_parameter(int argc, VALUE *argv, VALUE self) {
|
|
3965
3998
|
int res2 = 0 ;
|
3966
3999
|
char *result = 0 ;
|
3967
4000
|
VALUE vresult = Qnil;
|
3968
|
-
|
4001
|
+
|
3969
4002
|
if ((argc < 2) || (argc > 2)) {
|
3970
4003
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
|
3971
4004
|
}
|
3972
4005
|
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_problem, 0 | 0 );
|
3973
4006
|
if (!SWIG_IsOK(res1)) {
|
3974
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "problem const *","check_parameter", 1, argv[0] ));
|
4007
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "problem const *","check_parameter", 1, argv[0] ));
|
3975
4008
|
}
|
3976
4009
|
arg1 = reinterpret_cast< problem * >(argp1);
|
3977
4010
|
res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_parameter, 0 | 0 );
|
3978
4011
|
if (!SWIG_IsOK(res2)) {
|
3979
|
-
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "parameter const *","check_parameter", 2, argv[1] ));
|
4012
|
+
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "parameter const *","check_parameter", 2, argv[1] ));
|
3980
4013
|
}
|
3981
4014
|
arg2 = reinterpret_cast< parameter * >(argp2);
|
3982
4015
|
result = (char *)check_parameter((problem const *)arg1,(parameter const *)arg2);
|
@@ -3994,13 +4027,13 @@ _wrap_check_probability_model(int argc, VALUE *argv, VALUE self) {
|
|
3994
4027
|
int res1 = 0 ;
|
3995
4028
|
int result;
|
3996
4029
|
VALUE vresult = Qnil;
|
3997
|
-
|
4030
|
+
|
3998
4031
|
if ((argc < 1) || (argc > 1)) {
|
3999
4032
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
4000
4033
|
}
|
4001
4034
|
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_model, 0 | 0 );
|
4002
4035
|
if (!SWIG_IsOK(res1)) {
|
4003
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "model const *","check_probability_model", 1, argv[0] ));
|
4036
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "model const *","check_probability_model", 1, argv[0] ));
|
4004
4037
|
}
|
4005
4038
|
arg1 = reinterpret_cast< model * >(argp1);
|
4006
4039
|
result = (int)check_probability_model((model const *)arg1);
|
@@ -4018,13 +4051,13 @@ _wrap_check_regression_model(int argc, VALUE *argv, VALUE self) {
|
|
4018
4051
|
int res1 = 0 ;
|
4019
4052
|
int result;
|
4020
4053
|
VALUE vresult = Qnil;
|
4021
|
-
|
4054
|
+
|
4022
4055
|
if ((argc < 1) || (argc > 1)) {
|
4023
4056
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
4024
4057
|
}
|
4025
4058
|
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_model, 0 | 0 );
|
4026
4059
|
if (!SWIG_IsOK(res1)) {
|
4027
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "model const *","check_regression_model", 1, argv[0] ));
|
4060
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "model const *","check_regression_model", 1, argv[0] ));
|
4028
4061
|
}
|
4029
4062
|
arg1 = reinterpret_cast< model * >(argp1);
|
4030
4063
|
result = (int)check_regression_model((model const *)arg1);
|
@@ -4038,14 +4071,14 @@ fail:
|
|
4038
4071
|
SWIGINTERN VALUE
|
4039
4072
|
_wrap_set_print_string_function(int argc, VALUE *argv, VALUE self) {
|
4040
4073
|
void (*arg1)(char const *) = (void (*)(char const *)) 0 ;
|
4041
|
-
|
4074
|
+
|
4042
4075
|
if ((argc < 1) || (argc > 1)) {
|
4043
4076
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
4044
4077
|
}
|
4045
4078
|
{
|
4046
4079
|
int res = SWIG_ConvertFunctionPtr(argv[0], (void**)(&arg1), SWIGTYPE_p_f_p_q_const__char__void);
|
4047
4080
|
if (!SWIG_IsOK(res)) {
|
4048
|
-
SWIG_exception_fail(SWIG_ArgError(res), Ruby_Format_TypeError( "", "void (*)(char const *)","set_print_string_function", 1, argv[0] ));
|
4081
|
+
SWIG_exception_fail(SWIG_ArgError(res), Ruby_Format_TypeError( "", "void (*)(char const *)","set_print_string_function", 1, argv[0] ));
|
4049
4082
|
}
|
4050
4083
|
}
|
4051
4084
|
set_print_string_function(arg1);
|
@@ -4062,14 +4095,14 @@ _wrap_new_int(int argc, VALUE *argv, VALUE self) {
|
|
4062
4095
|
int ecode1 = 0 ;
|
4063
4096
|
int *result = 0 ;
|
4064
4097
|
VALUE vresult = Qnil;
|
4065
|
-
|
4098
|
+
|
4066
4099
|
if ((argc < 1) || (argc > 1)) {
|
4067
4100
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
4068
4101
|
}
|
4069
4102
|
ecode1 = SWIG_AsVal_size_t(argv[0], &val1);
|
4070
4103
|
if (!SWIG_IsOK(ecode1)) {
|
4071
4104
|
SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "size_t","new_int", 1, argv[0] ));
|
4072
|
-
}
|
4105
|
+
}
|
4073
4106
|
arg1 = static_cast< size_t >(val1);
|
4074
4107
|
result = (int *)new_int(arg1);
|
4075
4108
|
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 | 0 );
|
@@ -4084,13 +4117,13 @@ _wrap_delete_int(int argc, VALUE *argv, VALUE self) {
|
|
4084
4117
|
int *arg1 = (int *) 0 ;
|
4085
4118
|
void *argp1 = 0 ;
|
4086
4119
|
int res1 = 0 ;
|
4087
|
-
|
4120
|
+
|
4088
4121
|
if ((argc < 1) || (argc > 1)) {
|
4089
4122
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
4090
4123
|
}
|
4091
4124
|
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_int, 0 | 0 );
|
4092
4125
|
if (!SWIG_IsOK(res1)) {
|
4093
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "int *","delete_int", 1, argv[0] ));
|
4126
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "int *","delete_int", 1, argv[0] ));
|
4094
4127
|
}
|
4095
4128
|
arg1 = reinterpret_cast< int * >(argp1);
|
4096
4129
|
delete_int(arg1);
|
@@ -4110,19 +4143,19 @@ _wrap_int_getitem(int argc, VALUE *argv, VALUE self) {
|
|
4110
4143
|
int ecode2 = 0 ;
|
4111
4144
|
int result;
|
4112
4145
|
VALUE vresult = Qnil;
|
4113
|
-
|
4146
|
+
|
4114
4147
|
if ((argc < 2) || (argc > 2)) {
|
4115
4148
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
|
4116
4149
|
}
|
4117
4150
|
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_int, 0 | 0 );
|
4118
4151
|
if (!SWIG_IsOK(res1)) {
|
4119
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "int *","int_getitem", 1, argv[0] ));
|
4152
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "int *","int_getitem", 1, argv[0] ));
|
4120
4153
|
}
|
4121
4154
|
arg1 = reinterpret_cast< int * >(argp1);
|
4122
4155
|
ecode2 = SWIG_AsVal_size_t(argv[1], &val2);
|
4123
4156
|
if (!SWIG_IsOK(ecode2)) {
|
4124
4157
|
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","int_getitem", 2, argv[1] ));
|
4125
|
-
}
|
4158
|
+
}
|
4126
4159
|
arg2 = static_cast< size_t >(val2);
|
4127
4160
|
result = (int)int_getitem(arg1,arg2);
|
4128
4161
|
vresult = SWIG_From_int(static_cast< int >(result));
|
@@ -4143,24 +4176,24 @@ _wrap_int_setitem(int argc, VALUE *argv, VALUE self) {
|
|
4143
4176
|
int ecode2 = 0 ;
|
4144
4177
|
int val3 ;
|
4145
4178
|
int ecode3 = 0 ;
|
4146
|
-
|
4179
|
+
|
4147
4180
|
if ((argc < 3) || (argc > 3)) {
|
4148
4181
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
|
4149
4182
|
}
|
4150
4183
|
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_int, 0 | 0 );
|
4151
4184
|
if (!SWIG_IsOK(res1)) {
|
4152
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "int *","int_setitem", 1, argv[0] ));
|
4185
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "int *","int_setitem", 1, argv[0] ));
|
4153
4186
|
}
|
4154
4187
|
arg1 = reinterpret_cast< int * >(argp1);
|
4155
4188
|
ecode2 = SWIG_AsVal_size_t(argv[1], &val2);
|
4156
4189
|
if (!SWIG_IsOK(ecode2)) {
|
4157
4190
|
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","int_setitem", 2, argv[1] ));
|
4158
|
-
}
|
4191
|
+
}
|
4159
4192
|
arg2 = static_cast< size_t >(val2);
|
4160
4193
|
ecode3 = SWIG_AsVal_int(argv[2], &val3);
|
4161
4194
|
if (!SWIG_IsOK(ecode3)) {
|
4162
4195
|
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","int_setitem", 3, argv[2] ));
|
4163
|
-
}
|
4196
|
+
}
|
4164
4197
|
arg3 = static_cast< int >(val3);
|
4165
4198
|
int_setitem(arg1,arg2,arg3);
|
4166
4199
|
return Qnil;
|
@@ -4176,14 +4209,14 @@ _wrap_new_double(int argc, VALUE *argv, VALUE self) {
|
|
4176
4209
|
int ecode1 = 0 ;
|
4177
4210
|
double *result = 0 ;
|
4178
4211
|
VALUE vresult = Qnil;
|
4179
|
-
|
4212
|
+
|
4180
4213
|
if ((argc < 1) || (argc > 1)) {
|
4181
4214
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
4182
4215
|
}
|
4183
4216
|
ecode1 = SWIG_AsVal_size_t(argv[0], &val1);
|
4184
4217
|
if (!SWIG_IsOK(ecode1)) {
|
4185
4218
|
SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "size_t","new_double", 1, argv[0] ));
|
4186
|
-
}
|
4219
|
+
}
|
4187
4220
|
arg1 = static_cast< size_t >(val1);
|
4188
4221
|
result = (double *)new_double(arg1);
|
4189
4222
|
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 );
|
@@ -4198,13 +4231,13 @@ _wrap_delete_double(int argc, VALUE *argv, VALUE self) {
|
|
4198
4231
|
double *arg1 = (double *) 0 ;
|
4199
4232
|
void *argp1 = 0 ;
|
4200
4233
|
int res1 = 0 ;
|
4201
|
-
|
4234
|
+
|
4202
4235
|
if ((argc < 1) || (argc > 1)) {
|
4203
4236
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
4204
4237
|
}
|
4205
4238
|
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_double, 0 | 0 );
|
4206
4239
|
if (!SWIG_IsOK(res1)) {
|
4207
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "double *","delete_double", 1, argv[0] ));
|
4240
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "double *","delete_double", 1, argv[0] ));
|
4208
4241
|
}
|
4209
4242
|
arg1 = reinterpret_cast< double * >(argp1);
|
4210
4243
|
delete_double(arg1);
|
@@ -4224,19 +4257,19 @@ _wrap_double_getitem(int argc, VALUE *argv, VALUE self) {
|
|
4224
4257
|
int ecode2 = 0 ;
|
4225
4258
|
double result;
|
4226
4259
|
VALUE vresult = Qnil;
|
4227
|
-
|
4260
|
+
|
4228
4261
|
if ((argc < 2) || (argc > 2)) {
|
4229
4262
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
|
4230
4263
|
}
|
4231
4264
|
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_double, 0 | 0 );
|
4232
4265
|
if (!SWIG_IsOK(res1)) {
|
4233
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "double *","double_getitem", 1, argv[0] ));
|
4266
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "double *","double_getitem", 1, argv[0] ));
|
4234
4267
|
}
|
4235
4268
|
arg1 = reinterpret_cast< double * >(argp1);
|
4236
4269
|
ecode2 = SWIG_AsVal_size_t(argv[1], &val2);
|
4237
4270
|
if (!SWIG_IsOK(ecode2)) {
|
4238
4271
|
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","double_getitem", 2, argv[1] ));
|
4239
|
-
}
|
4272
|
+
}
|
4240
4273
|
arg2 = static_cast< size_t >(val2);
|
4241
4274
|
result = (double)double_getitem(arg1,arg2);
|
4242
4275
|
vresult = SWIG_From_double(static_cast< double >(result));
|
@@ -4257,24 +4290,24 @@ _wrap_double_setitem(int argc, VALUE *argv, VALUE self) {
|
|
4257
4290
|
int ecode2 = 0 ;
|
4258
4291
|
double val3 ;
|
4259
4292
|
int ecode3 = 0 ;
|
4260
|
-
|
4293
|
+
|
4261
4294
|
if ((argc < 3) || (argc > 3)) {
|
4262
4295
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
|
4263
4296
|
}
|
4264
4297
|
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_double, 0 | 0 );
|
4265
4298
|
if (!SWIG_IsOK(res1)) {
|
4266
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "double *","double_setitem", 1, argv[0] ));
|
4299
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "double *","double_setitem", 1, argv[0] ));
|
4267
4300
|
}
|
4268
4301
|
arg1 = reinterpret_cast< double * >(argp1);
|
4269
4302
|
ecode2 = SWIG_AsVal_size_t(argv[1], &val2);
|
4270
4303
|
if (!SWIG_IsOK(ecode2)) {
|
4271
4304
|
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","double_setitem", 2, argv[1] ));
|
4272
|
-
}
|
4305
|
+
}
|
4273
4306
|
arg2 = static_cast< size_t >(val2);
|
4274
4307
|
ecode3 = SWIG_AsVal_double(argv[2], &val3);
|
4275
4308
|
if (!SWIG_IsOK(ecode3)) {
|
4276
4309
|
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","double_setitem", 3, argv[2] ));
|
4277
|
-
}
|
4310
|
+
}
|
4278
4311
|
arg3 = static_cast< double >(val3);
|
4279
4312
|
double_setitem(arg1,arg2,arg3);
|
4280
4313
|
return Qnil;
|
@@ -4290,14 +4323,14 @@ _wrap_feature_node_array(int argc, VALUE *argv, VALUE self) {
|
|
4290
4323
|
int ecode1 = 0 ;
|
4291
4324
|
feature_node *result = 0 ;
|
4292
4325
|
VALUE vresult = Qnil;
|
4293
|
-
|
4326
|
+
|
4294
4327
|
if ((argc < 1) || (argc > 1)) {
|
4295
4328
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
4296
4329
|
}
|
4297
4330
|
ecode1 = SWIG_AsVal_int(argv[0], &val1);
|
4298
4331
|
if (!SWIG_IsOK(ecode1)) {
|
4299
4332
|
SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","feature_node_array", 1, argv[0] ));
|
4300
|
-
}
|
4333
|
+
}
|
4301
4334
|
arg1 = static_cast< int >(val1);
|
4302
4335
|
result = (feature_node *)feature_node_array(arg1);
|
4303
4336
|
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_feature_node, 0 | 0 );
|
@@ -4321,29 +4354,29 @@ _wrap_feature_node_array_set(int argc, VALUE *argv, VALUE self) {
|
|
4321
4354
|
int ecode3 = 0 ;
|
4322
4355
|
double val4 ;
|
4323
4356
|
int ecode4 = 0 ;
|
4324
|
-
|
4357
|
+
|
4325
4358
|
if ((argc < 4) || (argc > 4)) {
|
4326
4359
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
|
4327
4360
|
}
|
4328
4361
|
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_feature_node, 0 | 0 );
|
4329
4362
|
if (!SWIG_IsOK(res1)) {
|
4330
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "feature_node *","feature_node_array_set", 1, argv[0] ));
|
4363
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "feature_node *","feature_node_array_set", 1, argv[0] ));
|
4331
4364
|
}
|
4332
4365
|
arg1 = reinterpret_cast< feature_node * >(argp1);
|
4333
4366
|
ecode2 = SWIG_AsVal_int(argv[1], &val2);
|
4334
4367
|
if (!SWIG_IsOK(ecode2)) {
|
4335
4368
|
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","feature_node_array_set", 2, argv[1] ));
|
4336
|
-
}
|
4369
|
+
}
|
4337
4370
|
arg2 = static_cast< int >(val2);
|
4338
4371
|
ecode3 = SWIG_AsVal_int(argv[2], &val3);
|
4339
4372
|
if (!SWIG_IsOK(ecode3)) {
|
4340
4373
|
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","feature_node_array_set", 3, argv[2] ));
|
4341
|
-
}
|
4374
|
+
}
|
4342
4375
|
arg3 = static_cast< int >(val3);
|
4343
4376
|
ecode4 = SWIG_AsVal_double(argv[3], &val4);
|
4344
4377
|
if (!SWIG_IsOK(ecode4)) {
|
4345
4378
|
SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","feature_node_array_set", 4, argv[3] ));
|
4346
|
-
}
|
4379
|
+
}
|
4347
4380
|
arg4 = static_cast< double >(val4);
|
4348
4381
|
feature_node_array_set(arg1,arg2,arg3,arg4);
|
4349
4382
|
return Qnil;
|
@@ -4357,13 +4390,13 @@ _wrap_feature_node_array_destroy(int argc, VALUE *argv, VALUE self) {
|
|
4357
4390
|
feature_node *arg1 = (feature_node *) 0 ;
|
4358
4391
|
void *argp1 = 0 ;
|
4359
4392
|
int res1 = 0 ;
|
4360
|
-
|
4393
|
+
|
4361
4394
|
if ((argc < 1) || (argc > 1)) {
|
4362
4395
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
4363
4396
|
}
|
4364
4397
|
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_feature_node, 0 | 0 );
|
4365
4398
|
if (!SWIG_IsOK(res1)) {
|
4366
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "feature_node *","feature_node_array_destroy", 1, argv[0] ));
|
4399
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "feature_node *","feature_node_array_destroy", 1, argv[0] ));
|
4367
4400
|
}
|
4368
4401
|
arg1 = reinterpret_cast< feature_node * >(argp1);
|
4369
4402
|
feature_node_array_destroy(arg1);
|
@@ -4380,14 +4413,14 @@ _wrap_feature_node_matrix(int argc, VALUE *argv, VALUE self) {
|
|
4380
4413
|
int ecode1 = 0 ;
|
4381
4414
|
feature_node **result = 0 ;
|
4382
4415
|
VALUE vresult = Qnil;
|
4383
|
-
|
4416
|
+
|
4384
4417
|
if ((argc < 1) || (argc > 1)) {
|
4385
4418
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
4386
4419
|
}
|
4387
4420
|
ecode1 = SWIG_AsVal_int(argv[0], &val1);
|
4388
4421
|
if (!SWIG_IsOK(ecode1)) {
|
4389
4422
|
SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","feature_node_matrix", 1, argv[0] ));
|
4390
|
-
}
|
4423
|
+
}
|
4391
4424
|
arg1 = static_cast< int >(val1);
|
4392
4425
|
result = (feature_node **)feature_node_matrix(arg1);
|
4393
4426
|
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_p_feature_node, 0 | 0 );
|
@@ -4408,23 +4441,23 @@ _wrap_feature_node_matrix_set(int argc, VALUE *argv, VALUE self) {
|
|
4408
4441
|
int ecode2 = 0 ;
|
4409
4442
|
void *argp3 = 0 ;
|
4410
4443
|
int res3 = 0 ;
|
4411
|
-
|
4444
|
+
|
4412
4445
|
if ((argc < 3) || (argc > 3)) {
|
4413
4446
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
|
4414
4447
|
}
|
4415
4448
|
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_p_feature_node, 0 | 0 );
|
4416
4449
|
if (!SWIG_IsOK(res1)) {
|
4417
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "feature_node **","feature_node_matrix_set", 1, argv[0] ));
|
4450
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "feature_node **","feature_node_matrix_set", 1, argv[0] ));
|
4418
4451
|
}
|
4419
4452
|
arg1 = reinterpret_cast< feature_node ** >(argp1);
|
4420
4453
|
ecode2 = SWIG_AsVal_int(argv[1], &val2);
|
4421
4454
|
if (!SWIG_IsOK(ecode2)) {
|
4422
4455
|
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","feature_node_matrix_set", 2, argv[1] ));
|
4423
|
-
}
|
4456
|
+
}
|
4424
4457
|
arg2 = static_cast< int >(val2);
|
4425
4458
|
res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_feature_node, 0 | 0 );
|
4426
4459
|
if (!SWIG_IsOK(res3)) {
|
4427
|
-
SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "feature_node *","feature_node_matrix_set", 3, argv[2] ));
|
4460
|
+
SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "feature_node *","feature_node_matrix_set", 3, argv[2] ));
|
4428
4461
|
}
|
4429
4462
|
arg3 = reinterpret_cast< feature_node * >(argp3);
|
4430
4463
|
feature_node_matrix_set(arg1,arg2,arg3);
|
@@ -4439,13 +4472,13 @@ _wrap_feature_node_matrix_destroy(int argc, VALUE *argv, VALUE self) {
|
|
4439
4472
|
feature_node **arg1 = (feature_node **) 0 ;
|
4440
4473
|
void *argp1 = 0 ;
|
4441
4474
|
int res1 = 0 ;
|
4442
|
-
|
4475
|
+
|
4443
4476
|
if ((argc < 1) || (argc > 1)) {
|
4444
4477
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
4445
4478
|
}
|
4446
4479
|
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_p_feature_node, 0 | 0 );
|
4447
4480
|
if (!SWIG_IsOK(res1)) {
|
4448
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "feature_node **","feature_node_matrix_destroy", 1, argv[0] ));
|
4481
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "feature_node **","feature_node_matrix_destroy", 1, argv[0] ));
|
4449
4482
|
}
|
4450
4483
|
arg1 = reinterpret_cast< feature_node ** >(argp1);
|
4451
4484
|
feature_node_matrix_destroy(arg1);
|
@@ -4461,7 +4494,7 @@ _wrap_print_string_stdout(int argc, VALUE *argv, VALUE self) {
|
|
4461
4494
|
int res1 ;
|
4462
4495
|
char *buf1 = 0 ;
|
4463
4496
|
int alloc1 = 0 ;
|
4464
|
-
|
4497
|
+
|
4465
4498
|
if ((argc < 1) || (argc > 1)) {
|
4466
4499
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
4467
4500
|
}
|
@@ -4485,7 +4518,7 @@ _wrap_print_null(int argc, VALUE *argv, VALUE self) {
|
|
4485
4518
|
int res1 ;
|
4486
4519
|
char *buf1 = 0 ;
|
4487
4520
|
int alloc1 = 0 ;
|
4488
|
-
|
4521
|
+
|
4489
4522
|
if ((argc < 1) || (argc > 1)) {
|
4490
4523
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
4491
4524
|
}
|
@@ -4583,18 +4616,18 @@ static swig_cast_info *swig_cast_initial[] = {
|
|
4583
4616
|
|
4584
4617
|
/* -----------------------------------------------------------------------------
|
4585
4618
|
* Type initialization:
|
4586
|
-
* This problem is tough by the requirement that no dynamic
|
4587
|
-
* memory is used. Also, since swig_type_info structures store pointers to
|
4619
|
+
* This problem is tough by the requirement that no dynamic
|
4620
|
+
* memory is used. Also, since swig_type_info structures store pointers to
|
4588
4621
|
* swig_cast_info structures and swig_cast_info structures store pointers back
|
4589
|
-
* to swig_type_info structures, we need some lookup code at initialization.
|
4590
|
-
* The idea is that swig generates all the structures that are needed.
|
4591
|
-
* The runtime then collects these partially filled structures.
|
4592
|
-
* The SWIG_InitializeModule function takes these initial arrays out of
|
4622
|
+
* to swig_type_info structures, we need some lookup code at initialization.
|
4623
|
+
* The idea is that swig generates all the structures that are needed.
|
4624
|
+
* The runtime then collects these partially filled structures.
|
4625
|
+
* The SWIG_InitializeModule function takes these initial arrays out of
|
4593
4626
|
* swig_module, and does all the lookup, filling in the swig_module.types
|
4594
4627
|
* array with the correct data and linking the correct swig_cast_info
|
4595
4628
|
* structures together.
|
4596
4629
|
*
|
4597
|
-
* The generated swig_type_info structures are assigned staticly to an initial
|
4630
|
+
* The generated swig_type_info structures are assigned staticly to an initial
|
4598
4631
|
* array. We just loop through that array, and handle each type individually.
|
4599
4632
|
* First we lookup if this type has been already loaded, and if so, use the
|
4600
4633
|
* loaded structure instead of the generated one. Then we have to fill in the
|
@@ -4604,17 +4637,17 @@ static swig_cast_info *swig_cast_initial[] = {
|
|
4604
4637
|
* a column is one of the swig_cast_info structures for that type.
|
4605
4638
|
* The cast_initial array is actually an array of arrays, because each row has
|
4606
4639
|
* a variable number of columns. So to actually build the cast linked list,
|
4607
|
-
* we find the array of casts associated with the type, and loop through it
|
4640
|
+
* we find the array of casts associated with the type, and loop through it
|
4608
4641
|
* adding the casts to the list. The one last trick we need to do is making
|
4609
4642
|
* sure the type pointer in the swig_cast_info struct is correct.
|
4610
4643
|
*
|
4611
|
-
* First off, we lookup the cast->type name to see if it is already loaded.
|
4644
|
+
* First off, we lookup the cast->type name to see if it is already loaded.
|
4612
4645
|
* There are three cases to handle:
|
4613
4646
|
* 1) If the cast->type has already been loaded AND the type we are adding
|
4614
4647
|
* casting info to has not been loaded (it is in this module), THEN we
|
4615
4648
|
* replace the cast->type pointer with the type pointer that has already
|
4616
4649
|
* been loaded.
|
4617
|
-
* 2) If BOTH types (the one we are adding casting info to, and the
|
4650
|
+
* 2) If BOTH types (the one we are adding casting info to, and the
|
4618
4651
|
* cast->type) are loaded, THEN the cast info has already been loaded by
|
4619
4652
|
* the previous module so we just ignore it.
|
4620
4653
|
* 3) Finally, if cast->type has not already been loaded, then we add that
|
@@ -4693,7 +4726,7 @@ SWIG_InitializeModule(void *clientdata) {
|
|
4693
4726
|
swig_type_info *type = 0;
|
4694
4727
|
swig_type_info *ret;
|
4695
4728
|
swig_cast_info *cast;
|
4696
|
-
|
4729
|
+
|
4697
4730
|
#ifdef SWIGRUNTIME_DEBUG
|
4698
4731
|
printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
|
4699
4732
|
#endif
|
@@ -4720,7 +4753,7 @@ SWIG_InitializeModule(void *clientdata) {
|
|
4720
4753
|
/* Insert casting types */
|
4721
4754
|
cast = swig_module.cast_initial[i];
|
4722
4755
|
while (cast->type) {
|
4723
|
-
|
4756
|
+
|
4724
4757
|
/* Don't need to add information already in the list */
|
4725
4758
|
ret = 0;
|
4726
4759
|
#ifdef SWIGRUNTIME_DEBUG
|
@@ -4826,17 +4859,20 @@ extern "C"
|
|
4826
4859
|
#endif
|
4827
4860
|
SWIGEXPORT void Init_liblinearswig(void) {
|
4828
4861
|
size_t i;
|
4829
|
-
|
4862
|
+
|
4830
4863
|
SWIG_InitRuntime();
|
4831
4864
|
mLiblinearswig = rb_define_module("Liblinearswig");
|
4832
|
-
|
4865
|
+
|
4833
4866
|
SWIG_InitializeModule(0);
|
4834
4867
|
for (i = 0; i < swig_module.size; i++) {
|
4835
4868
|
SWIG_define_class(swig_module.types[i]);
|
4836
4869
|
}
|
4837
|
-
|
4870
|
+
|
4838
4871
|
SWIG_RubyInitializeTrackings();
|
4839
|
-
|
4872
|
+
rb_define_const(mLiblinearswig, "LIBLINEAR_VERSION", SWIG_From_int(static_cast< int >(230)));
|
4873
|
+
rb_define_singleton_method(mLiblinearswig, "liblinear_version", VALUEFUNC(_wrap_liblinear_version_get), 0);
|
4874
|
+
rb_define_singleton_method(mLiblinearswig, "liblinear_version=", VALUEFUNC(_wrap_liblinear_version_set), 1);
|
4875
|
+
|
4840
4876
|
SwigClassFeature_node.klass = rb_define_class_under(mLiblinearswig, "Feature_node", rb_cObject);
|
4841
4877
|
SWIG_TypeClientData(SWIGTYPE_p_feature_node, (void *) &SwigClassFeature_node);
|
4842
4878
|
rb_define_alloc_func(SwigClassFeature_node.klass, _wrap_feature_node_allocate);
|
@@ -4848,7 +4884,7 @@ SWIGEXPORT void Init_liblinearswig(void) {
|
|
4848
4884
|
SwigClassFeature_node.mark = 0;
|
4849
4885
|
SwigClassFeature_node.destroy = (void (*)(void *)) free_feature_node;
|
4850
4886
|
SwigClassFeature_node.trackObjects = 0;
|
4851
|
-
|
4887
|
+
|
4852
4888
|
SwigClassProblem.klass = rb_define_class_under(mLiblinearswig, "Problem", rb_cObject);
|
4853
4889
|
SWIG_TypeClientData(SWIGTYPE_p_problem, (void *) &SwigClassProblem);
|
4854
4890
|
rb_define_alloc_func(SwigClassProblem.klass, _wrap_problem_allocate);
|
@@ -4877,7 +4913,6 @@ SWIGEXPORT void Init_liblinearswig(void) {
|
|
4877
4913
|
rb_define_const(mLiblinearswig, "L2R_L2LOSS_SVR", SWIG_From_int(static_cast< int >(L2R_L2LOSS_SVR)));
|
4878
4914
|
rb_define_const(mLiblinearswig, "L2R_L2LOSS_SVR_DUAL", SWIG_From_int(static_cast< int >(L2R_L2LOSS_SVR_DUAL)));
|
4879
4915
|
rb_define_const(mLiblinearswig, "L2R_L1LOSS_SVR_DUAL", SWIG_From_int(static_cast< int >(L2R_L1LOSS_SVR_DUAL)));
|
4880
|
-
rb_define_const(mLiblinearswig, "LIBLINEAR_VERSION", SWIG_From_int(static_cast< int >(LIBLINEAR_VERSION)));
|
4881
4916
|
|
4882
4917
|
SwigClassParameter.klass = rb_define_class_under(mLiblinearswig, "Parameter", rb_cObject);
|
4883
4918
|
SWIG_TypeClientData(SWIGTYPE_p_parameter, (void *) &SwigClassParameter);
|
@@ -4902,7 +4937,7 @@ SWIGEXPORT void Init_liblinearswig(void) {
|
|
4902
4937
|
SwigClassParameter.mark = 0;
|
4903
4938
|
SwigClassParameter.destroy = (void (*)(void *)) free_parameter;
|
4904
4939
|
SwigClassParameter.trackObjects = 0;
|
4905
|
-
|
4940
|
+
|
4906
4941
|
SwigClassModel.klass = rb_define_class_under(mLiblinearswig, "Model", rb_cObject);
|
4907
4942
|
SWIG_TypeClientData(SWIGTYPE_p_model, (void *) &SwigClassModel);
|
4908
4943
|
rb_define_alloc_func(SwigClassModel.klass, _wrap_model_allocate);
|
@@ -4924,7 +4959,7 @@ SWIGEXPORT void Init_liblinearswig(void) {
|
|
4924
4959
|
SwigClassModel.trackObjects = 0;
|
4925
4960
|
rb_define_module_function(mLiblinearswig, "train", VALUEFUNC(_wrap_train), -1);
|
4926
4961
|
rb_define_module_function(mLiblinearswig, "cross_validation", VALUEFUNC(_wrap_cross_validation), -1);
|
4927
|
-
rb_define_module_function(mLiblinearswig, "
|
4962
|
+
rb_define_module_function(mLiblinearswig, "find_parameters", VALUEFUNC(_wrap_find_parameters), -1);
|
4928
4963
|
rb_define_module_function(mLiblinearswig, "predict_values", VALUEFUNC(_wrap_predict_values), -1);
|
4929
4964
|
rb_define_module_function(mLiblinearswig, "predict", VALUEFUNC(_wrap_predict), -1);
|
4930
4965
|
rb_define_module_function(mLiblinearswig, "predict_probability", VALUEFUNC(_wrap_predict_probability), -1);
|
@@ -4961,3 +4996,4 @@ SWIGEXPORT void Init_liblinearswig(void) {
|
|
4961
4996
|
rb_define_module_function(mLiblinearswig, "enable_stdout", VALUEFUNC(_wrap_enable_stdout), -1);
|
4962
4997
|
rb_define_module_function(mLiblinearswig, "disable_stdout", VALUEFUNC(_wrap_disable_stdout), -1);
|
4963
4998
|
}
|
4999
|
+
|