Class: CNTK::StdUMapVariableValue
- Inherits:
-
Object
- Object
- CNTK::StdUMapVariableValue
- Defined in:
- ext/cntk/cntk_wrap.cxx
Instance Method Summary collapse
-
#[](*args) ⇒ Object
call-seq: [](key) -> VALUE.
-
#[]=(*args) ⇒ Object
call-seq: []=(key, x).
- #__set_nullptr__(*args) ⇒ Object
-
#begin(*args) ⇒ Object
call-seq: begin -> std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::iterator.
-
#clear(*args) ⇒ Object
call-seq: clear.
- #count(*args) ⇒ Object
-
#delete(*args) ⇒ Object
call-seq: delete(key) -> VALUE.
-
#dup(*args) ⇒ Object
call-seq: dup -> StdUMapVariableValue.
-
#each(*args) ⇒ Object
call-seq: each -> StdUMapVariableValue.
-
#each_key(*args) ⇒ Object
call-seq: each_key -> StdUMapVariableValue.
-
#each_value(*args) ⇒ Object
call-seq: each_value -> StdUMapVariableValue.
-
#empty?(*args) ⇒ Boolean
call-seq: empty? -> bool.
-
#end(*args) ⇒ Object
call-seq: end -> std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::iterator.
- #entries(*args) ⇒ Object
-
#erase(*args, self) ⇒ Object
call-seq: erase(x) -> std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::size_type erase(position) erase(first, last).
-
#find(*args) ⇒ Object
call-seq: find(x) -> std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::iterator.
- #get_allocator(*args) ⇒ Object
- #has_key?(*args) ⇒ Boolean
- #include?(*args) ⇒ Boolean
- #initialize(*args, self) ⇒ Object constructor
-
#inspect(*args) ⇒ Object
call-seq: inspect -> VALUE.
- #key_iterator(*args) ⇒ Object
-
#keys(*args) ⇒ Object
call-seq: keys -> VALUE.
-
#select(*args) ⇒ Object
call-seq: select -> StdUMapVariableValue.
-
#size(*args) ⇒ Object
call-seq: size -> std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::size_type.
- #swap(*args) ⇒ Object
-
#to_a(*args) ⇒ Object
call-seq: to_a -> VALUE.
-
#to_s(*args) ⇒ Object
call-seq: to_s -> VALUE.
- #value_iterator(*args) ⇒ Object
-
#values(*args) ⇒ Object
call-seq: values -> VALUE.
-
#values_at(*args) ⇒ Object
call-seq: values_at(argc) -> VALUE.
Constructor Details
#initialize(*args, self) ⇒ Object
13389 13390 13391 13392 13393 13394 13395 13396 13397 13398 13399 13400 13401 13402 13403 13404 13405 13406 13407 13408 13409 13410 13411 13412 13413 13414 13415 13416 13417 |
# File 'ext/cntk/cntk_wrap.cxx', line 13389
SWIGINTERN VALUE _wrap_new_StdUMapVariableValue(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_StdUMapVariableValue__SWIG_0(nargs, args, self);
}
if (argc == 1) {
int _v;
int res = swig::asptr(argv[0], (std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value >,std::hash< CNTK::Variable >,std::equal_to< CNTK::Variable >,std::allocator< std::pair< CNTK::Variable const,std::shared_ptr< CNTK::Value > > > >**)(0));
_v = SWIG_CheckState(res);
if (_v) {
return _wrap_new_StdUMapVariableValue__SWIG_1(nargs, args, self);
}
}
fail:
Ruby_Format_OverloadedError( argc, 1, "StdUMapVariableValue.new",
" StdUMapVariableValue.new()\n"
" StdUMapVariableValue.new(std::unordered_map< CNTK::Variable,CNTK::ValuePtr > const &)\n");
return Qnil;
}
|
Instance Method Details
#[](*args) ⇒ Object
call-seq:
[](key) -> VALUE
Element accessor/slicing.
13128 13129 13130 13131 13132 13133 13134 13135 13136 13137 13138 13139 13140 13141 13142 13143 13144 13145 13146 13147 13148 13149 13150 13151 13152 13153 13154 13155 13156 13157 13158 13159 13160 |
# File 'ext/cntk/cntk_wrap.cxx', line 13128
SWIGINTERN VALUE
_wrap_StdUMapVariableValue___getitem__(int argc, VALUE *argv, VALUE self) {
std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *arg1 = (std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *) 0 ;
std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::key_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_mapT_CNTK__Variable_std__shared_ptrT_CNTK__Value_t_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_std__pairT_CNTK__Variable_const_std__shared_ptrT_CNTK__Value_t_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::unordered_map< CNTK::Variable,CNTK::ValuePtr > const *","__getitem__", 1, self ));
}
arg1 = reinterpret_cast< std::unordered_map< CNTK::Variable,CNTK::ValuePtr > * >(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_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::key_type const &","__getitem__", 2, argv[0] ));
}
if (!argp2) {
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::key_type const &","__getitem__", 2, argv[0]));
}
arg2 = reinterpret_cast< std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::key_type * >(argp2);
result = (VALUE)std_unordered_map_Sl_CNTK_Variable_Sc_CNTK_ValuePtr_Sg____getitem__((std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > > const *)arg1,(CNTK::Variable const &)*arg2);
vresult = result;
return vresult;
fail:
return Qnil;
}
|
#[]=(*args) ⇒ Object
call-seq:
[]=(key, x)
Element setter/slicing.
13172 13173 13174 13175 13176 13177 13178 13179 13180 13181 13182 13183 13184 13185 13186 13187 13188 13189 13190 13191 13192 13193 13194 13195 13196 13197 13198 13199 13200 13201 13202 13203 13204 13205 13206 13207 13208 13209 13210 13211 13212 13213 13214 13215 13216 13217 13218 13219 13220 13221 13222 13223 13224 13225 13226 13227 |
# File 'ext/cntk/cntk_wrap.cxx', line 13172
SWIGINTERN VALUE
_wrap_StdUMapVariableValue___setitem__(int argc, VALUE *argv, VALUE self) {
std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *arg1 = (std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *) 0 ;
std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::key_type *arg2 = 0 ;
std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::mapped_type *arg3 = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
void *argp2 ;
int res2 = 0 ;
void *argp3 ;
int res3 = 0 ;
std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::mapped_type tempshared3 ;
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_mapT_CNTK__Variable_std__shared_ptrT_CNTK__Value_t_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_std__pairT_CNTK__Variable_const_std__shared_ptrT_CNTK__Value_t_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *","__setitem__", 1, self ));
}
arg1 = reinterpret_cast< std::unordered_map< CNTK::Variable,CNTK::ValuePtr > * >(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_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::key_type const &","__setitem__", 2, argv[0] ));
}
if (!argp2) {
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::key_type const &","__setitem__", 2, argv[0]));
}
arg2 = reinterpret_cast< std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::key_type * >(argp2);
{
swig_ruby_owntype newmem = {
0, 0
};
res3 = SWIG_ConvertPtrAndOwn(argv[1], &argp3, SWIGTYPE_p_std__shared_ptrT_CNTK__Value_t, 0 , &newmem);
if (!SWIG_IsOK(res3)) {
SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::mapped_type const &","__setitem__", 3, argv[1] ));
}
if (newmem.own & SWIG_CAST_NEW_MEMORY) {
if (argp3) tempshared3 = *reinterpret_cast< std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::mapped_type * >(argp3);
delete reinterpret_cast< std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::mapped_type * >(argp3);
arg3 = &tempshared3;
} else {
arg3 = (argp3) ? reinterpret_cast< std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::mapped_type * >(argp3) : &tempshared3;
}
}
try {
std_unordered_map_Sl_CNTK_Variable_Sc_CNTK_ValuePtr_Sg____setitem__(arg1,(CNTK::Variable const &)*arg2,(std::shared_ptr< CNTK::Value > const &)*arg3);
}
catch(std::out_of_range &_e) {
SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
}
return Qnil;
fail:
return Qnil;
}
|
#__set_nullptr__(*args) ⇒ Object
13913 13914 13915 13916 13917 13918 13919 13920 13921 13922 13923 13924 13925 13926 13927 13928 13929 13930 13931 13932 13933 13934 13935 13936 13937 13938 13939 13940 13941 13942 13943 13944 13945 13946 13947 13948 13949 13950 13951 13952 13953 13954 13955 13956 13957 13958 13959 13960 13961 |
# File 'ext/cntk/cntk_wrap.cxx', line 13913
SWIGINTERN VALUE
_wrap_StdUMapVariableValue___set_nullptr__(int argc, VALUE *argv, VALUE self) {
std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *arg1 = (std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *) 0 ;
CNTK::Variable *arg2 = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
void *argp2 ;
int res2 = 0 ;
int 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_mapT_CNTK__Variable_std__shared_ptrT_CNTK__Value_t_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_std__pairT_CNTK__Variable_const_std__shared_ptrT_CNTK__Value_t_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *","__set_nullptr__", 1, self ));
}
arg1 = reinterpret_cast< std::unordered_map< CNTK::Variable,CNTK::ValuePtr > * >(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( "", "CNTK::Variable const &","__set_nullptr__", 2, argv[0] ));
}
if (!argp2) {
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "CNTK::Variable const &","__set_nullptr__", 2, argv[0]));
}
arg2 = reinterpret_cast< CNTK::Variable * >(argp2);
{
try {
result = (int)std_unordered_map_Sl_CNTK_Variable_Sc_CNTK_ValuePtr_Sg____set_nullptr__(arg1,(CNTK::Variable const &)*arg2);
}
catch (const std::runtime_error &e) {
SWIG_exception(SWIG_RuntimeError,e.what());
}
catch (const std::invalid_argument &e) {
SWIG_exception(SWIG_ValueError,e.what());
}
catch (const std::logic_error &e) {
SWIG_exception(SWIG_RuntimeError,e.what());
}
catch (...) {
SWIG_exception(SWIG_UnknownError,"Runtime exception");
}
}
vresult = SWIG_From_int(static_cast< int >(result));
return vresult;
fail:
return Qnil;
}
|
#begin(*args) ⇒ Object
call-seq:
begin -> std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::iterator
Return an iterator to the beginning of the StdUMapVariableValue.
13527 13528 13529 13530 13531 13532 13533 13534 13535 13536 13537 13538 13539 13540 13541 13542 13543 13544 13545 13546 13547 13548 |
# File 'ext/cntk/cntk_wrap.cxx', line 13527
SWIGINTERN VALUE
_wrap_StdUMapVariableValue_begin(int argc, VALUE *argv, VALUE self) {
std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *arg1 = (std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
SwigValueWrapper< std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::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_mapT_CNTK__Variable_std__shared_ptrT_CNTK__Value_t_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_std__pairT_CNTK__Variable_const_std__shared_ptrT_CNTK__Value_t_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *","begin", 1, self ));
}
arg1 = reinterpret_cast< std::unordered_map< CNTK::Variable,CNTK::ValuePtr > * >(argp1);
result = (arg1)->begin();
vresult = SWIG_NewPointerObj((new std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::iterator(static_cast< const std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::iterator& >(result))), SWIGTYPE_p_std__unordered_mapT_CNTK__Variable_std__shared_ptrT_CNTK__Value_t_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_std__pairT_CNTK__Variable_const_std__shared_ptrT_CNTK__Value_t_t_t_t__iterator, SWIG_POINTER_OWN | 0 );
return vresult;
fail:
return Qnil;
}
|
#clear(*args) ⇒ Object
call-seq:
clear
Clear StdUMapVariableValue contents.
13593 13594 13595 13596 13597 13598 13599 13600 13601 13602 13603 13604 13605 13606 13607 13608 13609 13610 13611 |
# File 'ext/cntk/cntk_wrap.cxx', line 13593
SWIGINTERN VALUE
_wrap_StdUMapVariableValue_clear(int argc, VALUE *argv, VALUE self) {
std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *arg1 = (std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *) 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_mapT_CNTK__Variable_std__shared_ptrT_CNTK__Value_t_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_std__pairT_CNTK__Variable_const_std__shared_ptrT_CNTK__Value_t_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *","clear", 1, self ));
}
arg1 = reinterpret_cast< std::unordered_map< CNTK::Variable,CNTK::ValuePtr > * >(argp1);
(arg1)->clear();
return Qnil;
fail:
return Qnil;
}
|
#count(*args) ⇒ Object
13684 13685 13686 13687 13688 13689 13690 13691 13692 13693 13694 13695 13696 13697 13698 13699 13700 13701 13702 13703 13704 13705 13706 13707 13708 13709 13710 13711 13712 13713 13714 13715 13716 |
# File 'ext/cntk/cntk_wrap.cxx', line 13684
SWIGINTERN VALUE
_wrap_StdUMapVariableValue_count(int argc, VALUE *argv, VALUE self) {
std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *arg1 = (std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *) 0 ;
std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::key_type *arg2 = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
void *argp2 ;
int res2 = 0 ;
std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::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_mapT_CNTK__Variable_std__shared_ptrT_CNTK__Value_t_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_std__pairT_CNTK__Variable_const_std__shared_ptrT_CNTK__Value_t_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::unordered_map< CNTK::Variable,CNTK::ValuePtr > const *","count", 1, self ));
}
arg1 = reinterpret_cast< std::unordered_map< CNTK::Variable,CNTK::ValuePtr > * >(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_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::key_type const &","count", 2, argv[0] ));
}
if (!argp2) {
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::key_type const &","count", 2, argv[0]));
}
arg2 = reinterpret_cast< std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::key_type * >(argp2);
result = ((std::unordered_map< CNTK::Variable,CNTK::ValuePtr > const *)arg1)->count((std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::key_type const &)*arg2);
vresult = SWIG_From_size_t(static_cast< size_t >(result));
return vresult;
fail:
return Qnil;
}
|
#delete(*args) ⇒ Object
call-seq:
delete(key) -> VALUE
Delete a matching element.
12700 12701 12702 12703 12704 12705 12706 12707 12708 12709 12710 12711 12712 12713 12714 12715 12716 12717 12718 12719 12720 12721 12722 12723 12724 12725 12726 12727 12728 12729 12730 12731 12732 |
# File 'ext/cntk/cntk_wrap.cxx', line 12700
SWIGINTERN VALUE
_wrap_StdUMapVariableValue_delete(int argc, VALUE *argv, VALUE self) {
std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *arg1 = (std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *) 0 ;
std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::key_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_mapT_CNTK__Variable_std__shared_ptrT_CNTK__Value_t_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_std__pairT_CNTK__Variable_const_std__shared_ptrT_CNTK__Value_t_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *","__delete__", 1, self ));
}
arg1 = reinterpret_cast< std::unordered_map< CNTK::Variable,CNTK::ValuePtr > * >(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_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::key_type const &","__delete__", 2, argv[0] ));
}
if (!argp2) {
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::key_type const &","__delete__", 2, argv[0]));
}
arg2 = reinterpret_cast< std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::key_type * >(argp2);
result = (VALUE)std_unordered_map_Sl_CNTK_Variable_Sc_CNTK_ValuePtr_Sg____delete__(arg1,(CNTK::Variable const &)*arg2);
vresult = result;
return vresult;
fail:
return Qnil;
}
|
#dup(*args) ⇒ Object
call-seq:
dup -> StdUMapVariableValue
Create a duplicate of the class and unfreeze it if needed.
12667 12668 12669 12670 12671 12672 12673 12674 12675 12676 12677 12678 12679 12680 12681 12682 12683 12684 12685 12686 12687 12688 |
# File 'ext/cntk/cntk_wrap.cxx', line 12667
SWIGINTERN VALUE
_wrap_StdUMapVariableValue_dup(int argc, VALUE *argv, VALUE self) {
std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *arg1 = (std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value >,std::hash< CNTK::Variable >,std::equal_to< CNTK::Variable >,std::allocator< std::pair< CNTK::Variable const,std::shared_ptr< CNTK::Value > > > > *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_mapT_CNTK__Variable_std__shared_ptrT_CNTK__Value_t_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_std__pairT_CNTK__Variable_const_std__shared_ptrT_CNTK__Value_t_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *","dup", 1, self ));
}
arg1 = reinterpret_cast< std::unordered_map< CNTK::Variable,CNTK::ValuePtr > * >(argp1);
result = (std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value >,std::hash< CNTK::Variable >,std::equal_to< CNTK::Variable >,std::allocator< std::pair< CNTK::Variable const,std::shared_ptr< CNTK::Value > > > > *)std_unordered_map_Sl_CNTK_Variable_Sc_CNTK_ValuePtr_Sg__dup(arg1);
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__unordered_mapT_CNTK__Variable_std__shared_ptrT_CNTK__Value_t_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_std__pairT_CNTK__Variable_const_std__shared_ptrT_CNTK__Value_t_t_t_t, SWIG_POINTER_OWN | 0 );
return vresult;
fail:
return Qnil;
}
|
#each(*args) ⇒ Object
call-seq:
each -> StdUMapVariableValue
Iterate thru each element in the StdUMapVariableValue. A block must be provided.
12812 12813 12814 12815 12816 12817 12818 12819 12820 12821 12822 12823 12824 12825 12826 12827 12828 12829 12830 12831 12832 12833 |
# File 'ext/cntk/cntk_wrap.cxx', line 12812
SWIGINTERN VALUE
_wrap_StdUMapVariableValue_each(int argc, VALUE *argv, VALUE self) {
std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *arg1 = (std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value >,std::hash< CNTK::Variable >,std::equal_to< CNTK::Variable >,std::allocator< std::pair< CNTK::Variable const,std::shared_ptr< CNTK::Value > > > > *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_mapT_CNTK__Variable_std__shared_ptrT_CNTK__Value_t_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_std__pairT_CNTK__Variable_const_std__shared_ptrT_CNTK__Value_t_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *","each", 1, self ));
}
arg1 = reinterpret_cast< std::unordered_map< CNTK::Variable,CNTK::ValuePtr > * >(argp1);
result = (std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value >,std::hash< CNTK::Variable >,std::equal_to< CNTK::Variable >,std::allocator< std::pair< CNTK::Variable const,std::shared_ptr< CNTK::Value > > > > *)std_unordered_map_Sl_CNTK_Variable_Sc_CNTK_ValuePtr_Sg__each(arg1);
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__unordered_mapT_CNTK__Variable_std__shared_ptrT_CNTK__Value_t_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_std__pairT_CNTK__Variable_const_std__shared_ptrT_CNTK__Value_t_t_t_t, 0 | 0 );
return vresult;
fail:
return Qnil;
}
|
#each_key(*args) ⇒ Object
call-seq:
each_key -> StdUMapVariableValue
Iterate thru each key element in the StdUMapVariableValue. A block must be provided.
12918 12919 12920 12921 12922 12923 12924 12925 12926 12927 12928 12929 12930 12931 12932 12933 12934 12935 12936 12937 12938 12939 |
# File 'ext/cntk/cntk_wrap.cxx', line 12918
SWIGINTERN VALUE
_wrap_StdUMapVariableValue_each_key(int argc, VALUE *argv, VALUE self) {
std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *arg1 = (std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value >,std::hash< CNTK::Variable >,std::equal_to< CNTK::Variable >,std::allocator< std::pair< CNTK::Variable const,std::shared_ptr< CNTK::Value > > > > *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_mapT_CNTK__Variable_std__shared_ptrT_CNTK__Value_t_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_std__pairT_CNTK__Variable_const_std__shared_ptrT_CNTK__Value_t_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *","each_key", 1, self ));
}
arg1 = reinterpret_cast< std::unordered_map< CNTK::Variable,CNTK::ValuePtr > * >(argp1);
result = (std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value >,std::hash< CNTK::Variable >,std::equal_to< CNTK::Variable >,std::allocator< std::pair< CNTK::Variable const,std::shared_ptr< CNTK::Value > > > > *)std_unordered_map_Sl_CNTK_Variable_Sc_CNTK_ValuePtr_Sg__each_key(arg1);
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__unordered_mapT_CNTK__Variable_std__shared_ptrT_CNTK__Value_t_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_std__pairT_CNTK__Variable_const_std__shared_ptrT_CNTK__Value_t_t_t_t, 0 | 0 );
return vresult;
fail:
return Qnil;
}
|
#each_value(*args) ⇒ Object
call-seq:
each_value -> StdUMapVariableValue
Iterate thru each key element in the StdUMapVariableValue. A block must be provided.
12984 12985 12986 12987 12988 12989 12990 12991 12992 12993 12994 12995 12996 12997 12998 12999 13000 13001 13002 13003 13004 13005 |
# File 'ext/cntk/cntk_wrap.cxx', line 12984
SWIGINTERN VALUE
_wrap_StdUMapVariableValue_each_value(int argc, VALUE *argv, VALUE self) {
std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *arg1 = (std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value >,std::hash< CNTK::Variable >,std::equal_to< CNTK::Variable >,std::allocator< std::pair< CNTK::Variable const,std::shared_ptr< CNTK::Value > > > > *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_mapT_CNTK__Variable_std__shared_ptrT_CNTK__Value_t_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_std__pairT_CNTK__Variable_const_std__shared_ptrT_CNTK__Value_t_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *","each_value", 1, self ));
}
arg1 = reinterpret_cast< std::unordered_map< CNTK::Variable,CNTK::ValuePtr > * >(argp1);
result = (std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value >,std::hash< CNTK::Variable >,std::equal_to< CNTK::Variable >,std::allocator< std::pair< CNTK::Variable const,std::shared_ptr< CNTK::Value > > > > *)std_unordered_map_Sl_CNTK_Variable_Sc_CNTK_ValuePtr_Sg__each_value(arg1);
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__unordered_mapT_CNTK__Variable_std__shared_ptrT_CNTK__Value_t_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_std__pairT_CNTK__Variable_const_std__shared_ptrT_CNTK__Value_t_t_t_t, 0 | 0 );
return vresult;
fail:
return Qnil;
}
|
#empty?(*args) ⇒ Boolean
call-seq:
empty? -> bool
Check if the StdUMapVariableValue is empty or not.
13429 13430 13431 13432 13433 13434 13435 13436 13437 13438 13439 13440 13441 13442 13443 13444 13445 13446 13447 13448 13449 13450 |
# File 'ext/cntk/cntk_wrap.cxx', line 13429
SWIGINTERN VALUE
_wrap_StdUMapVariableValue_emptyq___(int argc, VALUE *argv, VALUE self) {
std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *arg1 = (std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *) 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_mapT_CNTK__Variable_std__shared_ptrT_CNTK__Value_t_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_std__pairT_CNTK__Variable_const_std__shared_ptrT_CNTK__Value_t_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::unordered_map< CNTK::Variable,CNTK::ValuePtr > const *","empty", 1, self ));
}
arg1 = reinterpret_cast< std::unordered_map< CNTK::Variable,CNTK::ValuePtr > * >(argp1);
result = (bool)((std::unordered_map< CNTK::Variable,CNTK::ValuePtr > const *)arg1)->empty();
vresult = SWIG_From_bool(static_cast< bool >(result));
return vresult;
fail:
return Qnil;
}
|
#end(*args) ⇒ Object
call-seq:
end -> std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::iterator
Return an iterator to past the end of the StdUMapVariableValue.
13560 13561 13562 13563 13564 13565 13566 13567 13568 13569 13570 13571 13572 13573 13574 13575 13576 13577 13578 13579 13580 13581 |
# File 'ext/cntk/cntk_wrap.cxx', line 13560
SWIGINTERN VALUE
_wrap_StdUMapVariableValue_end(int argc, VALUE *argv, VALUE self) {
std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *arg1 = (std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
SwigValueWrapper< std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::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_mapT_CNTK__Variable_std__shared_ptrT_CNTK__Value_t_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_std__pairT_CNTK__Variable_const_std__shared_ptrT_CNTK__Value_t_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *","end", 1, self ));
}
arg1 = reinterpret_cast< std::unordered_map< CNTK::Variable,CNTK::ValuePtr > * >(argp1);
result = (arg1)->end();
vresult = SWIG_NewPointerObj((new std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::iterator(static_cast< const std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::iterator& >(result))), SWIGTYPE_p_std__unordered_mapT_CNTK__Variable_std__shared_ptrT_CNTK__Value_t_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_std__pairT_CNTK__Variable_const_std__shared_ptrT_CNTK__Value_t_t_t_t__iterator, SWIG_POINTER_OWN | 0 );
return vresult;
fail:
return Qnil;
}
|
#entries(*args) ⇒ Object
13008 13009 13010 13011 13012 13013 13014 13015 13016 13017 13018 13019 13020 13021 13022 13023 13024 13025 13026 13027 13028 13029 |
# File 'ext/cntk/cntk_wrap.cxx', line 13008
SWIGINTERN VALUE
_wrap_StdUMapVariableValue_entries(int argc, VALUE *argv, VALUE self) {
std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *arg1 = (std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *) 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_mapT_CNTK__Variable_std__shared_ptrT_CNTK__Value_t_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_std__pairT_CNTK__Variable_const_std__shared_ptrT_CNTK__Value_t_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *","entries", 1, self ));
}
arg1 = reinterpret_cast< std::unordered_map< CNTK::Variable,CNTK::ValuePtr > * >(argp1);
result = (VALUE)std_unordered_map_Sl_CNTK_Variable_Sc_CNTK_ValuePtr_Sg__entries(arg1);
vresult = result;
return vresult;
fail:
return Qnil;
}
|
#erase(*args, self) ⇒ Object
call-seq:
erase(x) -> std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::size_type
erase(position)
erase(first, last)
Delete a portion of the StdUMapVariableValue.
13803 13804 13805 13806 13807 13808 13809 13810 13811 13812 13813 13814 13815 13816 13817 13818 13819 13820 13821 13822 13823 13824 13825 13826 13827 13828 13829 13830 13831 13832 13833 13834 13835 13836 13837 13838 13839 13840 13841 13842 13843 13844 13845 13846 13847 13848 13849 13850 13851 13852 13853 13854 13855 13856 13857 13858 13859 13860 13861 13862 13863 13864 13865 13866 |
# File 'ext/cntk/cntk_wrap.cxx', line 13803
SWIGINTERN VALUE _wrap_StdUMapVariableValue_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_map< CNTK::Variable,std::shared_ptr< CNTK::Value >,std::hash< CNTK::Variable >,std::equal_to< CNTK::Variable >,std::allocator< std::pair< CNTK::Variable const,std::shared_ptr< CNTK::Value > > > >**)(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_StdUMapVariableValue_erase__SWIG_0(nargs, args, self);
}
}
}
if (argc == 2) {
int _v;
int res = swig::asptr(argv[0], (std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value >,std::hash< CNTK::Variable >,std::equal_to< CNTK::Variable >,std::allocator< std::pair< CNTK::Variable const,std::shared_ptr< CNTK::Value > > > >**)(0));
_v = SWIG_CheckState(res);
if (_v) {
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_std__unordered_mapT_CNTK__Variable_std__shared_ptrT_CNTK__Value_t_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_std__pairT_CNTK__Variable_const_std__shared_ptrT_CNTK__Value_t_t_t_t__iterator, 0);
_v = SWIG_CheckState(res);
if (_v) {
return _wrap_StdUMapVariableValue_erase__SWIG_1(nargs, args, self);
}
}
}
if (argc == 3) {
int _v;
int res = swig::asptr(argv[0], (std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value >,std::hash< CNTK::Variable >,std::equal_to< CNTK::Variable >,std::allocator< std::pair< CNTK::Variable const,std::shared_ptr< CNTK::Value > > > >**)(0));
_v = SWIG_CheckState(res);
if (_v) {
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_std__unordered_mapT_CNTK__Variable_std__shared_ptrT_CNTK__Value_t_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_std__pairT_CNTK__Variable_const_std__shared_ptrT_CNTK__Value_t_t_t_t__iterator, 0);
_v = SWIG_CheckState(res);
if (_v) {
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_std__unordered_mapT_CNTK__Variable_std__shared_ptrT_CNTK__Value_t_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_std__pairT_CNTK__Variable_const_std__shared_ptrT_CNTK__Value_t_t_t_t__iterator, 0);
_v = SWIG_CheckState(res);
if (_v) {
return _wrap_StdUMapVariableValue_erase__SWIG_2(nargs, args, self);
}
}
}
}
fail:
Ruby_Format_OverloadedError( argc, 4, "StdUMapVariableValue.erase",
" std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::size_type StdUMapVariableValue.erase(std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::key_type const &x)\n"
" void StdUMapVariableValue.erase(std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::iterator position)\n"
" void StdUMapVariableValue.erase(std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::iterator first, std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::iterator last)\n");
return Qnil;
}
|
#find(*args) ⇒ Object
call-seq:
find(x) -> std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::iterator
Find an element in the class.
13878 13879 13880 13881 13882 13883 13884 13885 13886 13887 13888 13889 13890 13891 13892 13893 13894 13895 13896 13897 13898 13899 13900 13901 13902 13903 13904 13905 13906 13907 13908 13909 13910 |
# File 'ext/cntk/cntk_wrap.cxx', line 13878
SWIGINTERN VALUE
_wrap_StdUMapVariableValue_find(int argc, VALUE *argv, VALUE self) {
std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *arg1 = (std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *) 0 ;
std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::key_type *arg2 = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
void *argp2 ;
int res2 = 0 ;
SwigValueWrapper< std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::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_mapT_CNTK__Variable_std__shared_ptrT_CNTK__Value_t_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_std__pairT_CNTK__Variable_const_std__shared_ptrT_CNTK__Value_t_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *","find", 1, self ));
}
arg1 = reinterpret_cast< std::unordered_map< CNTK::Variable,CNTK::ValuePtr > * >(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_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::key_type const &","find", 2, argv[0] ));
}
if (!argp2) {
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::key_type const &","find", 2, argv[0]));
}
arg2 = reinterpret_cast< std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::key_type * >(argp2);
result = (arg1)->find((std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::key_type const &)*arg2);
vresult = SWIG_NewPointerObj((new std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::iterator(static_cast< const std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::iterator& >(result))), SWIGTYPE_p_std__unordered_mapT_CNTK__Variable_std__shared_ptrT_CNTK__Value_t_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_std__pairT_CNTK__Variable_const_std__shared_ptrT_CNTK__Value_t_t_t_t__iterator, SWIG_POINTER_OWN | 0 );
return vresult;
fail:
return Qnil;
}
|
#get_allocator(*args) ⇒ Object
13614 13615 13616 13617 13618 13619 13620 13621 13622 13623 13624 13625 13626 13627 13628 13629 13630 13631 13632 13633 13634 13635 |
# File 'ext/cntk/cntk_wrap.cxx', line 13614
SWIGINTERN VALUE
_wrap_StdUMapVariableValue_get_allocator(int argc, VALUE *argv, VALUE self) {
std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *arg1 = (std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
SwigValueWrapper< std::allocator< std::pair< CNTK::Variable const,std::shared_ptr< CNTK::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_mapT_CNTK__Variable_std__shared_ptrT_CNTK__Value_t_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_std__pairT_CNTK__Variable_const_std__shared_ptrT_CNTK__Value_t_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::unordered_map< CNTK::Variable,CNTK::ValuePtr > const *","get_allocator", 1, self ));
}
arg1 = reinterpret_cast< std::unordered_map< CNTK::Variable,CNTK::ValuePtr > * >(argp1);
result = ((std::unordered_map< CNTK::Variable,CNTK::ValuePtr > const *)arg1)->get_allocator();
vresult = SWIG_NewPointerObj((new std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::allocator_type(static_cast< const std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_std__pairT_CNTK__Variable_const_std__shared_ptrT_CNTK__Value_t_t_t, SWIG_POINTER_OWN | 0 );
return vresult;
fail:
return Qnil;
}
|
#has_key?(*args) ⇒ Boolean
12735 12736 12737 12738 12739 12740 12741 12742 12743 12744 12745 12746 12747 12748 12749 12750 12751 12752 12753 12754 12755 12756 12757 12758 12759 12760 12761 12762 12763 12764 12765 12766 12767 |
# File 'ext/cntk/cntk_wrap.cxx', line 12735
SWIGINTERN VALUE
_wrap_StdUMapVariableValue_has_keyq___(int argc, VALUE *argv, VALUE self) {
std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *arg1 = (std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *) 0 ;
std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::key_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_mapT_CNTK__Variable_std__shared_ptrT_CNTK__Value_t_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_std__pairT_CNTK__Variable_const_std__shared_ptrT_CNTK__Value_t_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::unordered_map< CNTK::Variable,CNTK::ValuePtr > const *","has_key", 1, self ));
}
arg1 = reinterpret_cast< std::unordered_map< CNTK::Variable,CNTK::ValuePtr > * >(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_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::key_type const &","has_key", 2, argv[0] ));
}
if (!argp2) {
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::key_type const &","has_key", 2, argv[0]));
}
arg2 = reinterpret_cast< std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::key_type * >(argp2);
result = (bool)std_unordered_map_Sl_CNTK_Variable_Sc_CNTK_ValuePtr_Sg__has_key((std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > > const *)arg1,(CNTK::Variable const &)*arg2);
vresult = SWIG_From_bool(static_cast< bool >(result));
return vresult;
fail:
return Qnil;
}
|
#include?(*args) ⇒ Boolean
13032 13033 13034 13035 13036 13037 13038 13039 13040 13041 13042 13043 13044 13045 13046 13047 13048 13049 13050 13051 13052 13053 13054 13055 13056 13057 13058 13059 13060 13061 13062 13063 13064 |
# File 'ext/cntk/cntk_wrap.cxx', line 13032
SWIGINTERN VALUE
_wrap_StdUMapVariableValue_includeq___(int argc, VALUE *argv, VALUE self) {
std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *arg1 = (std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *) 0 ;
std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::key_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_mapT_CNTK__Variable_std__shared_ptrT_CNTK__Value_t_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_std__pairT_CNTK__Variable_const_std__shared_ptrT_CNTK__Value_t_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *","__contains__", 1, self ));
}
arg1 = reinterpret_cast< std::unordered_map< CNTK::Variable,CNTK::ValuePtr > * >(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_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::key_type const &","__contains__", 2, argv[0] ));
}
if (!argp2) {
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::key_type const &","__contains__", 2, argv[0]));
}
arg2 = reinterpret_cast< std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::key_type * >(argp2);
result = (bool)std_unordered_map_Sl_CNTK_Variable_Sc_CNTK_ValuePtr_Sg____contains__(arg1,(CNTK::Variable const &)*arg2);
vresult = SWIG_From_bool(static_cast< bool >(result));
return vresult;
fail:
return Qnil;
}
|
#inspect(*args) ⇒ Object
call-seq:
inspect -> VALUE
Inspect class and its contents.
13239 13240 13241 13242 13243 13244 13245 13246 13247 13248 13249 13250 13251 13252 13253 13254 13255 13256 13257 13258 13259 13260 |
# File 'ext/cntk/cntk_wrap.cxx', line 13239
SWIGINTERN VALUE
_wrap_StdUMapVariableValue_inspect(int argc, VALUE *argv, VALUE self) {
std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *arg1 = (std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *) 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_mapT_CNTK__Variable_std__shared_ptrT_CNTK__Value_t_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_std__pairT_CNTK__Variable_const_std__shared_ptrT_CNTK__Value_t_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *","inspect", 1, self ));
}
arg1 = reinterpret_cast< std::unordered_map< CNTK::Variable,CNTK::ValuePtr > * >(argp1);
result = (VALUE)std_unordered_map_Sl_CNTK_Variable_Sc_CNTK_ValuePtr_Sg__inspect(arg1);
vresult = result;
return vresult;
fail:
return Qnil;
}
|
#key_iterator(*args) ⇒ Object
13067 13068 13069 13070 13071 13072 13073 13074 13075 13076 13077 13078 13079 13080 13081 13082 13083 13084 13085 13086 13087 13088 13089 13090 |
# File 'ext/cntk/cntk_wrap.cxx', line 13067
SWIGINTERN VALUE
_wrap_StdUMapVariableValue_key_iterator(int argc, VALUE *argv, VALUE self) {
std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *arg1 = (std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *) 0 ;
VALUE *arg2 = (VALUE *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
swig::ConstIterator *result = 0 ;
VALUE vresult = Qnil;
arg2 = &self;
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_mapT_CNTK__Variable_std__shared_ptrT_CNTK__Value_t_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_std__pairT_CNTK__Variable_const_std__shared_ptrT_CNTK__Value_t_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *","key_iterator", 1, self ));
}
arg1 = reinterpret_cast< std::unordered_map< CNTK::Variable,CNTK::ValuePtr > * >(argp1);
result = (swig::ConstIterator *)std_unordered_map_Sl_CNTK_Variable_Sc_CNTK_ValuePtr_Sg__key_iterator(arg1,arg2);
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__ConstIterator, SWIG_POINTER_OWN | 0 );
return vresult;
fail:
return Qnil;
}
|
#keys(*args) ⇒ Object
call-seq:
keys -> VALUE
Return an Array of key elements.
12779 12780 12781 12782 12783 12784 12785 12786 12787 12788 12789 12790 12791 12792 12793 12794 12795 12796 12797 12798 12799 12800 |
# File 'ext/cntk/cntk_wrap.cxx', line 12779
SWIGINTERN VALUE
_wrap_StdUMapVariableValue_keys(int argc, VALUE *argv, VALUE self) {
std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *arg1 = (std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *) 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_mapT_CNTK__Variable_std__shared_ptrT_CNTK__Value_t_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_std__pairT_CNTK__Variable_const_std__shared_ptrT_CNTK__Value_t_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *","keys", 1, self ));
}
arg1 = reinterpret_cast< std::unordered_map< CNTK::Variable,CNTK::ValuePtr > * >(argp1);
result = (VALUE)std_unordered_map_Sl_CNTK_Variable_Sc_CNTK_ValuePtr_Sg__keys(arg1);
vresult = result;
return vresult;
fail:
return Qnil;
}
|
#select(*args) ⇒ Object
call-seq:
select -> StdUMapVariableValue
Iterate thru each element in the StdUMapVariableValue and select those that match a condition. A block must be provided.
12845 12846 12847 12848 12849 12850 12851 12852 12853 12854 12855 12856 12857 12858 12859 12860 12861 12862 12863 12864 12865 12866 |
# File 'ext/cntk/cntk_wrap.cxx', line 12845
SWIGINTERN VALUE
_wrap_StdUMapVariableValue_select(int argc, VALUE *argv, VALUE self) {
std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *arg1 = (std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value >,std::hash< CNTK::Variable >,std::equal_to< CNTK::Variable >,std::allocator< std::pair< CNTK::Variable const,std::shared_ptr< CNTK::Value > > > > *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_mapT_CNTK__Variable_std__shared_ptrT_CNTK__Value_t_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_std__pairT_CNTK__Variable_const_std__shared_ptrT_CNTK__Value_t_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *","select", 1, self ));
}
arg1 = reinterpret_cast< std::unordered_map< CNTK::Variable,CNTK::ValuePtr > * >(argp1);
result = (std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value >,std::hash< CNTK::Variable >,std::equal_to< CNTK::Variable >,std::allocator< std::pair< CNTK::Variable const,std::shared_ptr< CNTK::Value > > > > *)std_unordered_map_Sl_CNTK_Variable_Sc_CNTK_ValuePtr_Sg__select(arg1);
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__unordered_mapT_CNTK__Variable_std__shared_ptrT_CNTK__Value_t_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_std__pairT_CNTK__Variable_const_std__shared_ptrT_CNTK__Value_t_t_t_t, SWIG_POINTER_OWN | 0 );
return vresult;
fail:
return Qnil;
}
|
#size(*args) ⇒ Object
call-seq:
size -> std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::size_type
Size or Length of the StdUMapVariableValue.
13462 13463 13464 13465 13466 13467 13468 13469 13470 13471 13472 13473 13474 13475 13476 13477 13478 13479 13480 13481 13482 13483 |
# File 'ext/cntk/cntk_wrap.cxx', line 13462
SWIGINTERN VALUE
_wrap_StdUMapVariableValue_size(int argc, VALUE *argv, VALUE self) {
std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *arg1 = (std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
std::unordered_map< CNTK::Variable,std::shared_ptr< CNTK::Value > >::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_mapT_CNTK__Variable_std__shared_ptrT_CNTK__Value_t_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_std__pairT_CNTK__Variable_const_std__shared_ptrT_CNTK__Value_t_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::unordered_map< CNTK::Variable,CNTK::ValuePtr > const *","size", 1, self ));
}
arg1 = reinterpret_cast< std::unordered_map< CNTK::Variable,CNTK::ValuePtr > * >(argp1);
result = ((std::unordered_map< CNTK::Variable,CNTK::ValuePtr > const *)arg1)->size();
vresult = SWIG_From_size_t(static_cast< size_t >(result));
return vresult;
fail:
return Qnil;
}
|
#swap(*args) ⇒ Object
13486 13487 13488 13489 13490 13491 13492 13493 13494 13495 13496 13497 13498 13499 13500 13501 13502 13503 13504 13505 13506 13507 13508 13509 13510 13511 13512 13513 13514 13515 |
# File 'ext/cntk/cntk_wrap.cxx', line 13486
SWIGINTERN VALUE
_wrap_StdUMapVariableValue_swap(int argc, VALUE *argv, VALUE self) {
std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *arg1 = (std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *) 0 ;
std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *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_mapT_CNTK__Variable_std__shared_ptrT_CNTK__Value_t_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_std__pairT_CNTK__Variable_const_std__shared_ptrT_CNTK__Value_t_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *","swap", 1, self ));
}
arg1 = reinterpret_cast< std::unordered_map< CNTK::Variable,CNTK::ValuePtr > * >(argp1);
res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_std__unordered_mapT_CNTK__Variable_std__shared_ptrT_CNTK__Value_t_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_std__pairT_CNTK__Variable_const_std__shared_ptrT_CNTK__Value_t_t_t_t, 0 );
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::unordered_map< CNTK::Variable,CNTK::ValuePtr > &","swap", 2, argv[0] ));
}
if (!argp2) {
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::unordered_map< CNTK::Variable,CNTK::ValuePtr > &","swap", 2, argv[0]));
}
arg2 = reinterpret_cast< std::unordered_map< CNTK::Variable,CNTK::ValuePtr > * >(argp2);
(arg1)->swap(*arg2);
return Qnil;
fail:
return Qnil;
}
|
#to_a(*args) ⇒ Object
call-seq:
to_a -> VALUE
Convert StdUMapVariableValue to an Array.
13272 13273 13274 13275 13276 13277 13278 13279 13280 13281 13282 13283 13284 13285 13286 13287 13288 13289 13290 13291 13292 13293 |
# File 'ext/cntk/cntk_wrap.cxx', line 13272
SWIGINTERN VALUE
_wrap_StdUMapVariableValue_to_a(int argc, VALUE *argv, VALUE self) {
std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *arg1 = (std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *) 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_mapT_CNTK__Variable_std__shared_ptrT_CNTK__Value_t_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_std__pairT_CNTK__Variable_const_std__shared_ptrT_CNTK__Value_t_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *","to_a", 1, self ));
}
arg1 = reinterpret_cast< std::unordered_map< CNTK::Variable,CNTK::ValuePtr > * >(argp1);
result = (VALUE)std_unordered_map_Sl_CNTK_Variable_Sc_CNTK_ValuePtr_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.
13305 13306 13307 13308 13309 13310 13311 13312 13313 13314 13315 13316 13317 13318 13319 13320 13321 13322 13323 13324 13325 13326 |
# File 'ext/cntk/cntk_wrap.cxx', line 13305
SWIGINTERN VALUE
_wrap_StdUMapVariableValue_to_s(int argc, VALUE *argv, VALUE self) {
std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *arg1 = (std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *) 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_mapT_CNTK__Variable_std__shared_ptrT_CNTK__Value_t_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_std__pairT_CNTK__Variable_const_std__shared_ptrT_CNTK__Value_t_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *","to_s", 1, self ));
}
arg1 = reinterpret_cast< std::unordered_map< CNTK::Variable,CNTK::ValuePtr > * >(argp1);
result = (VALUE)std_unordered_map_Sl_CNTK_Variable_Sc_CNTK_ValuePtr_Sg__to_s(arg1);
vresult = result;
return vresult;
fail:
return Qnil;
}
|
#value_iterator(*args) ⇒ Object
13093 13094 13095 13096 13097 13098 13099 13100 13101 13102 13103 13104 13105 13106 13107 13108 13109 13110 13111 13112 13113 13114 13115 13116 |
# File 'ext/cntk/cntk_wrap.cxx', line 13093
SWIGINTERN VALUE
_wrap_StdUMapVariableValue_value_iterator(int argc, VALUE *argv, VALUE self) {
std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *arg1 = (std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *) 0 ;
VALUE *arg2 = (VALUE *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
swig::ConstIterator *result = 0 ;
VALUE vresult = Qnil;
arg2 = &self;
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_mapT_CNTK__Variable_std__shared_ptrT_CNTK__Value_t_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_std__pairT_CNTK__Variable_const_std__shared_ptrT_CNTK__Value_t_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *","value_iterator", 1, self ));
}
arg1 = reinterpret_cast< std::unordered_map< CNTK::Variable,CNTK::ValuePtr > * >(argp1);
result = (swig::ConstIterator *)std_unordered_map_Sl_CNTK_Variable_Sc_CNTK_ValuePtr_Sg__value_iterator(arg1,arg2);
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__ConstIterator, SWIG_POINTER_OWN | 0 );
return vresult;
fail:
return Qnil;
}
|
#values(*args) ⇒ Object
call-seq:
values -> VALUE
Return an Array of value elements.
12951 12952 12953 12954 12955 12956 12957 12958 12959 12960 12961 12962 12963 12964 12965 12966 12967 12968 12969 12970 12971 12972 |
# File 'ext/cntk/cntk_wrap.cxx', line 12951
SWIGINTERN VALUE
_wrap_StdUMapVariableValue_values(int argc, VALUE *argv, VALUE self) {
std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *arg1 = (std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *) 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_mapT_CNTK__Variable_std__shared_ptrT_CNTK__Value_t_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_std__pairT_CNTK__Variable_const_std__shared_ptrT_CNTK__Value_t_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *","values", 1, self ));
}
arg1 = reinterpret_cast< std::unordered_map< CNTK::Variable,CNTK::ValuePtr > * >(argp1);
result = (VALUE)std_unordered_map_Sl_CNTK_Variable_Sc_CNTK_ValuePtr_Sg__values(arg1);
vresult = result;
return vresult;
fail:
return Qnil;
}
|
#values_at(*args) ⇒ Object
call-seq:
values_at(argc) -> VALUE
Return an Array of value elements matching the conditions.
12878 12879 12880 12881 12882 12883 12884 12885 12886 12887 12888 12889 12890 12891 12892 12893 12894 12895 12896 12897 12898 12899 12900 12901 12902 12903 12904 12905 12906 |
# File 'ext/cntk/cntk_wrap.cxx', line 12878
SWIGINTERN VALUE
_wrap_StdUMapVariableValue_values_at(int argc, VALUE *argv, VALUE self) {
std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *arg1 = (std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *) 0 ;
int arg2 ;
VALUE *arg3 = (VALUE *) 0 ;
void *arg4 = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
VALUE result;
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__unordered_mapT_CNTK__Variable_std__shared_ptrT_CNTK__Value_t_std__hashT_CNTK__Variable_t_std__equal_toT_CNTK__Variable_t_std__allocatorT_std__pairT_CNTK__Variable_const_std__shared_ptrT_CNTK__Value_t_t_t_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::unordered_map< CNTK::Variable,CNTK::ValuePtr > *","values_at", 1, self ));
}
arg1 = reinterpret_cast< std::unordered_map< CNTK::Variable,CNTK::ValuePtr > * >(argp1);
{
arg2 = argc;
arg3 = argv;
}
result = (VALUE)std_unordered_map_Sl_CNTK_Variable_Sc_CNTK_ValuePtr_Sg__values_at(arg1,arg2,arg3,arg4);
vresult = result;
return vresult;
fail:
return Qnil;
}
|