Class: CNTK::StdUSetVariable

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

Instance Method Summary collapse

Constructor Details

#initialize(*args, self) ⇒ Object



14520
14521
14522
14523
14524
14525
14526
14527
14528
14529
14530
14531
14532
14533
14534
14535
14536
14537
14538
14539
14540
14541
14542
14543
14544
14545
14546
14547
14548
# File 'ext/cntk/cntk_wrap.cxx', line 14520

SWIGINTERN VALUE _wrap_new_StdUSetVariable(int nargs, VALUE *args, VALUE self) {
  int argc;
  VALUE argv[1];
  int ii;
  
  argc = nargs;
  if (argc > 1) SWIG_fail;
  for (ii = 0; (ii < argc); ++ii) {
    argv[ii] = args[ii];
  }
  if (argc == 0) {
    return _wrap_new_StdUSetVariable__SWIG_0(nargs, args, self);
  }
  if (argc == 1) {
    int _v;
    int res = swig::asptr(argv[0], (std::unordered_set< CNTK::Variable,std::hash< CNTK::Variable >,std::equal_to< CNTK::Variable >,std::allocator< CNTK::Variable > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_StdUSetVariable__SWIG_1(nargs, args, self);
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 1, "StdUSetVariable.new", 
    "    StdUSetVariable.new()\n"
    "    StdUSetVariable.new(std::unordered_set< CNTK::Variable > const &)\n");
  
  return Qnil;
}

Instance Method Details

#[](*args) ⇒ Object

call-seq:

[](i) -> Variable

Element accessor/slicing.



14422
14423
14424
14425
14426
14427
14428
14429
14430
14431
14432
14433
14434
14435
14436
14437
14438
14439
14440
14441
14442
14443
14444
14445
14446
14447
14448
14449
14450
14451
14452
14453
14454
14455
14456
14457
# File 'ext/cntk/cntk_wrap.cxx', line 14422

SWIGINTERN VALUE
_wrap_StdUSetVariable___getitem__(int argc, VALUE *argv, VALUE self) {
  std::unordered_set< CNTK::Variable > *arg1 = (std::unordered_set< CNTK::Variable > *) 0 ;
  std::unordered_set< CNTK::Variable >::difference_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  SwigValueWrapper< CNTK::Variable > 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__unordered_setT_CNTK__Variable_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_CNTK__Variable_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::unordered_set< CNTK::Variable > const *","__getitem__", 1, self )); 
  }
  arg1 = reinterpret_cast< std::unordered_set< CNTK::Variable > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "std::unordered_set< CNTK::Variable >::difference_type","__getitem__", 2, argv[0] ));
  } 
  arg2 = static_cast< std::unordered_set< CNTK::Variable >::difference_type >(val2);
  try {
    result = std_unordered_set_Sl_CNTK_Variable_Sg____getitem__((std::unordered_set< CNTK::Variable > const *)arg1,arg2);
  }
  catch(std::out_of_range &_e) {
    SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
  }
  
  vresult = SWIG_NewPointerObj((new std::unordered_set< CNTK::Variable >::value_type(static_cast< const std::unordered_set< CNTK::Variable >::value_type& >(result))), SWIGTYPE_p_CNTK__Variable, SWIG_POINTER_OWN |  0 );
  return vresult;
fail:
  return Qnil;
}

#__delete2__(*args) ⇒ Object



14192
14193
14194
14195
14196
14197
14198
14199
14200
14201
14202
14203
14204
14205
14206
14207
14208
14209
14210
14211
14212
14213
14214
14215
14216
14217
14218
14219
14220
14221
14222
14223
14224
# File 'ext/cntk/cntk_wrap.cxx', line 14192

