Class: GPS_PVT::SylphideMath::MatrixD
- Inherits:
-
((swig_class *) SWIGTYPE_p_Matrix_FrozenT_double_Array2D_DenseT_double_t_MatrixViewBaseT_t_t->clientdata)->klass
- Object
- ((swig_class *) SWIGTYPE_p_Matrix_FrozenT_double_Array2D_DenseT_double_t_MatrixViewBaseT_t_t->clientdata)->klass
- GPS_PVT::SylphideMath::MatrixD
- Defined in:
- ext/gps_pvt/SylphideMath/SylphideMath_wrap.cxx,
ext/gps_pvt/SylphideMath/SylphideMath_wrap.cxx
Overview
Proxy of C++ GPS_PVT::SylphideMath::MatrixD class
Class Method Summary collapse
-
.I(*args) ⇒ Object
call-seq: I(unsigned int const & size) -> MatrixD.
-
.scalar(*args) ⇒ Object
call-seq: scalar(unsigned int const & size, double const & scalar) -> MatrixD.
Instance Method Summary collapse
-
#[]=(*args) ⇒ Object
call-seq: []=(row, column, value) -> double &.
- #initialize(*args, self) ⇒ Object constructor
-
#map!(*args, self) ⇒ Object
(also: #collect!, #map_with_index!, #collect_with_index!)
call-seq: map!(MatrixUtil::each_which_t const each_which=MatrixUtil::EACH_ALL) map!.
-
#replace!(*args, self) ⇒ Object
call-seq: replace!(matrix) replace!(matrix) replace!(replacer=nil) replace! replace!(serialized).
-
#resize!(*args) ⇒ Object
call-seq: resize(r_p, c_p) -> MatrixD.
-
#swap_columns!(*args) ⇒ Object
call-seq: swap_columns(unsigned int const & c1, unsigned int const & c2).
-
#swap_rows!(*args) ⇒ Object
call-seq: swap_rows(unsigned int const & r1, unsigned int const & r2).
Constructor Details
#initialize(*args, self) ⇒ Object
13106 13107 13108 13109 13110 13111 13112 13113 13114 13115 13116 13117 13118 13119 13120 13121 13122 13123 13124 13125 13126 13127 13128 13129 13130 13131 13132 13133 13134 13135 13136 13137 13138 13139 13140 13141 13142 13143 13144 13145 13146 13147 13148 13149 13150 13151 13152 13153 13154 13155 13156 13157 13158 13159 13160 13161 13162 13163 13164 13165 13166 13167 13168 13169 13170 13171 13172 13173 13174 13175 13176 13177 13178 13179 13180 13181 13182 13183 13184 13185 13186 13187 13188 13189 13190 13191 13192 13193 13194 13195 13196 13197 13198 |
# File 'ext/gps_pvt/SylphideMath/SylphideMath_wrap.cxx', line 13106
SWIGINTERN VALUE _wrap_new_MatrixD(int nargs, VALUE *args, VALUE self) {
int argc;
VALUE argv[3];
int ii;
argc = nargs;
if (argc > 3) SWIG_fail;
for (ii = 0; (ii < argc); ++ii) {
argv[ii] = args[ii];
}
if (argc == 1) {
int _v;
{
_v = rb_block_given_p() ? 0 : 1;
}
if (_v) {
return _wrap_new_MatrixD__SWIG_3(nargs, args, self);
}
}
if (argc == 2) {
int _v;
{
int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
{
int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
return _wrap_new_MatrixD__SWIG_1(nargs, args, self);
}
}
}
if (argc == 3) {
int _v;
{
int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
{
int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_double, 0);
_v = SWIG_CheckState(res);
if (_v) {
return _wrap_new_MatrixD__SWIG_2(nargs, args, self);
}
}
}
}
if (argc == 3) {
int _v;
{
int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
{
int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
{
_v = rb_block_given_p() ? 0 : 1;
}
if (_v) {
return _wrap_new_MatrixD__SWIG_0(nargs, args, self);
}
}
}
}
fail:
Ruby_Format_OverloadedError( argc, 3, "MatrixD.new",
" MatrixD.new(unsigned int const &rows, unsigned int const &columns, void const *replacer)\n"
" MatrixD.new(unsigned int const &rows, unsigned int const &columns)\n"
" MatrixD.new(unsigned int const &rows, unsigned int const &columns, double const *serialized)\n"
" MatrixD.new(void const *replacer)\n");
return Qnil;
}
|
Class Method Details
.I(*args) ⇒ Object
call-seq:
I(unsigned int const & size) -> MatrixD
A class method.
13320 13321 13322 13323 13324 13325 13326 13327 13328 13329 13330 13331 13332 13333 13334 13335 13336 13337 13338 13339 13340 13341 13342 13343 13344 |
# File 'ext/gps_pvt/SylphideMath/SylphideMath_wrap.cxx', line 13320
SWIGINTERN VALUE
_wrap_MatrixD_I(int argc, VALUE *argv, VALUE self) {
unsigned int *arg1 = 0 ;
unsigned int temp1 ;
unsigned int val1 ;
int ecode1 = 0 ;
SwigValueWrapper< Matrix< double,Array2D_Dense< double > > > result;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
if (!SWIG_IsOK(ecode1)) {
SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "unsigned int","Matrix_Sl_double_Sc_Array2D_Dense_Sl_double_Sg__Sg__getI", 1, argv[0] ));
}
temp1 = static_cast< unsigned int >(val1);
arg1 = &temp1;
raise_if_lt_zero_after_asval(*arg1);
result = Matrix_Sl_double_Sc_Array2D_Dense_Sl_double_Sg__Sg__getI((unsigned int const &)*arg1);
vresult = SWIG_NewPointerObj((new Matrix< double,Array2D_Dense< double > >(static_cast< const Matrix< double,Array2D_Dense< double > >& >(result))), SWIGTYPE_p_MatrixT_double_Array2D_DenseT_double_t_MatrixViewBaseT_t_t, SWIG_POINTER_OWN | 0 );
return vresult;
fail:
return Qnil;
}
|
.scalar(*args) ⇒ Object
call-seq:
scalar(unsigned int const & size, double const & scalar) -> MatrixD
A class method.
13274 13275 13276 13277 13278 13279 13280 13281 13282 13283 13284 13285 13286 13287 13288 13289 13290 13291 13292 13293 13294 13295 13296 13297 13298 13299 13300 13301 13302 13303 13304 13305 13306 13307 13308 |
# File 'ext/gps_pvt/SylphideMath/SylphideMath_wrap.cxx', line 13274
SWIGINTERN VALUE
_wrap_MatrixD_scalar(int argc, VALUE *argv, VALUE self) {
unsigned int *arg1 = 0 ;
double *arg2 = 0 ;
unsigned int temp1 ;
unsigned int val1 ;
int ecode1 = 0 ;
double temp2 ;
double val2 ;
int ecode2 = 0 ;
SwigValueWrapper< Matrix< double,Array2D_Dense< double > > > result;
VALUE vresult = Qnil;
if ((argc < 2) || (argc > 2)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
}
ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
if (!SWIG_IsOK(ecode1)) {
SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "unsigned int","Matrix_Sl_double_Sc_Array2D_Dense_Sl_double_Sg__Sg__getScalar", 1, argv[0] ));
}
temp1 = static_cast< unsigned int >(val1);
arg1 = &temp1;
ecode2 = SWIG_AsVal_double(argv[1], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","Matrix_Sl_double_Sc_Array2D_Dense_Sl_double_Sg__Sg__getScalar", 2, argv[1] ));
}
temp2 = static_cast< double >(val2);
arg2 = &temp2;
raise_if_lt_zero_after_asval(*arg1);
result = Matrix_Sl_double_Sc_Array2D_Dense_Sl_double_Sg__Sg__getScalar((unsigned int const &)*arg1,(double const &)*arg2);
vresult = SWIG_NewPointerObj((new Matrix< double,Array2D_Dense< double > >(static_cast< const Matrix< double,Array2D_Dense< double > >& >(result))), SWIGTYPE_p_MatrixT_double_Array2D_DenseT_double_t_MatrixViewBaseT_t_t, SWIG_POINTER_OWN | 0 );
return vresult;
fail:
return Qnil;
}
|
Instance Method Details
#[]=(*args) ⇒ Object
call-seq:
[]=(row, column, value) -> double &
Element setter/slicing.
13209 13210 13211 13212 13213 13214 13215 13216 13217 13218 13219 13220 13221 13222 13223 13224 13225 13226 13227 13228 13229 13230 13231 13232 13233 13234 13235 13236 13237 13238 13239 13240 13241 13242 13243 13244 13245 13246 13247 13248 13249 13250 13251 13252 13253 13254 13255 13256 13257 13258 13259 13260 13261 13262 |
# File 'ext/gps_pvt/SylphideMath/SylphideMath_wrap.cxx', line 13209
SWIGINTERN VALUE
_wrap_MatrixD___setitem__(int argc, VALUE *argv, VALUE self) {
Matrix< double,Array2D_Dense< double > > *arg1 = (Matrix< double,Array2D_Dense< double > > *) 0 ;
unsigned int *arg2 = 0 ;
unsigned int *arg3 = 0 ;
double *arg4 = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
unsigned int temp2 ;
unsigned int val2 ;
int ecode2 = 0 ;
unsigned int temp3 ;
unsigned int val3 ;
int ecode3 = 0 ;
double temp4 ;
double val4 ;
int ecode4 = 0 ;
double *result = 0 ;
VALUE vresult = Qnil;
if ((argc < 3) || (argc > 3)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_MatrixT_double_Array2D_DenseT_double_t_MatrixViewBaseT_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Matrix< double,Array2D_Dense< double > > *","__setitem__", 1, self ));
}
arg1 = reinterpret_cast< Matrix< double,Array2D_Dense< double > > * >(argp1);
ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "unsigned int","__setitem__", 2, argv[0] ));
}
temp2 = static_cast< unsigned int >(val2);
arg2 = &temp2;
ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3);
if (!SWIG_IsOK(ecode3)) {
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "unsigned int","__setitem__", 3, argv[1] ));
}
temp3 = static_cast< unsigned int >(val3);
arg3 = &temp3;
ecode4 = SWIG_AsVal_double(argv[2], &val4);
if (!SWIG_IsOK(ecode4)) {
SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","__setitem__", 4, argv[2] ));
}
temp4 = static_cast< double >(val4);
arg4 = &temp4;
raise_if_lt_zero_after_asval(*arg2);
raise_if_lt_zero_after_asval(*arg3);
result = (double *) &Matrix_Sl_double_Sc_Array2D_Dense_Sl_double_Sg__Sg____setitem__(arg1,(unsigned int const &)*arg2,(unsigned int const &)*arg3,(double const &)*arg4);
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 );
return vresult;
fail:
return Qnil;
}
|
#map!(*args, self) ⇒ Object Also known as: collect!, map_with_index!, collect_with_index!
call-seq:
map!(MatrixUtil::each_which_t const each_which=MatrixUtil::EACH_ALL)
map!
An instance method.
13856 13857 13858 13859 13860 13861 13862 13863 13864 13865 13866 13867 13868 13869 13870 13871 13872 13873 13874 13875 13876 13877 13878 13879 13880 13881 13882 13883 13884 13885 13886 13887 13888 13889 13890 13891 13892 13893 13894 13895 13896 13897 |
# File 'ext/gps_pvt/SylphideMath/SylphideMath_wrap.cxx', line 13856
SWIGINTERN VALUE _wrap_MatrixD_mapN___(int nargs, VALUE *args, VALUE self) {
int argc;
VALUE argv[3];
int ii;
argc = nargs + 1;
argv[0] = self;
if (argc > 3) SWIG_fail;
for (ii = 1; (ii < argc); ++ii) {
argv[ii] = args[ii-1];
}
if (argc == 1) {
int _v;
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MatrixT_double_Array2D_DenseT_double_t_MatrixViewBaseT_t_t, 0);
_v = SWIG_CheckState(res);
if (_v) {
return _wrap_MatrixD_mapN_____SWIG_1(nargs, args, self);
}
}
if (argc == 2) {
int _v;
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MatrixT_double_Array2D_DenseT_double_t_MatrixViewBaseT_t_t, 0);
_v = SWIG_CheckState(res);
if (_v) {
{
_v = (MatrixUtil::sym2each_which(argv[1]) != MatrixUtil::EACH_UNKNOWN);
}
if (_v) {
return _wrap_MatrixD_mapN_____SWIG_0(nargs, args, self);
}
}
}
fail:
Ruby_Format_OverloadedError( argc, 3, "map!",
" void map!(Matrix< double,Array2D_Dense< double > >::self_t *self_p, void (*each_func)(double const &,double *,unsigned int const &,unsigned int const &), MatrixUtil::each_which_t const each_which)\n"
" void map!(Matrix< double,Array2D_Dense< double > >::self_t *self_p, void (*each_func)(double const &,double *,unsigned int const &,unsigned int const &))\n");
return Qnil;
}
|
#replace!(*args, self) ⇒ Object
call-seq:
replace!(matrix)
replace!(matrix)
replace!(replacer=nil)
replace!
replace!(serialized)
Replace all or a portion of the MatrixD.
13668 13669 13670 13671 13672 13673 13674 13675 13676 13677 13678 13679 13680 13681 13682 13683 13684 13685 13686 13687 13688 13689 13690 13691 13692 13693 13694 13695 13696 13697 13698 13699 13700 13701 13702 13703 13704 13705 13706 13707 13708 13709 13710 13711 13712 13713 13714 13715 13716 13717 13718 13719 13720 13721 13722 13723 13724 13725 13726 13727 13728 13729 13730 13731 13732 13733 13734 13735 13736 13737 13738 13739 13740 13741 13742 13743 13744 13745 13746 13747 13748 13749 13750 13751 13752 13753 13754 13755 13756 13757 |
# File 'ext/gps_pvt/SylphideMath/SylphideMath_wrap.cxx', line 13668
SWIGINTERN VALUE _wrap_MatrixD_replaceN___(int nargs, VALUE *args, VALUE self) {
int argc;
VALUE argv[3];
int ii;
argc = nargs + 1;
argv[0] = self;
if (argc > 3) SWIG_fail;
for (ii = 1; (ii < argc); ++ii) {
argv[ii] = args[ii-1];
}
if (argc == 1) {
int _v;
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MatrixT_double_Array2D_DenseT_double_t_MatrixViewBaseT_t_t, 0);
_v = SWIG_CheckState(res);
if (_v) {
return _wrap_MatrixD_replaceN_____SWIG_4(nargs, args, self);
}
}
if (argc == 2) {
int _v;
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MatrixT_double_Array2D_DenseT_double_t_MatrixViewBaseT_t_t, 0);
_v = SWIG_CheckState(res);
if (_v) {
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Matrix_FrozenT_double_Array2D_DenseT_double_t_MatrixViewFilterT_MatrixViewBaseT_t_t_t, SWIG_POINTER_NO_NULL);
_v = SWIG_CheckState(res);
if (_v) {
return _wrap_MatrixD_replaceN_____SWIG_2(nargs, args, self);
}
}
}
if (argc == 2) {
int _v;
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MatrixT_double_Array2D_DenseT_double_t_MatrixViewBaseT_t_t, 0);
_v = SWIG_CheckState(res);
if (_v) {
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Matrix_FrozenT_double_Array2D_DenseT_double_t_MatrixViewBaseT_t_t, SWIG_POINTER_NO_NULL);
_v = SWIG_CheckState(res);
if (_v) {
return _wrap_MatrixD_replaceN_____SWIG_1(nargs, args, self);
}
}
}
if (argc == 2) {
int _v;
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MatrixT_double_Array2D_DenseT_double_t_MatrixViewBaseT_t_t, 0);
_v = SWIG_CheckState(res);
if (_v) {
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_double, 0);
_v = SWIG_CheckState(res);
if (_v) {
return _wrap_MatrixD_replaceN_____SWIG_5(nargs, args, self);
}
}
}
if (argc == 2) {
int _v;
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MatrixT_double_Array2D_DenseT_double_t_MatrixViewBaseT_t_t, 0);
_v = SWIG_CheckState(res);
if (_v) {
{
_v = rb_block_given_p() ? 0 : 1;
}
if (_v) {
return _wrap_MatrixD_replaceN_____SWIG_3(nargs, args, self);
}
}
}
fail:
Ruby_Format_OverloadedError( argc, 3, "replace!",
" void replace!(Matrix< double,Array2D_Dense< double > >::self_t *self_p, Matrix_Frozen< double,Array2D_Dense< double >,MatrixViewBase< > > const &matrix)\n"
" void replace!(Matrix< double,Array2D_Dense< double > >::self_t *self_p, Matrix_Frozen< double,Array2D_Dense< double >,MatrixViewFilter< MatrixViewBase< > > > const &matrix)\n"
" void replace!(Matrix< double,Array2D_Dense< double > >::self_t *self_p, void const *replacer)\n"
" void replace!(Matrix< double,Array2D_Dense< double > >::self_t *self_p)\n"
" void replace!(Matrix< double,Array2D_Dense< double > >::self_t *self_p, double const *serialized)\n");
return Qnil;
}
|
#resize!(*args) ⇒ Object
call-seq:
resize(r_p, c_p) -> MatrixD
Resize the size of the MatrixD.
13908 13909 13910 13911 13912 13913 13914 13915 13916 13917 13918 13919 13920 13921 13922 13923 13924 13925 13926 13927 13928 13929 13930 13931 13932 13933 13934 13935 13936 13937 13938 13939 13940 13941 13942 13943 13944 13945 13946 13947 13948 13949 13950 13951 13952 13953 13954 13955 13956 13957 13958 13959 13960 13961 13962 13963 |
# File 'ext/gps_pvt/SylphideMath/SylphideMath_wrap.cxx', line 13908
SWIGINTERN VALUE
_wrap_MatrixD_resizeN___(int argc, VALUE *argv, VALUE self) {
Matrix< double,Array2D_Dense< double > > *arg1 = (Matrix< double,Array2D_Dense< double > > *) 0 ;
unsigned int *arg2 = (unsigned int *) 0 ;
unsigned int *arg3 = (unsigned int *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
unsigned int temp2 ;
unsigned int temp3 ;
Matrix< double,Array2D_Dense< double > > *result = 0 ;
VALUE vresult = Qnil;
if ((argc < 2) || (argc > 2)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_MatrixT_double_Array2D_DenseT_double_t_MatrixViewBaseT_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Matrix< double,Array2D_Dense< double > > *","resize", 1, self ));
}
arg1 = reinterpret_cast< Matrix< double,Array2D_Dense< double > > * >(argp1);
{
if(SWIG_IsOK(SWIG_AsVal_unsigned_SS_int (argv[0], &temp2))){
raise_if_lt_zero_after_asval(temp2);
arg2 = &temp2;
}
else if(NIL_P(argv[0])){
arg2 = NULL;
}
else{
SWIG_exception(SWIG_TypeError, "unsigned int is expected");
}
}
{
if(SWIG_IsOK(SWIG_AsVal_unsigned_SS_int (argv[1], &temp3))){
raise_if_lt_zero_after_asval(temp3);
arg3 = &temp3;
}
else if(NIL_P(argv[1])){
arg3 = NULL;
}
else{
SWIG_exception(SWIG_TypeError, "unsigned int is expected");
}
}
result = (Matrix< double,Array2D_Dense< double > > *) &Matrix_Sl_double_Sc_Array2D_Dense_Sl_double_Sg__Sg__resize(arg1,(unsigned int const *)arg2,(unsigned int const *)arg3);
vresult = self;
return vresult;
fail:
return Qnil;
}
|
#swap_columns!(*args) ⇒ Object
call-seq:
swap_columns(unsigned int const & c1, unsigned int const & c2)
An instance method.
13416 13417 13418 13419 13420 13421 13422 13423 13424 13425 13426 13427 13428 13429 13430 13431 13432 13433 13434 13435 13436 13437 13438 13439 13440 13441 13442 13443 13444 13445 13446 13447 13448 13449 13450 13451 13452 13453 13454 13455 13456 13457 13458 13459 13460 13461 13462 13463 13464 |
# File 'ext/gps_pvt/SylphideMath/SylphideMath_wrap.cxx', line 13416
SWIGINTERN VALUE
_wrap_MatrixD_swap_columnsN___(int argc, VALUE *argv, VALUE self) {
Matrix< double,Array2D_Dense< double > > *arg1 = (Matrix< double,Array2D_Dense< double > > *) 0 ;
Matrix< double,Array2D_Dense< double > >::self_t *arg2 = (Matrix< double,Array2D_Dense< double > >::self_t *) 0 ;
unsigned int *arg3 = 0 ;
unsigned int *arg4 = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
unsigned int temp3 ;
unsigned int val3 ;
int ecode3 = 0 ;
unsigned int temp4 ;
unsigned int val4 ;
int ecode4 = 0 ;
VALUE vresult = Qnil;
if ((argc < 2) || (argc > 2)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_MatrixT_double_Array2D_DenseT_double_t_MatrixViewBaseT_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Matrix< double,Array2D_Dense< double > > *","swap_columns", 1, self ));
}
arg1 = reinterpret_cast< Matrix< double,Array2D_Dense< double > > * >(argp1);
ecode3 = SWIG_AsVal_unsigned_SS_int(argv[0], &val3);
if (!SWIG_IsOK(ecode3)) {
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "unsigned int","swap_columns", 3, argv[0] ));
}
temp3 = static_cast< unsigned int >(val3);
arg3 = &temp3;
ecode4 = SWIG_AsVal_unsigned_SS_int(argv[1], &val4);
if (!SWIG_IsOK(ecode4)) {
SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "unsigned int","swap_columns", 4, argv[1] ));
}
temp4 = static_cast< unsigned int >(val4);
arg4 = &temp4;
raise_if_lt_zero_after_asval(*arg3);
raise_if_lt_zero_after_asval(*arg4);
try {
Matrix_Sl_double_Sc_Array2D_Dense_Sl_double_Sg__Sg__swap_columns(arg1,arg2,(unsigned int const &)*arg3,(unsigned int const &)*arg4);
} catch(std::out_of_range &_e) {
SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
}
vresult = self;
return vresult;
fail:
return Qnil;
}
|
#swap_rows!(*args) ⇒ Object
call-seq:
swap_rows(unsigned int const & r1, unsigned int const & r2)
An instance method.
13356 13357 13358 13359 13360 13361 13362 13363 13364 13365 13366 13367 13368 13369 13370 13371 13372 13373 13374 13375 13376 13377 13378 13379 13380 13381 13382 13383 13384 13385 13386 13387 13388 13389 13390 13391 13392 13393 13394 13395 13396 13397 13398 13399 13400 13401 13402 13403 13404 |
# File 'ext/gps_pvt/SylphideMath/SylphideMath_wrap.cxx', line 13356
SWIGINTERN VALUE
_wrap_MatrixD_swap_rowsN___(int argc, VALUE *argv, VALUE self) {
Matrix< double,Array2D_Dense< double > > *arg1 = (Matrix< double,Array2D_Dense< double > > *) 0 ;
Matrix< double,Array2D_Dense< double > >::self_t *arg2 = (Matrix< double,Array2D_Dense< double > >::self_t *) 0 ;
unsigned int *arg3 = 0 ;
unsigned int *arg4 = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
unsigned int temp3 ;
unsigned int val3 ;
int ecode3 = 0 ;
unsigned int temp4 ;
unsigned int val4 ;
int ecode4 = 0 ;
VALUE vresult = Qnil;
if ((argc < 2) || (argc > 2)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_MatrixT_double_Array2D_DenseT_double_t_MatrixViewBaseT_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Matrix< double,Array2D_Dense< double > > *","swap_rows", 1, self ));
}
arg1 = reinterpret_cast< Matrix< double,Array2D_Dense< double > > * >(argp1);
ecode3 = SWIG_AsVal_unsigned_SS_int(argv[0], &val3);
if (!SWIG_IsOK(ecode3)) {
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "unsigned int","swap_rows", 3, argv[0] ));
}
temp3 = static_cast< unsigned int >(val3);
arg3 = &temp3;
ecode4 = SWIG_AsVal_unsigned_SS_int(argv[1], &val4);
if (!SWIG_IsOK(ecode4)) {
SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "unsigned int","swap_rows", 4, argv[1] ));
}
temp4 = static_cast< unsigned int >(val4);
arg4 = &temp4;
raise_if_lt_zero_after_asval(*arg3);
raise_if_lt_zero_after_asval(*arg4);
try {
Matrix_Sl_double_Sc_Array2D_Dense_Sl_double_Sg__Sg__swap_rows(arg1,arg2,(unsigned int const &)*arg3,(unsigned int const &)*arg4);
} catch(std::out_of_range &_e) {
SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
}
vresult = self;
return vresult;
fail:
return Qnil;
}
|