Class: Tensorflow::Integer_Vector

Inherits:
Object
  • Object
show all
Defined in:
ext/Tensorflow_wrap.cxx

Instance Method Summary collapse

Constructor Details

#initialize(*args, self) ⇒ Object


10714
10715
10716
10717
10718
10719
10720
10721
10722
10723
10724
10725
10726
10727
10728
10729
10730
10731
10732
10733
10734
10735
10736
10737
10738
10739
10740
10741
10742
10743
10744
10745
10746
10747
10748
10749
10750
10751
10752
10753
10754
10755
10756
10757
10758
10759
10760
10761
10762
10763
10764
10765
10766
10767
10768
10769
10770
# File 'ext/Tensorflow_wrap.cxx', line 10714

SWIGINTERN VALUE _wrap_new_Integer_Vector(int nargs, VALUE *args, VALUE self) {
  int argc;
  VALUE argv[2];
  int ii;
  
  argc = nargs;
  if (argc > 2) SWIG_fail;
  for (ii = 0; (ii < argc); ++ii) {
    argv[ii] = args[ii];
  }
  if (argc == 0) {
    return _wrap_new_Integer_Vector__SWIG_0(nargs, args, self);
  }
  if (argc == 1) {
    int _v;
    {
      int res = SWIG_AsVal_size_t(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      return _wrap_new_Integer_Vector__SWIG_2(nargs, args, self);
    }
  }
  if (argc == 1) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< long long,std::allocator< long long > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_Integer_Vector__SWIG_1(nargs, args, self);
    }
  }
  if (argc == 2) {
    int _v;
    {
      int res = SWIG_AsVal_size_t(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_long_SS_long(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_new_Integer_Vector__SWIG_3(nargs, args, self);
      }
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 2, "Integer_Vector.new", 
    "    Integer_Vector.new()\n"
    "    Integer_Vector.new(std::vector< long long > const &)\n"
    "    Integer_Vector.new(std::vector< long long >::size_type size)\n"
    "    Integer_Vector.new(std::vector< long long >::size_type size, std::vector< long long >::value_type const &value)\n");
  
  return Qnil;
}

Instance Method Details

#[](*args, self) ⇒ Object

call-seq:

[](i, length) -> VALUE
[](i) -> VALUE
[](i) -> VALUE

Element accessor/slicing.


9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
# File 'ext/Tensorflow_wrap.cxx', line 9589

SWIGINTERN VALUE _wrap_Integer_Vector___getitem__(int nargs, VALUE *args, VALUE self) {
  int argc;
  VALUE argv[4];
  int ii;
  
  argc = nargs + 1;
  argv[0] = self;
  if (argc > 4) SWIG_fail;
  for (ii = 1; (ii < argc); ++ii) {
    argv[ii] = args[ii-1];
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< long long,std::allocator< long long > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_Integer_Vector___getitem____SWIG_1(nargs, args, self);
      }
    }
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< long long,std::allocator< long long > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      _v = (argv[1] != 0);
      if (_v) {
        return _wrap_Integer_Vector___getitem____SWIG_2(nargs, args, self);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< long long,std::allocator< long long > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_Integer_Vector___getitem____SWIG_0(nargs, args, self);
        }
      }
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 4, "__getitem__", 
    "    VALUE __getitem__(std::vector< long long >::difference_type i, std::vector< long long >::difference_type length)\n"
    "    VALUE __getitem__(std::vector< long long >::difference_type i)\n"
    "    VALUE __getitem__(VALUE i)\n");
  
  return Qnil;
}

#[]=(*args, self) ⇒ Object

call-seq:

[]=(i, x) -> VALUE
[]=(i, length, v) -> VALUE

Element setter/slicing.


9778
9779
9780
9781
9782
9783
9784
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
# File 'ext/Tensorflow_wrap.cxx', line 9778

SWIGINTERN VALUE _wrap_Integer_Vector___setitem__(int nargs, VALUE *args, VALUE self) {
  int argc;
  VALUE argv[5];
  int ii;
  
  argc = nargs + 1;
  argv[0] = self;
  if (argc > 5) SWIG_fail;
  for (ii = 1; (ii < argc); ++ii) {
    argv[ii] = args[ii-1];
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< long long,std::allocator< long long > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_long_SS_long(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_Integer_Vector___setitem____SWIG_0(nargs, args, self);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< long long,std::allocator< long long > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = swig::asptr(argv[3], (std::vector< long long,std::allocator< long long > >**)(0));
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_Integer_Vector___setitem____SWIG_1(nargs, args, self);
          }
        }
      }
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 5, "__setitem__", 
    "    VALUE __setitem__(std::vector< long long >::difference_type i, std::vector< long long >::value_type const &x)\n"
    "    VALUE __setitem__(std::vector< long long >::difference_type i, std::vector< long long >::difference_type length, std::vector< long long,std::allocator< long long > > const &v)\n");
  
  return Qnil;
}