SWIGINTERN VALUE
_wrap_StdUSetVariable___delete2__(int argc, VALUE *argv, VALUE self) {
  std::unordered_set< CNTK::Variable > *arg1 = (std::unordered_set< CNTK::Variable > *) 0 ;
  std::unordered_set< CNTK::Variable >::value_type *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 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__unordered_setT_CNTK__Variable_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_CNTK__Variable_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::unordered_set< CNTK::Variable > *","__delete2__", 1, self )); 
  }
  arg1 = reinterpret_cast< std::unordered_set< CNTK::Variable > * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_CNTK__Variable,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::unordered_set< CNTK::Variable >::value_type const &","__delete2__", 2, argv[0] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::unordered_set< CNTK::Variable >::value_type const &","__delete2__", 2, argv[0])); 
  }
  arg2 = reinterpret_cast< std::unordered_set< CNTK::Variable >::value_type * >(argp2);
  result = (VALUE)std_unordered_set_Sl_CNTK_Variable_Sg____delete2__(arg1,(CNTK::Variable const &)*arg2);
  vresult = result;
  return vresult;
fail:
  return Qnil;
}

#begin(*args) ⇒ Object

call-seq:

begin -> std::unordered_set< CNTK::Variable >::iterator

Return an iterator to the beginning of the StdUSetVariable.



14769
14770
14771
14772
14773
14774
14775
14776
14777
14778
14779
14780
14781
14782
14783
14784
14785
14786
14787
14788
14789
14790
14791
14792
# File 'ext/cntk/cntk_wrap.cxx', line 14769

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

#clear(*args) ⇒ Object

call-seq:

clear

Clear StdUSetVariable contents.



14626
14627
14628
14629
14630
14631
14632
14633
14634
14635
14636
14637
14638
14639
14640
14641
14642
14643
14644
# File 'ext/cntk/cntk_wrap.cxx', line 14626

SWIGINTERN VALUE
_wrap_StdUSetVariable_clear(int argc, VALUE *argv, VALUE self) {
  std::unordered_set< CNTK::Variable > *arg1 = (std::unordered_set< CNTK::Variable > *) 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__unordered_setT_CNTK__Variable_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_CNTK__Variable_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::unordered_set< CNTK::Variable > *","clear", 1, self )); 
  }
  arg1 = reinterpret_cast< std::unordered_set< CNTK::Variable > * >(argp1);
  (arg1)->clear();
  return Qnil;
fail:
  return Qnil;
}

#count(*args) ⇒ Object



14725
14726
14727
14728
14729
14730
14731
14732
14733
14734
14735
14736
14737
14738
14739
14740
14741
14742
14743
14744
14745
14746
14747
14748
14749
14750
14751
14752
14753
14754
14755
14756
14757
# File 'ext/cntk/cntk_wrap.cxx', line 14725

SWIGINTERN VALUE
_wrap_StdUSetVariable_count(int argc, VALUE *argv, VALUE self) {
  std::unordered_set< CNTK::Variable > *arg1 = (std::unordered_set< CNTK::Variable > *) 0 ;
  std::unordered_set< CNTK::Variable >::key_type *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  std::unordered_set< CNTK::Variable >::size_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__unordered_setT_CNTK__Variable_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_CNTK__Variable_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::unordered_set< CNTK::Variable > const *","count", 1, self )); 
  }
  arg1 = reinterpret_cast< std::unordered_set< CNTK::Variable > * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_CNTK__Variable,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::unordered_set< CNTK::Variable >::key_type const &","count", 2, argv[0] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::unordered_set< CNTK::Variable >::key_type const &","count", 2, argv[0])); 
  }
  arg2 = reinterpret_cast< std::unordered_set< CNTK::Variable >::key_type * >(argp2);
  result = ((std::unordered_set< CNTK::Variable > const *)arg1)->count((std::unordered_set< CNTK::Variable >::key_type const &)*arg2);
  vresult = SWIG_From_size_t(static_cast< size_t >(result));
  return vresult;
fail:
  return Qnil;
}

#delete_at(*args) ⇒ Object

call-seq:

delete_at(i) -> VALUE

Delete an element at a certain index.



