Class: Tensorflow::Tensor_Vector

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

Instance Method Summary collapse

Constructor Details

#initialize(*args, self) ⇒ Object


12887
12888
12889
12890
12891
12892
12893
12894
12895
12896
12897
12898
12899
12900
12901
12902
12903
12904
12905
12906
12907
12908
12909
12910
12911
12912
12913
12914
12915
12916
12917
12918
12919
12920
12921
12922
12923
12924
12925
12926
12927
12928
12929
12930
12931
12932
12933
12934
12935
12936
12937
12938
12939
12940
12941
12942
# File 'ext/Tensorflow_wrap.cxx', line 12887

SWIGINTERN VALUE _wrap_new_Tensor_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_Tensor_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_Tensor_Vector__SWIG_2(nargs, args, self);
    }
  }
  if (argc == 1) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< TF_Tensor*,std::allocator< TF_Tensor * > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_Tensor_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) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_TF_Tensor, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_new_Tensor_Vector__SWIG_3(nargs, args, self);
      }
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 2, "Tensor_Vector.new", 
    "    Tensor_Vector.new()\n"
    "    Tensor_Vector.new(std::vector< TF_Tensor * > const &)\n"
    "    Tensor_Vector.new(std::vector< TF_Tensor * >::size_type size)\n"
    "    Tensor_Vector.new(std::vector< TF_Tensor * >::size_type size, std::vector< TF_Tensor * >::value_type value)\n");
  
  return Qnil;
}

Instance Method Details

#[](*args, self) ⇒ Object

call-seq:

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

Element accessor/slicing.


11765
11766
11767
11768
11769
11770
11771
11772
11773
11774
11775
11776
11777
11778
11779
11780
11781
11782
11783
11784
11785
11786
11787
11788
11789
11790
11791
11792
11793
11794
11795
11796
11797
11798
11799
11800
11801
11802
11803
11804
11805
11806
11807
11808
11809
11810
11811
11812
11813
11814
11815
11816
11817
11818
11819
11820
11821
11822
11823
11824
11825
11826
11827
11828
11829
# File 'ext/Tensorflow_wrap.cxx', line 11765

SWIGINTERN VALUE _wrap_Tensor_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< TF_Tensor*,std::allocator< TF_Tensor * > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_Tensor_Vector___getitem____SWIG_1(nargs, args, self);
      }
    }
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< TF_Tensor*,std::allocator< TF_Tensor * > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      _v = (argv[1] != 0);
      if (_v) {
        return _wrap_Tensor_Vector___getitem____SWIG_2(nargs, args, self);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< TF_Tensor*,std::allocator< TF_Tensor * > >**)(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_Tensor_Vector___getitem____SWIG_0(nargs, args, self);
        }
      }
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 4, "__getitem__", 
    "    VALUE __getitem__(std::vector< TF_Tensor * >::difference_type i, std::vector< TF_Tensor * >::difference_type length)\n"
    "    VALUE __getitem__(std::vector< TF_Tensor * >::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.


11954
11955
11956
11957
11958
11959
11960
11961
11962
11963
11964
11965
11966
11967
11968
11969
11970
11971
11972
11973
11974
11975
11976
11977
11978
11979
11980
11981
11982
11983
11984
11985
11986
11987
11988
11989
11990
11991
11992
11993
11994
11995
11996
11997
11998
11999
12000
12001
12002
12003
12004
12005
12006
12007
12008
12009
12010
12011
12012
12013
12014
12015
# File 'ext/Tensorflow_wrap.cxx', line 11954

SWIGINTERN VALUE _wrap_Tensor_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< TF_Tensor*,std::allocator< TF_Tensor * > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_TF_Tensor, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_Tensor_Vector___setitem____SWIG_0(nargs, args, self);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< TF_Tensor*,std::allocator< TF_Tensor * > >**)(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< TF_Tensor*,std::allocator< TF_Tensor * > >**)(0));
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_Tensor_Vector___setitem____SWIG_1(nargs, args, self);
          }
        }
      }
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 5, "__setitem__", 
    "    VALUE __setitem__(std::vector< TF_Tensor * >::difference_type i, std::vector< TF_Tensor * >::value_type const &x)\n"
    "    VALUE __setitem__(std::vector< TF_Tensor * >::difference_type i, std::vector< TF_Tensor * >::difference_type length, std::vector< TF_Tensor *,std::allocator< TF_Tensor * > > const &v)\n");
  
  return Qnil;
}

#__delete2__(*args) ⇒ Object


11495
11496
11497
11498
11499
11500
11501
11502
11503
11504
11505
11506
11507
11508
11509
11510
11511
11512
11513
11514
11515
11516
11517
11518
11519
11520
11521
11522
11523
11524
11525
11526
# File 'ext/Tensorflow_wrap.cxx', line 11495