#__delete2__(*args) ⇒ Object


9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
# File 'ext/Tensorflow_wrap.cxx', line 9319

SWIGINTERN VALUE
_wrap_Integer_Vector___delete2__(int argc, VALUE *argv, VALUE self) {
  std::vector< long long > *arg1 = (std::vector< long long > *) 0 ;
  std::vector< long long >::value_type *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::vector< long long >::value_type temp2 ;
  long long val2 ;
  int ecode2 = 0 ;
  VALUE result;
  VALUE vresult = Qnil;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_long_long_std__allocatorT_long_long_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< long long > *","__delete2__", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< long long > * >(argp1);
  ecode2 = SWIG_AsVal_long_SS_long(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< long long >::value_type","__delete2__", 2, argv[0] ));
  } 
  temp2 = static_cast< std::vector< long long >::value_type >(val2);
  arg2 = &temp2;
  result = (VALUE)std_vector_Sl_long_SS_long_Sg____delete2__(arg1,(long long const &)*arg2);
  vresult = result;
  return vresult;
fail:
  return Qnil;
}

#assign(*args) ⇒ Object

call-seq:

assign(n, x)

Assign a new Integer_Vector or portion of it.


10848
10849
10850
10851
10852
10853
10854
10855
10856
10857
10858
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870
10871
10872
10873
10874
10875
10876
10877
10878
10879
10880
10881
10882
10883
10884
# File 'ext/Tensorflow_wrap.cxx', line 10848

SWIGINTERN VALUE
_wrap_Integer_Vector_assign(int argc, VALUE *argv, VALUE self) {
  std::vector< long long > *arg1 = (std::vector< long long > *) 0 ;
  std::vector< long long >::size_type arg2 ;
  std::vector< long long >::value_type *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  std::vector< long long >::value_type temp3 ;
  long long val3 ;
  int ecode3 = 0 ;
  
  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_std__vectorT_long_long_std__allocatorT_long_long_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< long long > *","assign", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< long long > * >(argp1);
  ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< long long >::size_type","assign", 2, argv[0] ));
  } 
  arg2 = static_cast< std::vector< long long >::size_type >(val2);
  ecode3 = SWIG_AsVal_long_SS_long(argv[1], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "std::vector< long long >::value_type","assign", 3, argv[1] ));
  } 
  temp3 = static_cast< std::vector< long long >::value_type >(val3);
  arg3 = &temp3;
  (arg1)->assign(arg2,(std::vector< long long >::value_type const &)*arg3);
  return Qnil;
fail:
  return Qnil;
}

#at(*args) ⇒ Object

call-seq:

at(i) -> VALUE

Return element at a certain index.


9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
# File 'ext/Tensorflow_wrap.cxx', line 9436

SWIGINTERN VALUE
_wrap_Integer_Vector_at(int argc, VALUE *argv, VALUE self) {
  std::vector< long long > *arg1 = (std::vector< long long > *) 0 ;
  std::vector< long long >::difference_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  VALUE result;
  VALUE vresult = Qnil;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_long_long_std__allocatorT_long_long_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< long long > const *","at", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< long long > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< long long >::difference_type","at", 2, argv[0] ));
  } 
  arg2 = static_cast< std::vector< long long >::difference_type >(val2);
  result = (VALUE)std_vector_Sl_long_SS_long_Sg__at((std::vector< long long > const *)arg1,arg2);
  vresult = result;
  return vresult;
fail:
  return Qnil;
}

#back(*args) ⇒ Object

call-seq:

back -> std::vector< long long >::value_type const &

Return the last element in Integer_Vector.


10815
10816
10817
10818
10819
10820
10821
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834
10835
10836
# File 'ext/Tensorflow_wrap.cxx', line 10815