14269
14270
14271
14272
14273
14274
14275
14276
14277
14278
14279
14280
14281
14282
14283
14284
14285
14286
14287
14288
14289
14290
14291
14292
14293
14294
14295
14296
14297
14298
# File 'ext/cntk/cntk_wrap.cxx', line 14269

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

#dup(*args) ⇒ Object

call-seq:

dup -> StdUSetVariable

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



13981
13982
13983
13984
13985
13986
13987
13988
13989
13990
13991
13992
13993
13994
13995
13996
13997
13998
13999
14000
14001
14002
# File 'ext/cntk/cntk_wrap.cxx', line 13981

SWIGINTERN VALUE
_wrap_StdUSetVariable_dup(int argc, VALUE *argv, VALUE self) {
  std::unordered_set< CNTK::Variable > *arg1 = (std::unordered_set< CNTK::Variable > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::unordered_set< CNTK::Variable,std::hash< CNTK::Variable >,std::equal_to< CNTK::Variable >,std::allocator< CNTK::Variable > > *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__unordered_setT_CNTK__Variable_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_CNTK__Variable_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::unordered_set< CNTK::Variable > *","dup", 1, self )); 
  }
  arg1 = reinterpret_cast< std::unordered_set< CNTK::Variable > * >(argp1);
  result = (std::unordered_set< CNTK::Variable,std::hash< CNTK::Variable >,std::equal_to< CNTK::Variable >,std::allocator< CNTK::Variable > > *)std_unordered_set_Sl_CNTK_Variable_Sg__dup(arg1);
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__unordered_setT_CNTK__Variable_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_CNTK__Variable_t_t, SWIG_POINTER_OWN |  0 );
  return vresult;
fail:
  return Qnil;
}

#each(*args) ⇒ Object

call-seq:

each -> StdUSetVariable

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



14168
14169
14170
14171
14172
14173
14174
14175
14176
14177
14178
14179
14180
14181
14182
14183
14184
14185
14186
14187
14188
14189
# File 'ext/cntk/cntk_wrap.cxx', line 14168

SWIGINTERN VALUE
_wrap_StdUSetVariable_each(int argc, VALUE *argv, VALUE self) {
  std::unordered_set< CNTK::Variable > *arg1 = (std::unordered_set< CNTK::Variable > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::unordered_set< CNTK::Variable,std::hash< CNTK::Variable >,std::equal_to< CNTK::Variable >,std::allocator< CNTK::Variable > > *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__unordered_setT_CNTK__Variable_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_CNTK__Variable_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::unordered_set< CNTK::Variable > *","each", 1, self )); 
  }
  arg1 = reinterpret_cast< std::unordered_set< CNTK::Variable > * >(argp1);
  result = (std::unordered_set< CNTK::Variable,std::hash< CNTK::Variable >,std::equal_to< CNTK::Variable >,std::allocator< CNTK::Variable > > *)std_unordered_set_Sl_CNTK_Variable_Sg__each(arg1);
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__unordered_setT_CNTK__Variable_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_CNTK__Variable_t_t, 0 |  0 );
  return vresult;
fail:
  return Qnil;
}

#empty?(*args) ⇒ Boolean

call-seq:

empty? -> bool

Check if the StdUSetVariable is empty or not.

Returns:

  • (Boolean)


14560
14561
14562
14563
14564
14565
14566
14567
14568
14569
14570
14571
14572
14573
14574
14575
14576
14577
14578
14579
14580
14581
# File 'ext/cntk/cntk_wrap.cxx', line 14560

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

#end(*args) ⇒ Object

call-seq:

end -> std::unordered_set< CNTK::Variable >::iterator

Return an iterator to past the end of the StdUSetVariable.



14804
14805
14806
14807
14808
14809
14810
14811
14812
14813
14814
14815
14816
14817
14818
14819
14820
14821
14822
14823
14824
14825
14826
14827
# File 'ext/cntk/cntk_wrap.cxx', line 14804

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