SWIGINTERN VALUE
_wrap_Tensor_Vector___delete2__(int argc, VALUE *argv, VALUE self) {
  std::vector< TF_Tensor * > *arg1 = (std::vector< TF_Tensor * > *) 0 ;
  std::vector< TF_Tensor * >::value_type *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  std::vector< TF_Tensor * >::value_type temp2 ;
  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_TF_Tensor_p_std__allocatorT_TF_Tensor_p_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< TF_Tensor * > *","__delete2__", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< TF_Tensor * > * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_TF_Tensor, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::vector< TF_Tensor * >::value_type","__delete2__", 2, argv[0] )); 
  }
  temp2 = reinterpret_cast< std::vector< TF_Tensor * >::value_type >(argp2);
  arg2 = reinterpret_cast< std::vector< TF_Tensor * >::value_type * >(&temp2);
  result = (VALUE)std_vector_Sl_TF_Tensor_Sm__Sg____delete2__(arg1,(TF_Tensor *const &)*arg2);
  vresult = result;
  return vresult;
fail:
  return Qnil;
}

#assign(*args) ⇒ Object

call-seq:

assign(n, x)

Assign a new Tensor_Vector or portion of it.


13020
13021
13022
13023
13024
13025
13026
13027
13028
13029
13030
13031
13032
13033
13034
13035
13036
13037
13038
13039
13040
13041
13042
13043
13044
13045
13046
13047
13048
13049
13050
13051
13052
13053
13054
# File 'ext/Tensorflow_wrap.cxx', line 13020

SWIGINTERN VALUE
_wrap_Tensor_Vector_assign(int argc, VALUE *argv, VALUE self) {
  std::vector< TF_Tensor * > *arg1 = (std::vector< TF_Tensor * > *) 0 ;
  std::vector< TF_Tensor * >::size_type arg2 ;
  std::vector< TF_Tensor * >::value_type arg3 = (std::vector< TF_Tensor * >::value_type) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 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_TF_Tensor_p_std__allocatorT_TF_Tensor_p_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< TF_Tensor * > *","assign", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< TF_Tensor * > * >(argp1);
  ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< TF_Tensor * >::size_type","assign", 2, argv[0] ));
  } 
  arg2 = static_cast< std::vector< TF_Tensor * >::size_type >(val2);
  res3 = SWIG_ConvertPtr(argv[1], &argp3,SWIGTYPE_p_TF_Tensor, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::vector< TF_Tensor * >::value_type","assign", 3, argv[1] )); 
  }
  arg3 = reinterpret_cast< std::vector< TF_Tensor * >::value_type >(argp3);
  (arg1)->assign(arg2,arg3);
  return Qnil;
fail:
  return Qnil;
}

#at(*args) ⇒ Object

call-seq:

at(i) -> VALUE

Return element at a certain index.


11612
11613
11614
11615
11616
11617
11618
11619
11620
11621
11622
11623
11624
11625
11626
11627
11628
11629
11630
11631
11632
11633
11634
11635
11636
11637
11638
11639
11640
11641
# File 'ext/Tensorflow_wrap.cxx', line 11612

SWIGINTERN VALUE
_wrap_Tensor_Vector_at(int argc, VALUE *argv, VALUE self) {
  std::vector< TF_Tensor * > *arg1 = (std::vector< TF_Tensor * > *) 0 ;
  std::vector< TF_Tensor * >::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_TF_Tensor_p_std__allocatorT_TF_Tensor_p_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< TF_Tensor * > const *","at", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< TF_Tensor * > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< TF_Tensor * >::difference_type","at", 2, argv[0] ));
  } 
  arg2 = static_cast< std::vector< TF_Tensor * >::difference_type >(val2);
  result = (VALUE)std_vector_Sl_TF_Tensor_Sm__Sg__at((std::vector< TF_Tensor * > const *)arg1,arg2);
  vresult = result;
  return vresult;
fail:
  return Qnil;
}

#back(*args) ⇒ Object

call-seq:

back -> std::vector< TF_Tensor * >::value_type

Return the last element in Tensor_Vector.


12987
12988
12989
12990
12991
12992
12993
12994
12995
12996
12997
12998
12999
13000
13001
13002
13003
13004
13005
13006
13007
13008
# File 'ext/Tensorflow_wrap.cxx', line 12987

SWIGINTERN VALUE
_wrap_Tensor_Vector_back(int argc, VALUE *argv, VALUE self) {
  std::vector< TF_Tensor * > *arg1 = (std::vector< TF_Tensor * > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::vector< TF_Tensor * >::value_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_TF_Tensor_p_std__allocatorT_TF_Tensor_p_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< TF_Tensor * > const *","back", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< TF_Tensor * > * >(argp1);
  result = (std::vector< TF_Tensor * >::value_type)((std::vector< TF_Tensor * > const *)arg1)->back();
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TF_Tensor, 0 |  0 );
  return vresult;
fail:
  return Qnil;
}

#begin(*args) ⇒ Object

call-seq:

begin -> std::vector< TF_Tensor * >::iterator

Return an iterator to the beginning of the Tensor_Vector.


12435
12436
12437
12438
12439
12440
12441
12442
12443
12444
12445
12446
12447
12448
12449
12450
12451
12452
12453
12454
12455
12456
12457
12458
# File 'ext/Tensorflow_wrap.cxx', line 12435