SWIGINTERN VALUE
_wrap_Integer_Vector_back(int argc, VALUE *argv, VALUE self) {
  std::vector< long long > *arg1 = (std::vector< long long > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::vector< long long >::value_type *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_long_long_std__allocatorT_long_long_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< long long > const *","back", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< long long > * >(argp1);
  result = (std::vector< long long >::value_type *) &((std::vector< long long > const *)arg1)->back();
  vresult = SWIG_From_long_SS_long(static_cast< long long >(*result));
  return vresult;
fail:
  return Qnil;
}

#begin(*args) ⇒ Object

call-seq:

begin -> std::vector< long long >::iterator

Return an iterator to the beginning of the Integer_Vector.


10260
10261
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
# File 'ext/Tensorflow_wrap.cxx', line 10260

SWIGINTERN VALUE
_wrap_Integer_Vector_begin(int argc, VALUE *argv, VALUE self) {
  std::vector< long long > *arg1 = (std::vector< long long > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::vector< long long >::iterator result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_long_long_std__allocatorT_long_long_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< long long > *","begin", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< long long > * >(argp1);
  result = (arg1)->begin();
  vresult = SWIG_NewPointerObj(swig::make_nonconst_iterator(static_cast< const std::vector< long long >::iterator & >(result),
      self),
    swig::Iterator::descriptor(),SWIG_POINTER_OWN);
  return vresult;
fail:
  return Qnil;
}

#capacity(*args) ⇒ Object

call-seq:

capacity -> std::vector< long long >::size_type

Reserved capacity of the Integer_Vector.


11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263
11264
# File 'ext/Tensorflow_wrap.cxx', line 11243

SWIGINTERN VALUE
_wrap_Integer_Vector_capacity(int argc, VALUE *argv, VALUE self) {
  std::vector< long long > *arg1 = (std::vector< long long > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::vector< long long >::size_type result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_long_long_std__allocatorT_long_long_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< long long > const *","capacity", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< long long > * >(argp1);
  result = ((std::vector< long long > const *)arg1)->capacity();
  vresult = SWIG_From_size_t(static_cast< size_t >(result));
  return vresult;
fail:
  return Qnil;
}

#clear(*args) ⇒ Object

call-seq:

clear

Clear Integer_Vector contents.


10400
10401
10402
10403
10404
10405
10406
10407
10408
10409
10410
10411
10412
10413
10414
10415
10416
10417
10418
# File 'ext/Tensorflow_wrap.cxx', line 10400

SWIGINTERN VALUE
_wrap_Integer_Vector_clear(int argc, VALUE *argv, VALUE self) {
  std::vector< long long > *arg1 = (std::vector< long long > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_long_long_std__allocatorT_long_long_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< long long > *","clear", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< long long > * >(argp1);
  (arg1)->clear();
  return Qnil;
fail:
  return Qnil;
}

#delete_at(*args) ⇒ Object

call-seq:

delete_at(i) -> VALUE

Delete an element at a certain index.


9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
# File 'ext/Tensorflow_wrap.cxx', line 9395

SWIGINTERN VALUE
_wrap_Integer_Vector_delete_at(int argc, VALUE *argv, VALUE self) {
  std::vector< long long > *arg1 = (std::vector< long long > *) 0 ;
  std::vector< long long >::difference_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  VALUE result;
  VALUE vresult = Qnil;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_long_long_std__allocatorT_long_long_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< long long > *","delete_at", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< long long > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< long long >::difference_type","delete_at", 2, argv[0] ));
  } 
  arg2 = static_cast< std::vector< long long >::difference_type >(val2);
  result = (VALUE)std_vector_Sl_long_SS_long_Sg__delete_at(arg1,arg2);
  vresult = result;
  return vresult;
fail:
  return Qnil;
}

#dup(*args) ⇒ Object

call-seq:

dup -> Integer_Vector

Create a duplicate of the class and unfreeze it if needed.


9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
# File 'ext/Tensorflow_wrap.cxx', line 9108

SWIGINTERN VALUE
_wrap_Integer_Vector_dup(int argc, VALUE *argv, VALUE self) {
  std::vector< long long > *arg1 = (std::vector< long long > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::vector< long long,std::allocator< long long > > *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_long_long_std__allocatorT_long_long_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< long long > *","dup", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< long long > * >(argp1);
  result = (std::vector< long long,std::allocator< long long > > *)std_vector_Sl_long_SS_long_Sg__dup(arg1);
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_long_long_std__allocatorT_long_long_t_t, SWIG_POINTER_OWN |  0 );
  return vresult;
fail:
  return Qnil;
}

#each(*args) ⇒ Object

call-seq:

each -> Integer_Vector

Iterate thru each element in the Integer_Vector. A block must be provided.


9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
# File 'ext/Tensorflow_wrap.cxx', line 9295

SWIGINTERN VALUE
_wrap_Integer_Vector_each(int argc, VALUE *argv, VALUE self) {
  std::vector< long long > *arg1 = (std::vector< long long > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::vector< long long,std::allocator< long long > > *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_long_long_std__allocatorT_long_long_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< long long > *","each", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< long long > * >(argp1);
  result = (std::vector< long long,std::allocator< long long > > *)std_vector_Sl_long_SS_long_Sg__each(arg1);
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_long_long_std__allocatorT_long_long_t_t, 0 |  0 );
  return vresult;
fail:
  return Qnil;
}

#empty?(*args) ⇒ Boolean

call-seq:

empty? -> bool

Check if the Integer_Vector is empty or not.


10162
10163
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
# File 'ext/Tensorflow_wrap.cxx', line 10162

SWIGINTERN VALUE
_wrap_Integer_Vector_emptyq___(int argc, VALUE *argv, VALUE self) {
  std::vector< long long > *arg1 = (std::vector< long long > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_long_long_std__allocatorT_long_long_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< long long > const *","empty", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< long long > * >(argp1);
  result = (bool)((std::vector< long long > const *)arg1)->empty();
  vresult = SWIG_From_bool(static_cast< bool >(result));
  return vresult;
fail:
  return Qnil;
}

#end(*args) ⇒ Object

call-seq:

end -> std::vector< long long >::iterator

Return an iterator to past the end of the Integer_Vector.


10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
# File 'ext/Tensorflow_wrap.cxx', line 10295

SWIGINTERN VALUE
_wrap_Integer_Vector_end(int argc, VALUE *argv, VALUE self) {
  std::vector< long long > *arg1 = (std::vector< long long > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::vector< long long >::iterator result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_long_long_std__allocatorT_long_long_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< long long > *","end", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< long long > * >(argp1);
  result = (arg1)->end();
  vresult = SWIG_NewPointerObj(swig::make_nonconst_iterator(static_cast< const std::vector< long long >::iterator & >(result),
      self),
    swig::Iterator::descriptor(),SWIG_POINTER_OWN);
  return vresult;
fail:
  return Qnil;
}

#erase(*args, self) ⇒ Object

call-seq:

erase(pos) -> std::vector< long long >::iterator
erase(first, last) -> std::vector< long long >::iterator

Delete a portion of the Integer_Vector.


10611
10612
10613
10614
10615
10616
10617
10618
10619
10620
10621
10622
10623
10624
10625
10626
10627
10628
10629
10630
10631
10632
10633
10634
10635
10636
10637
10638
10639
10640
10641
10642
10643
10644
10645
10646
10647
10648
10649
10650
10651
10652
10653
10654
10655
10656
10657
10658
10659
10660
10661
10662
10663
# File 'ext/Tensorflow_wrap.cxx', line 10611

SWIGINTERN VALUE _wrap_Integer_Vector_erase(int nargs, VALUE *args, VALUE self) {
  int argc;
  VALUE argv[4];
  int ii;
  
  argc = nargs + 1;
  argv[0] = self;
  if (argc > 4) SWIG_fail;
  for (ii = 1; (ii < argc); ++ii) {
    argv[ii] = args[ii-1];
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< long long,std::allocator< long long > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::ConstIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), 
        swig::Iterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::Iterator_T<std::vector< long long >::iterator > *>(iter) != 0));
      if (_v) {
        return _wrap_Integer_Vector_erase__SWIG_0(nargs, args, self);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< long long,std::allocator< long long > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::ConstIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), 
        swig::Iterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::Iterator_T<std::vector< long long >::iterator > *>(iter) != 0));
      if (_v) {
        swig::ConstIterator *iter = 0;
        int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), 
          swig::Iterator::descriptor(), 0);
        _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::Iterator_T<std::vector< long long >::iterator > *>(iter) != 0));
        if (_v) {
          return _wrap_Integer_Vector_erase__SWIG_1(nargs, args, self);
        }
      }
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 4, "erase", 
    "    std::vector< long long >::iterator erase(std::vector< long long >::iterator pos)\n"
    "    std::vector< long long >::iterator erase(std::vector< long long >::iterator first, std::vector< long long >::iterator last)\n");
  
  return Qnil;
}