#equal_range(*args) ⇒ Object



15037
15038
15039
15040
15041
15042
15043
15044
15045
15046
15047
15048
15049
15050
15051
15052
15053
15054
15055
15056
15057
15058
15059
15060
15061
15062
15063
15064
15065
15066
15067
15068
15069
15070
15071
15072
15073
# File 'ext/cntk/cntk_wrap.cxx', line 15037

SWIGINTERN VALUE
_wrap_StdUSetVariable_equal_range(int argc, VALUE *argv, VALUE self) {
  std::unordered_set< CNTK::Variable > *arg1 = (std::unordered_set< CNTK::Variable > *) 0 ;
  std::unordered_set< CNTK::Variable >::key_type *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  SwigValueWrapper< std::pair< std::unordered_set< CNTK::Variable >::iterator,std::unordered_set< CNTK::Variable >::iterator > > 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__unordered_setT_CNTK__Variable_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_CNTK__Variable_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::unordered_set< CNTK::Variable > *","equal_range", 1, self )); 
  }
  arg1 = reinterpret_cast< std::unordered_set< CNTK::Variable > * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_CNTK__Variable,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::unordered_set< CNTK::Variable >::key_type const &","equal_range", 2, argv[0] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::unordered_set< CNTK::Variable >::key_type const &","equal_range", 2, argv[0])); 
  }
  arg2 = reinterpret_cast< std::unordered_set< CNTK::Variable >::key_type * >(argp2);
  result = (arg1)->equal_range((std::unordered_set< CNTK::Variable >::key_type const &)*arg2);
  vresult = rb_ary_new2(2);
  rb_ary_push(vresult, SWIG_NewPointerObj(swig::make_const_iterator(static_cast< const std::pair< std::unordered_set< CNTK::Variable >::iterator,std::unordered_set< CNTK::Variable >::iterator > & >(result).first),
      swig::ConstIterator::descriptor(),SWIG_POINTER_OWN));
  rb_ary_push(vresult, SWIG_NewPointerObj(swig::make_const_iterator(static_cast< const std::pair< std::unordered_set< CNTK::Variable >::iterator,std::unordered_set< CNTK::Variable >::iterator > & >(result).second),
      swig::ConstIterator::descriptor(),SWIG_POINTER_OWN));
  return vresult;
fail:
  return Qnil;
}

#erase(*args, self) ⇒ Object

call-seq:

erase(x) -> std::unordered_set< CNTK::Variable >::size_type
erase(pos)
erase(first, last)

Delete a portion of the StdUSetVariable.



14925
14926
14927
14928
14929
14930
14931
14932
14933
14934
14935
14936
14937
14938
14939
14940
14941
14942
14943
14944
14945
14946
14947
14948
14949
14950
14951
14952
14953
14954
14955
14956
14957
14958
14959
14960
14961
14962
14963
14964
14965
14966
14967
14968
14969
14970
14971
14972
14973
14974
14975
14976
14977
14978
14979
14980
14981
14982
14983
14984
14985
14986
14987
14988
# File 'ext/cntk/cntk_wrap.cxx', line 14925