SWIGINTERN VALUE
_wrap_Tensor_Vector_begin(int argc, VALUE *argv, VALUE self) {
  std::vector< TF_Tensor * > *arg1 = (std::vector< TF_Tensor * > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::vector< TF_Tensor * >::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_TF_Tensor_p_std__allocatorT_TF_Tensor_p_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< TF_Tensor * > *","begin", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< TF_Tensor * > * >(argp1);
  result = (arg1)->begin();
  vresult = SWIG_NewPointerObj(swig::make_nonconst_iterator(static_cast< const std::vector< TF_Tensor * >::iterator & >(result),
      self),
    swig::Iterator::descriptor(),SWIG_POINTER_OWN);
  return vresult;
fail:
  return Qnil;
}

#capacity(*args) ⇒ Object

call-seq:

capacity -> std::vector< TF_Tensor * >::size_type

Reserved capacity of the Tensor_Vector.


13404
13405
13406
13407
13408
13409
13410
13411
13412
13413
13414
13415
13416
13417
13418
13419
13420
13421
13422
13423
13424
13425
# File 'ext/Tensorflow_wrap.cxx', line 13404

SWIGINTERN VALUE
_wrap_Tensor_Vector_capacity(int argc, VALUE *argv, VALUE self) {
  std::vector< TF_Tensor * > *arg1 = (std::vector< TF_Tensor * > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::vector< TF_Tensor * >::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_TF_Tensor_p_std__allocatorT_TF_Tensor_p_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< TF_Tensor * > const *","capacity", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< TF_Tensor * > * >(argp1);
  result = ((std::vector< TF_Tensor * > 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 Tensor_Vector contents.


12575
12576
12577
12578
12579
12580
12581
12582
12583
12584
12585
12586
12587
12588
12589
12590
12591
12592
12593
# File 'ext/Tensorflow_wrap.cxx', line 12575

SWIGINTERN VALUE
_wrap_Tensor_Vector_clear(int argc, VALUE *argv, VALUE self) {
  std::vector< TF_Tensor * > *arg1 = (std::vector< TF_Tensor * > *) 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_TF_Tensor_p_std__allocatorT_TF_Tensor_p_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< TF_Tensor * > *","clear", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< TF_Tensor * > * >(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.


11571
11572
11573
11574
11575
11576
11577
11578
11579
11580
11581
11582
11583
11584
11585
11586
11587
11588
11589
11590
11591
11592
11593
11594
11595
11596
11597
11598
11599
11600
# File 'ext/Tensorflow_wrap.cxx', line 11571

SWIGINTERN VALUE
_wrap_Tensor_Vector_delete_at(int argc, VALUE *argv, VALUE self) {
  std::vector< TF_Tensor * > *arg1 = (std::vector< TF_Tensor * > *) 0 ;
  std::vector< TF_Tensor * >::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_TF_Tensor_p_std__allocatorT_TF_Tensor_p_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< TF_Tensor * > *","delete_at", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< TF_Tensor * > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< TF_Tensor * >::difference_type","delete_at", 2, argv[0] ));
  } 
  arg2 = static_cast< std::vector< TF_Tensor * >::difference_type >(val2);
  result = (VALUE)std_vector_Sl_TF_Tensor_Sm__Sg__delete_at(arg1,arg2);
  vresult = result;
  return vresult;
fail:
  return Qnil;
}

#dup(*args) ⇒ Object

call-seq:

dup -> Tensor_Vector

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


11284
11285
11286
11287
11288
11289
11290
11291
11292
11293
11294
11295
11296
11297
11298
11299
11300
11301
11302
11303
11304
11305
# File 'ext/Tensorflow_wrap.cxx', line 11284

SWIGINTERN VALUE
_wrap_Tensor_Vector_dup(int argc, VALUE *argv, VALUE self) {
  std::vector< TF_Tensor * > *arg1 = (std::vector< TF_Tensor * > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::vector< TF_Tensor *,std::allocator< TF_Tensor * > > *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_TF_Tensor_p_std__allocatorT_TF_Tensor_p_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< TF_Tensor * > *","dup", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< TF_Tensor * > * >(argp1);
  result = (std::vector< TF_Tensor *,std::allocator< TF_Tensor * > > *)std_vector_Sl_TF_Tensor_Sm__Sg__dup(arg1);
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_TF_Tensor_p_std__allocatorT_TF_Tensor_p_t_t, SWIG_POINTER_OWN |  0 );
  return vresult;
fail:
  return Qnil;
}

#each(*args) ⇒ Object

call-seq:

each -> Tensor_Vector

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


11471
11472
11473
11474
11475
11476
11477
11478
11479
11480
11481
11482
11483
11484
11485
11486
11487
11488
11489
11490
11491
11492
# File 'ext/Tensorflow_wrap.cxx', line 11471

SWIGINTERN VALUE
_wrap_Tensor_Vector_each(int argc, VALUE *argv, VALUE self) {
  std::vector< TF_Tensor * > *arg1 = (std::vector< TF_Tensor * > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::vector< TF_Tensor *,std::allocator< TF_Tensor * > > *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_TF_Tensor_p_std__allocatorT_TF_Tensor_p_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< TF_Tensor * > *","each", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< TF_Tensor * > * >(argp1);
  result = (std::vector< TF_Tensor *,std::allocator< TF_Tensor * > > *)std_vector_Sl_TF_Tensor_Sm__Sg__each(arg1);
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_TF_Tensor_p_std__allocatorT_TF_Tensor_p_t_t, 0 |  0 );
  return vresult;
fail:
  return Qnil;
}

#empty?(*args) ⇒ Boolean

call-seq:

empty? -> bool

Check if the Tensor_Vector is empty or not.

Returns:

  • (Boolean)

12337
12338
12339
12340
12341
12342
12343
12344
12345
12346
12347
12348
12349
12350
12351
12352
12353
12354
12355
12356
12357
12358
# File 'ext/Tensorflow_wrap.cxx', line 12337

SWIGINTERN VALUE
_wrap_Tensor_Vector_emptyq___(int argc, VALUE *argv, VALUE self) {
  std::vector< TF_Tensor * > *arg1 = (std::vector< TF_Tensor * > *) 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_TF_Tensor_p_std__allocatorT_TF_Tensor_p_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< TF_Tensor * > const *","empty", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< TF_Tensor * > * >(argp1);
  result = (bool)((std::vector< TF_Tensor * > const *)arg1)->empty();
  vresult = SWIG_From_bool(static_cast< bool >(result));
  return vresult;
fail:
  return Qnil;
}

#end(*args) ⇒ Object

call-seq:

end -> std::vector< TF_Tensor * >::iterator

Return an iterator to past the end of the Tensor_Vector.


12470
12471
12472
12473
12474
12475
12476
12477
12478
12479
12480
12481
12482
12483
12484
12485
12486
12487
12488
12489
12490
12491
12492
12493
# File 'ext/Tensorflow_wrap.cxx', line 12470

SWIGINTERN VALUE
_wrap_Tensor_Vector_end(int argc, VALUE *argv, VALUE self) {
  std::vector< TF_Tensor * > *arg1 = (std::vector< TF_Tensor * > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::vector< TF_Tensor * >::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_TF_Tensor_p_std__allocatorT_TF_Tensor_p_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< TF_Tensor * > *","end", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< TF_Tensor * > * >(argp1);
  result = (arg1)->end();
  vresult = SWIG_NewPointerObj(swig::make_nonconst_iterator(static_cast< const std::vector< TF_Tensor * >::iterator & >(result),
      self),
    swig::Iterator::descriptor(),SWIG_POINTER_OWN);
  return vresult;
fail:
  return Qnil;
}

#erase(*args, self) ⇒ Object

call-seq:

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

Delete a portion of the Tensor_Vector.


12786
12787
12788
12789
12790
12791
12792
12793
12794
12795
12796
12797
12798
12799
12800
12801
12802
12803
12804
12805
12806
12807
12808
12809
12810
12811
12812
12813
12814
12815
12816
12817
12818
12819
12820
12821
12822
12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
# File 'ext/Tensorflow_wrap.cxx', line 12786

SWIGINTERN VALUE _wrap_Tensor_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< TF_Tensor*,std::allocator< TF_Tensor * > >**)(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< TF_Tensor * >::iterator > *>(iter) != 0));
      if (_v) {
        return _wrap_Tensor_Vector_erase__SWIG_0(nargs, args, self);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< TF_Tensor*,std::allocator< TF_Tensor * > >**)(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< TF_Tensor * >::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< TF_Tensor * >::iterator > *>(iter) != 0));
        if (_v) {
          return _wrap_Tensor_Vector_erase__SWIG_1(nargs, args, self);
        }
      }
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 4, "erase", 
    "    std::vector< TF_Tensor * >::iterator erase(std::vector< TF_Tensor * >::iterator pos)\n"
    "    std::vector< TF_Tensor * >::iterator erase(std::vector< TF_Tensor * >::iterator first, std::vector< TF_Tensor * >::iterator last)\n");
  
  return Qnil;
}