#front(*args) ⇒ Object

call-seq:

front -> std::vector< long long >::value_type const &

Return the first element in Integer_Vector.


10782
10783
10784
10785
10786
10787
10788
10789
10790
10791
10792
10793
10794
10795
10796
10797
10798
10799
10800
10801
10802
10803
# File 'ext/Tensorflow_wrap.cxx', line 10782

SWIGINTERN VALUE
_wrap_Integer_Vector_front(int argc, VALUE *argv, VALUE self) {
  std::vector< long long > *arg1 = (std::vector< long long > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::vector< long long >::value_type *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_long_long_std__allocatorT_long_long_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< long long > const *","front", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< long long > * >(argp1);
  result = (std::vector< long long >::value_type *) &((std::vector< long long > const *)arg1)->front();
  vresult = SWIG_From_long_SS_long(static_cast< long long >(*result));
  return vresult;
fail:
  return Qnil;
}

#get_allocator(*args) ⇒ Object


10421
10422
10423
10424
10425
10426
10427
10428
10429
10430
10431
10432
10433
10434
10435
10436
10437
10438
10439
10440
10441
10442
# File 'ext/Tensorflow_wrap.cxx', line 10421

SWIGINTERN VALUE
_wrap_Integer_Vector_get_allocator(int argc, VALUE *argv, VALUE self) {
  std::vector< long long > *arg1 = (std::vector< long long > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  SwigValueWrapper< std::allocator< long long > > result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_long_long_std__allocatorT_long_long_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< long long > const *","get_allocator", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< long long > * >(argp1);
  result = ((std::vector< long long > const *)arg1)->get_allocator();
  vresult = SWIG_NewPointerObj((new std::vector< long long >::allocator_type(static_cast< const std::vector< long long >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_long_long_t, SWIG_POINTER_OWN |  0 );
  return vresult;
fail:
  return Qnil;
}

#insert(*args, self) ⇒ Object

call-seq:

insert(pos, argc) -> Integer_Vector
insert(pos, x) -> std::vector< long long >::iterator
insert(pos, n, x)

Insert one or more new elements in the Integer_Vector.


11105
11106
11107
11108
11109
11110
11111
11112
11113
11114
11115
11116
11117
11118
11119
11120
11121
11122
11123
11124
11125
11126
11127
11128
11129
11130
11131
11132
11133
11134
11135
11136
11137
11138
11139
11140
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171
11172
11173
11174
11175
11176
11177
11178
11179
11180
11181
11182
11183
11184
11185
11186
11187
11188
11189
11190
11191
11192
11193
# File 'ext/Tensorflow_wrap.cxx', line 11105

SWIGINTERN VALUE _wrap_Integer_Vector_insert(int nargs, VALUE *args, VALUE self) {
  int argc;
  VALUE argv[5];
  int ii;
  
  argc = nargs + 1;
  argv[0] = self;
  if (argc > 5) SWIG_fail;
  for (ii = 1; (ii < argc); ++ii) {
    argv[ii] = args[ii-1];
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< long long,std::allocator< long long > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::ConstIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), 
        swig::Iterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::Iterator_T<std::vector< long long >::iterator > *>(iter) != 0));
      if (_v) {
        {
          int res = SWIG_AsVal_long_SS_long(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_Integer_Vector_insert__SWIG_1(nargs, args, self);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< long long,std::allocator< long long > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          if (argc <= 3) {
            return _wrap_Integer_Vector_insert__SWIG_0(nargs, args, self);
          }
          return _wrap_Integer_Vector_insert__SWIG_0(nargs, args, self);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< long long,std::allocator< long long > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::ConstIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), 
        swig::Iterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::Iterator_T<std::vector< long long >::iterator > *>(iter) != 0));
      if (_v) {
        {
          int res = SWIG_AsVal_size_t(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_long_SS_long(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_Integer_Vector_insert__SWIG_2(nargs, args, self);
          }
        }
      }
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 5, "insert", 
    "    std::vector< long long,std::allocator< long long > > insert(std::vector< long long >::difference_type pos, int argc, VALUE *argv, ...)\n"
    "    std::vector< long long >::iterator insert(std::vector< long long >::iterator pos, std::vector< long long >::value_type const &x)\n"
    "    void insert(std::vector< long long >::iterator pos, std::vector< long long >::size_type n, std::vector< long long >::value_type const &x)\n");
  
  return Qnil;
}

#inspect(*args) ⇒ Object

call-seq:

inspect -> VALUE

Inspect class and its contents.


9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
# File 'ext/Tensorflow_wrap.cxx', line 9141

SWIGINTERN VALUE
_wrap_Integer_Vector_inspect(int argc, VALUE *argv, VALUE self) {
  std::vector< long long > *arg1 = (std::vector< long long > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  VALUE result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_long_long_std__allocatorT_long_long_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< long long > *","inspect", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< long long > * >(argp1);
  result = (VALUE)std_vector_Sl_long_SS_long_Sg__inspect(arg1);
  vresult = result;
  return vresult;
fail:
  return Qnil;
}

#pop(*args) ⇒ Object

call-seq:

pop -> VALUE

Remove and return element at the end of the Integer_Vector.


9885
9886
9887
9888
9889
9890
9891
9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
# File 'ext/Tensorflow_wrap.cxx', line 9885

SWIGINTERN VALUE
_wrap_Integer_Vector_pop(int argc, VALUE *argv, VALUE self) {
  std::vector< long long > *arg1 = (std::vector< long long > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  VALUE result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_long_long_std__allocatorT_long_long_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< long long > *","pop", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< long long > * >(argp1);
  result = (VALUE)std_vector_Sl_long_SS_long_Sg__pop(arg1);
  vresult = result;
  return vresult;
fail:
  return Qnil;
}

#push(*args) ⇒ Object Also known as: <<

call-seq:

push(e) -> std::vector< long long >::value_type const

Add an element at the end of the Integer_Vector.


9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
9942
9943
9944
9945
9946
9947
9948
9949
# File 'ext/Tensorflow_wrap.cxx', line 9918

SWIGINTERN VALUE
_wrap_Integer_Vector_push(int argc, VALUE *argv, VALUE self) {
  std::vector< long long > *arg1 = (std::vector< long long > *) 0 ;
  std::vector< long long >::value_type *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::vector< long long >::value_type temp2 ;
  long long val2 ;
  int ecode2 = 0 ;
  std::vector< long long >::value_type result;
  VALUE vresult = Qnil;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_long_long_std__allocatorT_long_long_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< long long > *","push", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< long long > * >(argp1);
  ecode2 = SWIG_AsVal_long_SS_long(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< long long >::value_type","push", 2, argv[0] ));
  } 
  temp2 = static_cast< std::vector< long long >::value_type >(val2);
  arg2 = &temp2;
  result = (std::vector< long long >::value_type)std_vector_Sl_long_SS_long_Sg__push(arg1,(long long const &)*arg2);
  vresult = SWIG_From_long_SS_long(static_cast< long long >(result));
  return vresult;
fail:
  return Qnil;
}

#rbegin(*args) ⇒ Object

call-seq:

rbegin -> std::vector< long long >::reverse_iterator

Return a reverse iterator to the beginning (the end) of the Integer_Vector.


10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350
10351
10352
10353
# File 'ext/Tensorflow_wrap.cxx', line 10330

SWIGINTERN VALUE
_wrap_Integer_Vector_rbegin(int argc, VALUE *argv, VALUE self) {
  std::vector< long long > *arg1 = (std::vector< long long > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::vector< long long >::reverse_iterator result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_long_long_std__allocatorT_long_long_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< long long > *","rbegin", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< long long > * >(argp1);
  result = (arg1)->rbegin();
  vresult = SWIG_NewPointerObj(swig::make_nonconst_iterator(static_cast< const std::vector< long long >::reverse_iterator & >(result),
      self),
    swig::Iterator::descriptor(),SWIG_POINTER_OWN);
  return vresult;
fail:
  return Qnil;
}

#reject(*args) ⇒ Object

call-seq:

reject -> Integer_Vector

Iterate thru each element in the Integer_Vector and reject those that fail a condition returning a new Integer_Vector. A block must be provided.


9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981
9982
# File 'ext/Tensorflow_wrap.cxx', line 9961

SWIGINTERN VALUE
_wrap_Integer_Vector_reject(int argc, VALUE *argv, VALUE self) {
  std::vector< long long > *arg1 = (std::vector< long long > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::vector< long long,std::allocator< long long > > *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_long_long_std__allocatorT_long_long_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< long long > *","reject", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< long long > * >(argp1);
  result = (std::vector< long long,std::allocator< long long > > *)std_vector_Sl_long_SS_long_Sg__reject(arg1);
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_long_long_std__allocatorT_long_long_t_t, SWIG_POINTER_OWN |  0 );
  return vresult;
fail:
  return Qnil;
}

#reject!(*args) ⇒ Object Also known as: delete_if

call-seq:

reject! -> Integer_Vector

Iterate thru each element in the Integer_Vector and reject those that fail a condition. A block must be provided. Integer_Vector is modified in place.


9852
9853
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
9864
9865
9866
9867
9868
9869
9870
9871
9872
9873
# File 'ext/Tensorflow_wrap.cxx', line 9852

SWIGINTERN VALUE
_wrap_Integer_Vector_rejectN___(int argc, VALUE *argv, VALUE self) {
  std::vector< long long > *arg1 = (std::vector< long long > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::vector< long long,std::allocator< long long > > *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_long_long_std__allocatorT_long_long_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< long long > *","reject_bang", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< long long > * >(argp1);
  result = (std::vector< long long,std::allocator< long long > > *)std_vector_Sl_long_SS_long_Sg__reject_bang(arg1);
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_long_long_std__allocatorT_long_long_t_t, 0 |  0 );
  return vresult;
fail:
  return Qnil;
}

#rend(*args) ⇒ Object

call-seq:

rend -> std::vector< long long >::reverse_iterator

Return a reverse iterator to past the end (past the beginning) of the Integer_Vector.


10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386
10387
10388
# File 'ext/Tensorflow_wrap.cxx', line 10365

SWIGINTERN VALUE
_wrap_Integer_Vector_rend(int argc, VALUE *argv, VALUE self) {
  std::vector< long long > *arg1 = (std::vector< long long > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::vector< long long >::reverse_iterator result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_long_long_std__allocatorT_long_long_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< long long > *","rend", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< long long > * >(argp1);
  result = (arg1)->rend();
  vresult = SWIG_NewPointerObj(swig::make_nonconst_iterator(static_cast< const std::vector< long long >::reverse_iterator & >(result),
      self),
    swig::Iterator::descriptor(),SWIG_POINTER_OWN);
  return vresult;
fail:
  return Qnil;
}

#reserve(*args) ⇒ Object

call-seq:

reserve(n)

Reserve memory in the Integer_Vector for a number of elements.


11205
11206
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217
11218
11219
11220
11221
11222
11223
11224
11225
11226
11227
11228
11229
11230
11231
# File 'ext/Tensorflow_wrap.cxx', line 11205

SWIGINTERN VALUE
_wrap_Integer_Vector_reserve(int argc, VALUE *argv, VALUE self) {
  std::vector< long long > *arg1 = (std::vector< long long > *) 0 ;
  std::vector< long long >::size_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_long_long_std__allocatorT_long_long_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< long long > *","reserve", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< long long > * >(argp1);
  ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< long long >::size_type","reserve", 2, argv[0] ));
  } 
  arg2 = static_cast< std::vector< long long >::size_type >(val2);
  (arg1)->reserve(arg2);
  return Qnil;
fail:
  return Qnil;
}

#resize(*args, self) ⇒ Object

call-seq:

resize(new_size)
resize(new_size, x)

Resize the size of the Integer_Vector.


10936
10937
10938
10939
10940
10941
10942
10943
10944
10945
10946
10947
10948
10949
10950
10951
10952
10953
10954
10955
10956
10957
10958
10959
10960
10961
10962
10963
10964
10965
10966
10967
10968
10969
10970
10971
10972
10973
10974
10975
10976
10977
10978
10979
10980
10981
10982
10983
10984
10985
10986
10987
10988
# File 'ext/Tensorflow_wrap.cxx', line 10936

SWIGINTERN VALUE _wrap_Integer_Vector_resize(int nargs, VALUE *args, VALUE self) {
  int argc;
  VALUE argv[4];
  int ii;
  
  argc = nargs + 1;
  argv[0] = self;
  if (argc > 4) SWIG_fail;
  for (ii = 1; (ii < argc); ++ii) {
    argv[ii] = args[ii-1];
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< long long,std::allocator< long long > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_size_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_Integer_Vector_resize__SWIG_0(nargs, args, self);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< long long,std::allocator< long long > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_size_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_long_SS_long(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_Integer_Vector_resize__SWIG_1(nargs, args, self);
        }
      }
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 4, "Integer_Vector.resize", 
    "    void Integer_Vector.resize(std::vector< long long >::size_type new_size)\n"
    "    void Integer_Vector.resize(std::vector< long long >::size_type new_size, std::vector< long long >::value_type const &x)\n");
  
  return Qnil;
}

#select(*args) ⇒ Object

call-seq:

select -> Integer_Vector

Iterate thru each element in the Integer_Vector and select those that match a condition. A block must be provided.


9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
# File 'ext/Tensorflow_wrap.cxx', line 9362

SWIGINTERN VALUE
_wrap_Integer_Vector_select(int argc, VALUE *argv, VALUE self) {
  std::vector< long long > *arg1 = (std::vector< long long > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::vector< long long,std::allocator< long long > > *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_long_long_std__allocatorT_long_long_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< long long > *","select", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< long long > * >(argp1);
  result = (std::vector< long long,std::allocator< long long > > *)std_vector_Sl_long_SS_long_Sg__select(arg1);
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_long_long_std__allocatorT_long_long_t_t, SWIG_POINTER_OWN |  0 );
  return vresult;
fail:
  return Qnil;
}

#shift(*args) ⇒ Object

call-seq:

shift -> VALUE

Remove and return element at the beginning of the Integer_Vector.


9994
9995
9996
9997
9998
9999
10000
10001
10002
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014
10015
# File 'ext/Tensorflow_wrap.cxx', line 9994

SWIGINTERN VALUE
_wrap_Integer_Vector_shift(int argc, VALUE *argv, VALUE self) {
  std::vector< long long > *arg1 = (std::vector< long long > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  VALUE result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_long_long_std__allocatorT_long_long_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< long long > *","shift", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< long long > * >(argp1);
  result = (VALUE)std_vector_Sl_long_SS_long_Sg__shift(arg1);
  vresult = result;
  return vresult;
fail:
  return Qnil;
}

#size(*args) ⇒ Object

call-seq:

size -> std::vector< long long >::size_type

Size or Length of the Integer_Vector.


10195
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215
10216
# File 'ext/Tensorflow_wrap.cxx', line 10195

SWIGINTERN VALUE
_wrap_Integer_Vector_size(int argc, VALUE *argv, VALUE self) {
  std::vector< long long > *arg1 = (std::vector< long long > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::vector< long long >::size_type result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_long_long_std__allocatorT_long_long_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< long long > const *","size", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< long long > * >(argp1);
  result = ((std::vector< long long > const *)arg1)->size();
  vresult = SWIG_From_size_t(static_cast< size_t >(result));
  return vresult;
fail:
  return Qnil;
}

#slice(*args) ⇒ Object

call-seq:

slice(i, length) -> VALUE

Return a slice (portion of) the Integer_Vector.


9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
# File 'ext/Tensorflow_wrap.cxx', line 9240

SWIGINTERN VALUE
_wrap_Integer_Vector_slice(int argc, VALUE *argv, VALUE self) {
  std::vector< long long > *arg1 = (std::vector< long long > *) 0 ;
  std::vector< long long >::difference_type arg2 ;
  std::vector< long long >::difference_type arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  VALUE result;
  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_std__vectorT_long_long_std__allocatorT_long_long_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< long long > *","slice", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< long long > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< long long >::difference_type","slice", 2, argv[0] ));
  } 
  arg2 = static_cast< std::vector< long long >::difference_type >(val2);
  ecode3 = SWIG_AsVal_ptrdiff_t(argv[1], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "std::vector< long long >::difference_type","slice", 3, argv[1] ));
  } 
  arg3 = static_cast< std::vector< long long >::difference_type >(val3);
  try {
    result = (VALUE)std_vector_Sl_long_SS_long_Sg__slice(arg1,arg2,arg3);
  }
  catch(std::invalid_argument &_e) {
    SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
  }
  
  vresult = result;
  return vresult;
fail:
  return Qnil;
}

#swap(*args) ⇒ Object


10219
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
10236
10237
10238
10239
10240
10241
10242
10243
10244
10245
10246
10247
10248
# File 'ext/Tensorflow_wrap.cxx', line 10219

SWIGINTERN VALUE
_wrap_Integer_Vector_swap(int argc, VALUE *argv, VALUE self) {
  std::vector< long long > *arg1 = (std::vector< long long > *) 0 ;
  std::vector< long long > *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_long_long_std__allocatorT_long_long_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< long long > *","swap", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< long long > * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_std__vectorT_long_long_std__allocatorT_long_long_t_t,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::vector< long long > &","swap", 2, argv[0] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< long long > &","swap", 2, argv[0])); 
  }
  arg2 = reinterpret_cast< std::vector< long long > * >(argp2);
  (arg1)->swap(*arg2);
  return Qnil;
fail:
  return Qnil;
}