SWIGINTERN VALUE _wrap_StdUSetVariable_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::unordered_set< CNTK::Variable,std::hash< CNTK::Variable >,std::equal_to< CNTK::Variable >,std::allocator< CNTK::Variable > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_CNTK__Variable, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_StdUSetVariable_erase__SWIG_0(nargs, args, self);
      }
    }
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::unordered_set< CNTK::Variable,std::hash< CNTK::Variable >,std::equal_to< CNTK::Variable >,std::allocator< CNTK::Variable > >**)(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::unordered_set< CNTK::Variable >::iterator > *>(iter) != 0));
      if (_v) {
        return _wrap_StdUSetVariable_erase__SWIG_1(nargs, args, self);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::unordered_set< CNTK::Variable,std::hash< CNTK::Variable >,std::equal_to< CNTK::Variable >,std::allocator< CNTK::Variable > >**)(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::unordered_set< CNTK::Variable >::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::unordered_set< CNTK::Variable >::iterator > *>(iter) != 0));
        if (_v) {
          return _wrap_StdUSetVariable_erase__SWIG_2(nargs, args, self);
        }
      }
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 4, "StdUSetVariable.erase", 
    "    std::unordered_set< CNTK::Variable >::size_type StdUSetVariable.erase(std::unordered_set< CNTK::Variable >::key_type const &x)\n"
    "    void StdUSetVariable.erase(std::unordered_set< CNTK::Variable >::iterator pos)\n"
    "    void StdUSetVariable.erase(std::unordered_set< CNTK::Variable >::iterator first, std::unordered_set< CNTK::Variable >::iterator last)\n");
  
  return Qnil;
}

#find(*args) ⇒ Object

call-seq:

find(x) -> std::unordered_set< CNTK::Variable >::iterator

Find an element in the class.



15000
15001
15002
15003
15004
15005
15006
15007
15008
15009
15010
15011
15012
15013
15014
15015
15016
15017
15018
15019
15020
15021
15022
15023
15024
15025
15026
15027
15028
15029
15030
15031
15032
15033
15034
# File 'ext/cntk/cntk_wrap.cxx', line 15000

SWIGINTERN VALUE
_wrap_StdUSetVariable_find(int argc, VALUE *argv, VALUE self) {
  std::unordered_set< CNTK::Variable > *arg1 = (std::unordered_set< CNTK::Variable > *) 0 ;
  std::unordered_set< CNTK::Variable >::key_type *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  std::unordered_set< CNTK::Variable >::iterator 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__unordered_setT_CNTK__Variable_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_CNTK__Variable_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::unordered_set< CNTK::Variable > *","find", 1, self )); 
  }
  arg1 = reinterpret_cast< std::unordered_set< CNTK::Variable > * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_CNTK__Variable,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::unordered_set< CNTK::Variable >::key_type const &","find", 2, argv[0] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::unordered_set< CNTK::Variable >::key_type const &","find", 2, argv[0])); 
  }
  arg2 = reinterpret_cast< std::unordered_set< CNTK::Variable >::key_type * >(argp2);
  result = (arg1)->find((std::unordered_set< CNTK::Variable >::key_type const &)*arg2);
  vresult = SWIG_NewPointerObj(swig::make_set_nonconst_iterator(static_cast< const std::unordered_set< CNTK::Variable >::iterator & >(result),
      self),
    swig::Iterator::descriptor(),SWIG_POINTER_OWN);
  return vresult;
fail:
  return Qnil;
}

#include?(*args) ⇒ Boolean

Returns:

  • (Boolean)


14378
14379
14380
14381
14382
14383
14384
14385
14386
14387
14388
14389
14390
14391
14392
14393
14394
14395
14396
14397
14398
14399
14400
14401
14402
14403
14404
14405
14406
14407
14408
14409
14410
# File 'ext/cntk/cntk_wrap.cxx', line 14378

SWIGINTERN VALUE
_wrap_StdUSetVariable_includeq___(int argc, VALUE *argv, VALUE self) {
  std::unordered_set< CNTK::Variable > *arg1 = (std::unordered_set< CNTK::Variable > *) 0 ;
  std::unordered_set< CNTK::Variable >::value_type *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  bool 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__unordered_setT_CNTK__Variable_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_CNTK__Variable_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::unordered_set< CNTK::Variable > *","__contains__", 1, self )); 
  }
  arg1 = reinterpret_cast< std::unordered_set< CNTK::Variable > * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_CNTK__Variable,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::unordered_set< CNTK::Variable >::value_type const &","__contains__", 2, argv[0] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::unordered_set< CNTK::Variable >::value_type const &","__contains__", 2, argv[0])); 
  }
  arg2 = reinterpret_cast< std::unordered_set< CNTK::Variable >::value_type * >(argp2);
  result = (bool)std_unordered_set_Sl_CNTK_Variable_Sg____contains__(arg1,(CNTK::Variable const &)*arg2);
  vresult = SWIG_From_bool(static_cast< bool >(result));
  return vresult;