#front(*args) ⇒ Object

call-seq:

front -> std::vector< TF_Tensor * >::value_type

Return the first element in Tensor_Vector.


12954
12955
12956
12957
12958
12959
12960
12961
12962
12963
12964
12965
12966
12967
12968
12969
12970
12971
12972
12973
12974
12975
# File 'ext/Tensorflow_wrap.cxx', line 12954

SWIGINTERN VALUE
_wrap_Tensor_Vector_front(int argc, VALUE *argv, VALUE self) {
  std::vector< TF_Tensor * > *arg1 = (std::vector< TF_Tensor * > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::vector< TF_Tensor * >::value_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_TF_Tensor_p_std__allocatorT_TF_Tensor_p_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< TF_Tensor * > const *","front", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< TF_Tensor * > * >(argp1);
  result = (std::vector< TF_Tensor * >::value_type)((std::vector< TF_Tensor * > const *)arg1)->front();
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TF_Tensor, 0 |  0 );
  return vresult;
fail:
  return Qnil;
}

#get_allocator(*args) ⇒ Object


12596
12597
12598
12599
12600
12601
12602
12603
12604
12605
12606
12607
12608
12609
12610
12611
12612
12613
12614
12615
12616
12617
# File 'ext/Tensorflow_wrap.cxx', line 12596