#to_a(*args) ⇒ Object

call-seq:

to_a -> VALUE

Convert Integer_Vector to an Array.


9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
# File 'ext/Tensorflow_wrap.cxx', line 9174

SWIGINTERN VALUE
_wrap_Integer_Vector_to_a(int argc, VALUE *argv, VALUE self) {
  std::vector< long long > *arg1 = (std::vector< long long > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  VALUE result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_long_long_std__allocatorT_long_long_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< long long > *","to_a", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< long long > * >(argp1);
  result = (VALUE)std_vector_Sl_long_SS_long_Sg__to_a(arg1);
  vresult = result;
  return vresult;
fail:
  return Qnil;
}

#to_s(*args) ⇒ Object

call-seq:

to_s -> VALUE

Convert class to a String representation.


9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
# File 'ext/Tensorflow_wrap.cxx', line 9207

SWIGINTERN VALUE
_wrap_Integer_Vector_to_s(int argc, VALUE *argv, VALUE self) {
  std::vector< long long > *arg1 = (std::vector< long long > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  VALUE result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_long_long_std__allocatorT_long_long_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< long long > *","to_s", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< long long > * >(argp1);
  result = (VALUE)std_vector_Sl_long_SS_long_Sg__to_s(arg1);
  vresult = result;
  return vresult;
fail:
  return Qnil;
}

#unshift(*args) ⇒ Object

call-seq:

unshift(argc) -> Integer_Vector

Add one or more elements at the beginning of the Integer_Vector.


10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
# File 'ext/Tensorflow_wrap.cxx', line 10077

SWIGINTERN VALUE
_wrap_Integer_Vector_unshift(int argc, VALUE *argv, VALUE self) {
  std::vector< long long > *arg1 = (std::vector< long long > *) 0 ;
  int arg2 ;
  VALUE *arg3 = (VALUE *) 0 ;
  void *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::vector< long long,std::allocator< long long > > *result = 0 ;
  VALUE vresult = Qnil;
  
  if (argc < 1) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_std__vectorT_long_long_std__allocatorT_long_long_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< long long > *","unshift", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< long long > * >(argp1);
  {
    arg2 = argc;
    arg3 = argv;
  }
  result = (std::vector< long long,std::allocator< long long > > *)std_vector_Sl_long_SS_long_Sg__unshift(arg1,arg2,arg3,arg4);
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_long_long_std__allocatorT_long_long_t_t, 0 |  0 );
  return vresult;
fail:
  return Qnil;
}