fail:
  return Qnil;
}

#insert(*args) ⇒ Object

call-seq:

insert(x) -> std::pair< std::unordered_set< CNTK::Variable >::iterator,bool >

Insert one or more new elements in the StdUSetVariable.



15085
15086
15087
15088
15089
15090
15091
15092
15093
15094
15095
15096
15097
15098
15099
15100
15101
15102
15103
15104
15105
15106
15107
15108
15109
15110
15111
15112
15113
15114
15115
15116
15117
15118
15119
15120
# File 'ext/cntk/cntk_wrap.cxx', line 15085

SWIGINTERN VALUE
_wrap_StdUSetVariable_insert(int argc, VALUE *argv, VALUE self) {
  std::unordered_set< CNTK::Variable > *arg1 = (std::unordered_set< CNTK::Variable > *) 0 ;
  std::unordered_set< CNTK::Variable >::value_type *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  SwigValueWrapper< std::pair< std::unordered_set< CNTK::Variable >::iterator,bool > > 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__unordered_setT_CNTK__Variable_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_CNTK__Variable_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::unordered_set< CNTK::Variable > *","insert", 1, self )); 
  }
  arg1 = reinterpret_cast< std::unordered_set< CNTK::Variable > * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_CNTK__Variable,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::unordered_set< CNTK::Variable >::value_type const &","insert", 2, argv[0] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::unordered_set< CNTK::Variable >::value_type const &","insert", 2, argv[0])); 
  }
  arg2 = reinterpret_cast< std::unordered_set< CNTK::Variable >::value_type * >(argp2);
  result = (arg1)->insert((std::unordered_set< CNTK::Variable >::value_type const &)*arg2);
  vresult = rb_ary_new2(2);
  rb_ary_push(vresult, SWIG_NewPointerObj(swig::make_set_nonconst_iterator(static_cast< std::pair< std::unordered_set< CNTK::Variable >::iterator,bool > & >(result).first),
      swig::Iterator::descriptor(),SWIG_POINTER_OWN));
  rb_ary_push(vresult, SWIG_From_bool  (static_cast< const std::pair< std::unordered_set< CNTK::Variable >::iterator,bool > & >(result).second));
  return vresult;
fail:
  return Qnil;
}

#inspect(*args) ⇒ Object

call-seq:

inspect -> VALUE

Inspect class and its contents.



14014
14015
14016
14017
14018
14019
14020
14021
14022
14023
14024
14025
14026
14027
14028
14029
14030
14031
14032
14033
14034
14035
# File 'ext/cntk/cntk_wrap.cxx', line 14014

SWIGINTERN VALUE
_wrap_StdUSetVariable_inspect(int argc, VALUE *argv, VALUE self) {
  std::unordered_set< CNTK::Variable > *arg1 = (std::unordered_set< CNTK::Variable > *) 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__unordered_setT_CNTK__Variable_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_CNTK__Variable_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::unordered_set< CNTK::Variable > *","inspect", 1, self )); 
  }
  arg1 = reinterpret_cast< std::unordered_set< CNTK::Variable > * >(argp1);
  result = (VALUE)std_unordered_set_Sl_CNTK_Variable_Sg__inspect(arg1);
  vresult = result;
  return vresult;
fail:
  return Qnil;
}

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

call-seq:

push(x) -> Variable

Add an element at the end of the StdUSetVariable.



14343
14344
14345
14346
14347
14348
14349
14350
14351
14352
14353
14354
14355
14356
14357
14358
14359
14360
14361
14362
14363
14364
14365
14366
14367
14368
14369
14370
14371
14372
14373
14374
14375
# File 'ext/cntk/cntk_wrap.cxx', line 14343