SWIGINTERN VALUE
_wrap_Tensor_Vector_get_allocator(int argc, VALUE *argv, VALUE self) {
  std::vector< TF_Tensor * > *arg1 = (std::vector< TF_Tensor * > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  SwigValueWrapper< std::allocator< TF_Tensor * > > 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_TF_Tensor_p_std__allocatorT_TF_Tensor_p_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< TF_Tensor * > const *","get_allocator", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< TF_Tensor * > * >(argp1);
  result = ((std::vector< TF_Tensor * > const *)arg1)->get_allocator();
  vresult = SWIG_NewPointerObj((new std::vector< TF_Tensor * >::allocator_type(static_cast< const std::vector< TF_Tensor * >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_TF_Tensor_p_t, SWIG_POINTER_OWN |  0 );
  return vresult;
fail:
  return Qnil;
}

#insert(*args, self) ⇒ Object

call-seq:

insert(pos, argc) -> Tensor_Vector
insert(pos, x) -> std::vector< TF_Tensor * >::iterator
insert(pos, n, x)

Insert one or more new elements in the Tensor_Vector.


13268
13269
13270
13271
13272
13273
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
13309
13310
13311
13312
13313
13314
13315
13316
13317
13318
13319
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
13345
13346
13347
13348
13349
13350
13351
13352
13353
13354
# File 'ext/Tensorflow_wrap.cxx', line 13268

SWIGINTERN VALUE _wrap_Tensor_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< TF_Tensor*,std::allocator< TF_Tensor * > >**)(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< TF_Tensor * >::iterator > *>(iter) != 0));
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_TF_Tensor, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_Tensor_Vector_insert__SWIG_1(nargs, args, self);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< TF_Tensor*,std::allocator< TF_Tensor * > >**)(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_Tensor_Vector_insert__SWIG_0(nargs, args, self);
          }
          return _wrap_Tensor_Vector_insert__SWIG_0(nargs, args, self);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< TF_Tensor*,std::allocator< TF_Tensor * > >**)(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< TF_Tensor * >::iterator > *>(iter) != 0));
      if (_v) {
        {
          int res = SWIG_AsVal_size_t(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_TF_Tensor, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_Tensor_Vector_insert__SWIG_2(nargs, args, self);
          }
        }
      }
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 5, "insert", 
    "    std::vector< TF_Tensor *,std::allocator< TF_Tensor * > > insert(std::vector< TF_Tensor * >::difference_type pos, int argc, VALUE *argv, ...)\n"
    "    std::vector< TF_Tensor * >::iterator insert(std::vector< TF_Tensor * >::iterator pos, std::vector< TF_Tensor * >::value_type x)\n"
    "    void insert(std::vector< TF_Tensor * >::iterator pos, std::vector< TF_Tensor * >::size_type n, std::vector< TF_Tensor * >::value_type x)\n");
  
  return Qnil;
}

#inspect(*args) ⇒ Object

call-seq:

inspect -> VALUE

Inspect class and its contents.


11317
11318
11319
11320
11321
11322
11323
11324
11325
11326
11327
11328
11329
11330
11331
11332
11333
11334
11335
11336
11337
11338
# File 'ext/Tensorflow_wrap.cxx', line 11317

SWIGINTERN VALUE
_wrap_Tensor_Vector_inspect(int argc, VALUE *argv, VALUE self) {
  std::vector< TF_Tensor * > *arg1 = (std::vector< TF_Tensor * > *) 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_TF_Tensor_p_std__allocatorT_TF_Tensor_p_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< TF_Tensor * > *","inspect", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< TF_Tensor * > * >(argp1);
  result = (VALUE)std_vector_Sl_TF_Tensor_Sm__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 Tensor_Vector.


12060
12061
12062
12063
12064
12065
12066
12067
12068
12069
12070
12071
12072
12073
12074
12075
12076
12077
12078
12079
12080
12081
# File 'ext/Tensorflow_wrap.cxx', line 12060

SWIGINTERN VALUE
_wrap_Tensor_Vector_pop(int argc, VALUE *argv, VALUE self) {
  std::vector< TF_Tensor * > *arg1 = (std::vector< TF_Tensor * > *) 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_TF_Tensor_p_std__allocatorT_TF_Tensor_p_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< TF_Tensor * > *","pop", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< TF_Tensor * > * >(argp1);
  result = (VALUE)std_vector_Sl_TF_Tensor_Sm__Sg__pop(arg1);
  vresult = result;
  return vresult;
fail:
  return Qnil;
}

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

call-seq:

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

Add an element at the end of the Tensor_Vector.


12093
12094
12095
12096
12097
12098
12099
12100
12101
12102
12103
12104
12105
12106
12107
12108
12109
12110
12111
12112
12113
12114
12115
12116
12117
12118
12119
12120
12121
12122
12123
12124
# File 'ext/Tensorflow_wrap.cxx', line 12093

SWIGINTERN VALUE
_wrap_Tensor_Vector_push(int argc, VALUE *argv, VALUE self) {
  std::vector< TF_Tensor * > *arg1 = (std::vector< TF_Tensor * > *) 0 ;
  std::vector< TF_Tensor * >::value_type *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  std::vector< TF_Tensor * >::value_type temp2 ;
  std::vector< TF_Tensor * >::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_TF_Tensor_p_std__allocatorT_TF_Tensor_p_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< TF_Tensor * > *","push", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< TF_Tensor * > * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_TF_Tensor, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::vector< TF_Tensor * >::value_type","push", 2, argv[0] )); 
  }
  temp2 = reinterpret_cast< std::vector< TF_Tensor * >::value_type >(argp2);
  arg2 = reinterpret_cast< std::vector< TF_Tensor * >::value_type * >(&temp2);
  result = (std::vector< TF_Tensor * >::value_type)std_vector_Sl_TF_Tensor_Sm__Sg__push(arg1,(TF_Tensor *const &)*arg2);
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TF_Tensor, 0 |  0 );
  return vresult;