SWIGINTERN VALUE
_wrap_StdUSetVariable_push(int argc, VALUE *argv, VALUE self) {
  std::unordered_set< CNTK::Variable > *arg1 = (std::unordered_set< CNTK::Variable > *) 0 ;
  std::unordered_set< CNTK::Variable >::value_type *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  SwigValueWrapper< CNTK::Variable > 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__unordered_setT_CNTK__Variable_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_CNTK__Variable_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::unordered_set< CNTK::Variable > *","push", 1, self )); 
  }
  arg1 = reinterpret_cast< std::unordered_set< CNTK::Variable > * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_CNTK__Variable,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::unordered_set< CNTK::Variable >::value_type const &","push", 2, argv[0] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::unordered_set< CNTK::Variable >::value_type const &","push", 2, argv[0])); 
  }
  arg2 = reinterpret_cast< std::unordered_set< CNTK::Variable >::value_type * >(argp2);
  result = std_unordered_set_Sl_CNTK_Variable_Sg__push(arg1,(CNTK::Variable const &)*arg2);
  vresult = SWIG_NewPointerObj((new std::unordered_set< CNTK::Variable >::value_type(static_cast< const std::unordered_set< CNTK::Variable >::value_type& >(result))), SWIGTYPE_p_CNTK__Variable, SWIG_POINTER_OWN |  0 );
  return vresult;
fail:
  return Qnil;
}

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

call-seq:

reject! -> StdUSetVariable

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



14310
14311
14312
14313
14314
14315
14316
14317
14318
14319
14320
14321
14322
14323
14324
14325
14326
14327
14328
14329
14330
14331
# File 'ext/cntk/cntk_wrap.cxx', line 14310

SWIGINTERN VALUE
_wrap_StdUSetVariable_rejectN___(int argc, VALUE *argv, VALUE self) {
  std::unordered_set< CNTK::Variable > *arg1 = (std::unordered_set< CNTK::Variable > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::unordered_set< CNTK::Variable,std::hash< CNTK::Variable >,std::equal_to< CNTK::Variable >,std::allocator< CNTK::Variable > > *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__unordered_setT_CNTK__Variable_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_CNTK__Variable_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::unordered_set< CNTK::Variable > *","reject_bang", 1, self )); 
  }
  arg1 = reinterpret_cast< std::unordered_set< CNTK::Variable > * >(argp1);
  result = (std::unordered_set< CNTK::Variable,std::hash< CNTK::Variable >,std::equal_to< CNTK::Variable >,std::allocator< CNTK::Variable > > *)std_unordered_set_Sl_CNTK_Variable_Sg__reject_bang(arg1);
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__unordered_setT_CNTK__Variable_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_CNTK__Variable_t_t, 0 |  0 );
  return vresult;
fail:
  return Qnil;
}

#select(*args) ⇒ Object

call-seq:

select -> StdUSetVariable

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



14236
14237
14238
14239
14240
14241
14242
14243
14244
14245
14246
14247
14248
14249
14250
14251
14252
14253
14254
14255
14256
14257
# File 'ext/cntk/cntk_wrap.cxx', line 14236

SWIGINTERN VALUE
_wrap_StdUSetVariable_select(int argc, VALUE *argv, VALUE self) {
  std::unordered_set< CNTK::Variable > *arg1 = (std::unordered_set< CNTK::Variable > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::unordered_set< CNTK::Variable,std::hash< CNTK::Variable >,std::equal_to< CNTK::Variable >,std::allocator< CNTK::Variable > > *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__unordered_setT_CNTK__Variable_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_CNTK__Variable_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::unordered_set< CNTK::Variable > *","select", 1, self )); 
  }
  arg1 = reinterpret_cast< std::unordered_set< CNTK::Variable > * >(argp1);
  result = (std::unordered_set< CNTK::Variable,std::hash< CNTK::Variable >,std::equal_to< CNTK::Variable >,std::allocator< CNTK::Variable > > *)std_unordered_set_Sl_CNTK_Variable_Sg__select(arg1);
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__unordered_setT_CNTK__Variable_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_CNTK__Variable_t_t, SWIG_POINTER_OWN |  0 );
  return vresult;