fail:
  return Qnil;
}

#rbegin(*args) ⇒ Object

call-seq:

rbegin -> std::vector< TF_Tensor * >::reverse_iterator

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


12505
12506
12507
12508
12509
12510
12511
12512
12513
12514
12515
12516
12517
12518
12519
12520
12521
12522
12523
12524
12525
12526
12527
12528
# File 'ext/Tensorflow_wrap.cxx', line 12505

SWIGINTERN VALUE
_wrap_Tensor_Vector_rbegin(int argc, VALUE *argv, VALUE self) {
  std::vector< TF_Tensor * > *arg1 = (std::vector< TF_Tensor * > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::vector< TF_Tensor * >::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_TF_Tensor_p_std__allocatorT_TF_Tensor_p_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< TF_Tensor * > *","rbegin", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< TF_Tensor * > * >(argp1);
  result = (arg1)->rbegin();
  vresult = SWIG_NewPointerObj(swig::make_nonconst_iterator(static_cast< const std::vector< TF_Tensor * >::reverse_iterator & >(result),
      self),
    swig::Iterator::descriptor(),SWIG_POINTER_OWN);
  return vresult;
fail:
  return Qnil;
}

#reject(*args) ⇒ Object

call-seq:

reject -> Tensor_Vector

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


12136
12137
12138
12139
12140
12141
12142
12143
12144
12145
12146
12147
12148
12149
12150
12151
12152
12153
12154
12155
12156
12157
# File 'ext/Tensorflow_wrap.cxx', line 12136

SWIGINTERN VALUE
_wrap_Tensor_Vector_reject(int argc, VALUE *argv, VALUE self) {
  std::vector< TF_Tensor * > *arg1 = (std::vector< TF_Tensor * > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::vector< TF_Tensor *,std::allocator< TF_Tensor * > > *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_TF_Tensor_p_std__allocatorT_TF_Tensor_p_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< TF_Tensor * > *","reject", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< TF_Tensor * > * >(argp1);
  result = (std::vector< TF_Tensor *,std::allocator< TF_Tensor * > > *)std_vector_Sl_TF_Tensor_Sm__Sg__reject(arg1);
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_TF_Tensor_p_std__allocatorT_TF_Tensor_p_t_t, SWIG_POINTER_OWN |  0 );
  return vresult;
fail:
  return Qnil;
}

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

call-seq:

reject! -> Tensor_Vector

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


12027
12028
12029
12030
12031
12032
12033
12034
12035
12036
12037
12038
12039
12040
12041
12042
12043
12044
12045
12046
12047
12048
# File 'ext/Tensorflow_wrap.cxx', line 12027

SWIGINTERN VALUE
_wrap_Tensor_Vector_rejectN___(int argc, VALUE *argv, VALUE self) {
  std::vector< TF_Tensor * > *arg1 = (std::vector< TF_Tensor * > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::vector< TF_Tensor *,std::allocator< TF_Tensor * > > *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_TF_Tensor_p_std__allocatorT_TF_Tensor_p_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< TF_Tensor * > *","reject_bang", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< TF_Tensor * > * >(argp1);
  result = (std::vector< TF_Tensor *,std::allocator< TF_Tensor * > > *)std_vector_Sl_TF_Tensor_Sm__Sg__reject_bang(arg1);
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_TF_Tensor_p_std__allocatorT_TF_Tensor_p_t_t, 0 |  0 );
  return vresult;
fail:
  return Qnil;
}

#rend(*args) ⇒ Object

call-seq:

rend -> std::vector< TF_Tensor * >::reverse_iterator

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


12540
12541
12542
12543
12544
12545
12546
12547
12548
12549
12550
12551
12552
12553
12554
12555
12556
12557
12558
12559
12560
12561
12562
12563
# File 'ext/Tensorflow_wrap.cxx', line 12540

SWIGINTERN VALUE
_wrap_Tensor_Vector_rend(int argc, VALUE *argv, VALUE self) {
  std::vector< TF_Tensor * > *arg1 = (std::vector< TF_Tensor * > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::vector< TF_Tensor * >::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_TF_Tensor_p_std__allocatorT_TF_Tensor_p_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< TF_Tensor * > *","rend", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< TF_Tensor * > * >(argp1);
  result = (arg1)->rend();
  vresult = SWIG_NewPointerObj(swig::make_nonconst_iterator(static_cast< const std::vector< TF_Tensor * >::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 Tensor_Vector for a number of elements.


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
# File 'ext/Tensorflow_wrap.cxx', line 13366

SWIGINTERN VALUE
_wrap_Tensor_Vector_reserve(int argc, VALUE *argv, VALUE self) {
  std::vector< TF_Tensor * > *arg1 = (std::vector< TF_Tensor * > *) 0 ;
  std::vector< TF_Tensor * >::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_TF_Tensor_p_std__allocatorT_TF_Tensor_p_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< TF_Tensor * > *","reserve", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< TF_Tensor * > * >(argp1);
  ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< TF_Tensor * >::size_type","reserve", 2, argv[0] ));
  } 
  arg2 = static_cast< std::vector< TF_Tensor * >::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 Tensor_Vector.


13104
13105
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
# File 'ext/Tensorflow_wrap.cxx', line 13104

SWIGINTERN VALUE _wrap_Tensor_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< TF_Tensor*,std::allocator< TF_Tensor * > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_size_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_Tensor_Vector_resize__SWIG_0(nargs, args, self);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< TF_Tensor*,std::allocator< TF_Tensor * > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_size_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_TF_Tensor, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_Tensor_Vector_resize__SWIG_1(nargs, args, self);
        }
      }
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 4, "Tensor_Vector.resize", 
    "    void Tensor_Vector.resize(std::vector< TF_Tensor * >::size_type new_size)\n"
    "    void Tensor_Vector.resize(std::vector< TF_Tensor * >::size_type new_size, std::vector< TF_Tensor * >::value_type x)\n");
  
  return Qnil;
}

#select(*args) ⇒ Object

call-seq:

select -> Tensor_Vector

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


11538
11539
11540
11541
11542
11543
11544
11545
11546
11547
11548
11549
11550
11551
11552
11553
11554
11555
11556
11557
11558
11559
# File 'ext/Tensorflow_wrap.cxx', line 11538

SWIGINTERN VALUE
_wrap_Tensor_Vector_select(int argc, VALUE *argv, VALUE self) {
  std::vector< TF_Tensor * > *arg1 = (std::vector< TF_Tensor * > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::vector< TF_Tensor *,std::allocator< TF_Tensor * > > *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_TF_Tensor_p_std__allocatorT_TF_Tensor_p_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< TF_Tensor * > *","select", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< TF_Tensor * > * >(argp1);
  result = (std::vector< TF_Tensor *,std::allocator< TF_Tensor * > > *)std_vector_Sl_TF_Tensor_Sm__Sg__select(arg1);
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_TF_Tensor_p_std__allocatorT_TF_Tensor_p_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 Tensor_Vector.


12169
12170
12171
12172
12173
12174
12175
12176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190
# File 'ext/Tensorflow_wrap.cxx', line 12169

SWIGINTERN VALUE
_wrap_Tensor_Vector_shift(int argc, VALUE *argv, VALUE self) {
  std::vector< TF_Tensor * > *arg1 = (std::vector< TF_Tensor * > *) 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_TF_Tensor_p_std__allocatorT_TF_Tensor_p_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< TF_Tensor * > *","shift", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< TF_Tensor * > * >(argp1);
  result = (VALUE)std_vector_Sl_TF_Tensor_Sm__Sg__shift(arg1);
  vresult = result;
  return vresult;
fail:
  return Qnil;
}

#size(*args) ⇒ Object

call-seq:

size -> std::vector< TF_Tensor * >::size_type

Size or Length of the Tensor_Vector.


12370
12371
12372
12373
12374
12375
12376
12377
12378
12379
12380
12381
12382
12383
12384
12385
12386
12387
12388
12389
12390
12391
# File 'ext/Tensorflow_wrap.cxx', line 12370

SWIGINTERN VALUE
_wrap_Tensor_Vector_size(int argc, VALUE *argv, VALUE self) {
  std::vector< TF_Tensor * > *arg1 = (std::vector< TF_Tensor * > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::vector< TF_Tensor * >::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_TF_Tensor_p_std__allocatorT_TF_Tensor_p_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< TF_Tensor * > const *","size", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< TF_Tensor * > * >(argp1);
  result = ((std::vector< TF_Tensor * > 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 Tensor_Vector.


11416
11417
11418
11419
11420
11421
11422
11423
11424
11425
11426
11427
11428
11429
11430
11431
11432
11433
11434
11435
11436
11437
11438
11439
11440
11441
11442
11443
11444
11445
11446
11447
11448
11449
11450
11451
11452
11453
11454
11455
11456
11457
11458
11459
# File 'ext/Tensorflow_wrap.cxx', line 11416

SWIGINTERN VALUE
_wrap_Tensor_Vector_slice(int argc, VALUE *argv, VALUE self) {
  std::vector< TF_Tensor * > *arg1 = (std::vector< TF_Tensor * > *) 0 ;
  std::vector< TF_Tensor * >::difference_type arg2 ;
  std::vector< TF_Tensor * >::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_TF_Tensor_p_std__allocatorT_TF_Tensor_p_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< TF_Tensor * > *","slice", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< TF_Tensor * > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::vector< TF_Tensor * >::difference_type","slice", 2, argv[0] ));
  } 
  arg2 = static_cast< std::vector< TF_Tensor * >::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< TF_Tensor * >::difference_type","slice", 3, argv[1] ));
  } 
  arg3 = static_cast< std::vector< TF_Tensor * >::difference_type >(val3);
  try {
    result = (VALUE)std_vector_Sl_TF_Tensor_Sm__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


12394
12395
12396
12397
12398
12399
12400
12401
12402
12403
12404
12405
12406
12407
12408
12409
12410
12411
12412
12413
12414
12415
12416
12417
12418
12419
12420
12421
12422
12423
# File 'ext/Tensorflow_wrap.cxx', line 12394

SWIGINTERN VALUE
_wrap_Tensor_Vector_swap(int argc, VALUE *argv, VALUE self) {
  std::vector< TF_Tensor * > *arg1 = (std::vector< TF_Tensor * > *) 0 ;
  std::vector< TF_Tensor * > *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_TF_Tensor_p_std__allocatorT_TF_Tensor_p_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< TF_Tensor * > *","swap", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< TF_Tensor * > * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_std__vectorT_TF_Tensor_p_std__allocatorT_TF_Tensor_p_t_t,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::vector< TF_Tensor * > &","swap", 2, argv[0] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::vector< TF_Tensor * > &","swap", 2, argv[0])); 
  }
  arg2 = reinterpret_cast< std::vector< TF_Tensor * > * >(argp2);
  (arg1)->swap(*arg2);
  return Qnil;
fail:
  return Qnil;
}

#to_a(*args) ⇒ Object

call-seq:

to_a -> VALUE

Convert Tensor_Vector to an Array.


11350
11351
11352
11353
11354
11355
11356
11357
11358
11359
11360
11361
11362
11363
11364
11365
11366
11367
11368
11369
11370
11371
# File 'ext/Tensorflow_wrap.cxx', line 11350

SWIGINTERN VALUE
_wrap_Tensor_Vector_to_a(int argc, VALUE *argv, VALUE self) {
  std::vector< TF_Tensor * > *arg1 = (std::vector< TF_Tensor * > *) 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_TF_Tensor_p_std__allocatorT_TF_Tensor_p_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< TF_Tensor * > *","to_a", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< TF_Tensor * > * >(argp1);
  result = (VALUE)std_vector_Sl_TF_Tensor_Sm__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.


11383
11384
11385
11386
11387
11388
11389
11390
11391
11392
11393
11394
11395
11396
11397
11398
11399
11400
11401
11402
11403
11404
# File 'ext/Tensorflow_wrap.cxx', line 11383

SWIGINTERN VALUE
_wrap_Tensor_Vector_to_s(int argc, VALUE *argv, VALUE self) {
  std::vector< TF_Tensor * > *arg1 = (std::vector< TF_Tensor * > *) 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_TF_Tensor_p_std__allocatorT_TF_Tensor_p_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< TF_Tensor * > *","to_s", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< TF_Tensor * > * >(argp1);
  result = (VALUE)std_vector_Sl_TF_Tensor_Sm__Sg__to_s(arg1);
  vresult = result;
  return vresult;
fail:
  return Qnil;
}

#unshift(*args) ⇒ Object

call-seq:

unshift(argc) -> Tensor_Vector

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


12252
12253
12254
12255
12256
12257
12258
12259
12260
12261
12262
12263
12264
12265
12266
12267
12268
12269
12270
12271
12272
12273
12274
12275
12276
12277
12278
12279
12280
# File 'ext/Tensorflow_wrap.cxx', line 12252

SWIGINTERN VALUE
_wrap_Tensor_Vector_unshift(int argc, VALUE *argv, VALUE self) {
  std::vector< TF_Tensor * > *arg1 = (std::vector< TF_Tensor * > *) 0 ;
  int arg2 ;
  VALUE *arg3 = (VALUE *) 0 ;
  void *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::vector< TF_Tensor *,std::allocator< TF_Tensor * > > *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_TF_Tensor_p_std__allocatorT_TF_Tensor_p_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::vector< TF_Tensor * > *","unshift", 1, self )); 
  }
  arg1 = reinterpret_cast< std::vector< TF_Tensor * > * >(argp1);
  {
    arg2 = argc;
    arg3 = argv;
  }
  result = (std::vector< TF_Tensor *,std::allocator< TF_Tensor * > > *)std_vector_Sl_TF_Tensor_Sm__Sg__unshift(arg1,arg2,arg3,arg4);
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_TF_Tensor_p_std__allocatorT_TF_Tensor_p_t_t, 0 |  0 );
  return vresult;
fail:
  return Qnil;
}