fail:
  return Qnil;
}

#size(*args) ⇒ Object

call-seq:

size -> std::unordered_set< CNTK::Variable >::size_type

Size or Length of the StdUSetVariable.



14593
14594
14595
14596
14597
14598
14599
14600
14601
14602
14603
14604
14605
14606
14607
14608
14609
14610
14611
14612
14613
14614
# File 'ext/cntk/cntk_wrap.cxx', line 14593

SWIGINTERN VALUE
_wrap_StdUSetVariable_size(int argc, VALUE *argv, VALUE self) {
  std::unordered_set< CNTK::Variable > *arg1 = (std::unordered_set< CNTK::Variable > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::unordered_set< CNTK::Variable >::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__unordered_setT_CNTK__Variable_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_CNTK__Variable_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::unordered_set< CNTK::Variable > const *","size", 1, self )); 
  }
  arg1 = reinterpret_cast< std::unordered_set< CNTK::Variable > * >(argp1);
  result = ((std::unordered_set< CNTK::Variable > 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 StdUSetVariable.



14113
14114
14115
14116
14117
14118
14119
14120
14121
14122
14123
14124
14125
14126
14127
14128
14129
14130
14131
14132
14133
14134
14135
14136
14137
14138
14139
14140
14141
14142
14143
14144
14145
14146
14147
14148
14149
14150
14151
14152
14153
14154
14155
14156
# File 'ext/cntk/cntk_wrap.cxx', line 14113

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



14647
14648
14649
14650
14651
14652
14653
14654
14655
14656
14657
14658
14659
14660
14661
14662
14663
14664
14665
14666
14667
14668
14669
14670
14671
14672
14673
14674
14675
14676
# File 'ext/cntk/cntk_wrap.cxx', line 14647

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

#to_a(*args) ⇒ Object

call-seq:

to_a -> VALUE

Convert StdUSetVariable to an Array.



14047
14048
14049
14050
14051
14052
14053
14054
14055
14056
14057
14058
14059
14060
14061
14062
14063
14064
14065
14066
14067
14068
# File 'ext/cntk/cntk_wrap.cxx', line 14047

SWIGINTERN VALUE
_wrap_StdUSetVariable_to_a(int argc, VALUE *argv, VALUE self) {
  std::unordered_set< CNTK::Variable > *arg1 = (std::unordered_set< CNTK::Variable > *) 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__unordered_setT_CNTK__Variable_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_CNTK__Variable_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::unordered_set< CNTK::Variable > *","to_a", 1, self )); 
  }
  arg1 = reinterpret_cast< std::unordered_set< CNTK::Variable > * >(argp1);
  result = (VALUE)std_unordered_set_Sl_CNTK_Variable_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.



14080
14081
14082
14083
14084
14085
14086
14087
14088
14089
14090
14091
14092
14093
14094
14095
14096
14097
14098
14099
14100
14101
# File 'ext/cntk/cntk_wrap.cxx', line 14080

SWIGINTERN VALUE
_wrap_StdUSetVariable_to_s(int argc, VALUE *argv, VALUE self) {
  std::unordered_set< CNTK::Variable > *arg1 = (std::unordered_set< CNTK::Variable > *) 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__unordered_setT_CNTK__Variable_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_CNTK__Variable_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::unordered_set< CNTK::Variable > *","to_s", 1, self )); 
  }
  arg1 = reinterpret_cast< std::unordered_set< CNTK::Variable > * >(argp1);
  result = (VALUE)std_unordered_set_Sl_CNTK_Variable_Sg__to_s(arg1);
  vresult = result;
  return vresult;
fail:
  return Qnil;
}