Class: CNTK::DictionaryValue
- Inherits:
-
Object
- Object
- CNTK::DictionaryValue
- Defined in:
- lib/cntk/dictionary.rb,
ext/cntk/cntk_wrap.cxx
Class Method Summary collapse
Instance Method Summary collapse
-
#==(*args) ⇒ Object
call-seq: ==(other) -> bool.
- #has_value(*args) ⇒ Object
- #initialize(*args, self) ⇒ Object constructor
- #save(*args) ⇒ Object
- #value ⇒ Object
- #value_axis__(*args) ⇒ Object
- #value_bool__(*args) ⇒ Object
- #value_dict__(*args) ⇒ Object
- #value_double__(*args) ⇒ Object
- #value_float__(*args) ⇒ Object
- #value_int__(*args) ⇒ Object
- #value_ndarrayview__(*args) ⇒ Object
- #value_size_t__(*args) ⇒ Object
- #value_type(*args) ⇒ Object
- #value_vec_dict_value__(*args) ⇒ Object
- #value_wstring__(*args) ⇒ Object
Constructor Details
#initialize(*args, self) ⇒ Object
22625 22626 22627 22628 22629 22630 22631 22632 22633 22634 22635 22636 22637 22638 22639 22640 22641 22642 22643 22644 22645 22646 22647 22648 22649 22650 22651 22652 22653 22654 22655 22656 22657 22658 22659 22660 22661 22662 22663 22664 22665 22666 22667 22668 22669 22670 22671 22672 22673 22674 22675 22676 22677 22678 22679 22680 22681 22682 22683 22684 22685 22686 22687 22688 22689 22690 22691 22692 22693 22694 22695 22696 22697 22698 22699 22700 22701 22702 22703 22704 22705 22706 22707 22708 22709 22710 22711 22712 22713 22714 22715 22716 22717 22718 22719 22720 22721 22722 22723 22724 22725 |
# File 'ext/cntk/cntk_wrap.cxx', line 22625
SWIGINTERN VALUE _wrap_new_DictionaryValue(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_DictionaryValue__SWIG_0(nargs, args, self);
}
if (argc == 1) {
int _v;
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CNTK__Axis, 0);
_v = SWIG_CheckState(res);
if (_v) {
return _wrap_new_DictionaryValue__SWIG_5(nargs, args, self);
}
}
if (argc == 1) {
int _v;
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CNTK__Dictionary, 0);
_v = SWIG_CheckState(res);
if (_v) {
return _wrap_new_DictionaryValue__SWIG_7(nargs, args, self);
}
}
if (argc == 1) {
int _v;
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CNTK__DictionaryValue, 0);
_v = SWIG_CheckState(res);
if (_v) {
return _wrap_new_DictionaryValue__SWIG_8(nargs, args, self);
}
}
if (argc == 1) {
int _v;
{
int res = SWIG_AsVal_size_t(argv[0], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
return _wrap_new_DictionaryValue__SWIG_2(nargs, args, self);
}
}
if (argc == 1) {
int _v;
{
int res = SWIG_AsVal_double(argv[0], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
return _wrap_new_DictionaryValue__SWIG_3(nargs, args, self);
}
}
if (argc == 1) {
int _v;
int res = SWIG_AsPtr_std_wstring(argv[0], (std::wstring**)(0));
_v = SWIG_CheckState(res);
if (_v) {
return _wrap_new_DictionaryValue__SWIG_6(nargs, args, self);
}
}
if (argc == 1) {
int _v;
int res = swig::asptr(argv[0], (std::vector< CNTK::DictionaryValue,std::allocator< CNTK::DictionaryValue > >**)(0));
_v = SWIG_CheckState(res);
if (_v) {
return _wrap_new_DictionaryValue__SWIG_4(nargs, args, self);
}
}
if (argc == 1) {
int _v;
{
int res = SWIG_AsVal_bool(argv[0], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
return _wrap_new_DictionaryValue__SWIG_1(nargs, args, self);
}
}
fail:
Ruby_Format_OverloadedError( argc, 1, "DictionaryValue.new",
" DictionaryValue.new()\n"
" DictionaryValue.new(bool)\n"
" DictionaryValue.new(size_t)\n"
" DictionaryValue.new(double)\n"
" DictionaryValue.new(std::vector< CNTK::DictionaryValue,std::allocator< CNTK::DictionaryValue > > const &)\n"
" DictionaryValue.new(CNTK::Axis const &)\n"
" DictionaryValue.new(std::wstring const &)\n"
" DictionaryValue.new(CNTK::Dictionary const &)\n"
" DictionaryValue.new(CNTK::DictionaryValue const &)\n");
return Qnil;
}
|
Class Method Details
.create(val) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/cntk/dictionary.rb', line 5 def self.create(val) case val when Hash new Dictionary.create(val) when Array v = StdVectorDictionaryValue.new val.each_with_index{|e, idx| v[idx] = create(e) } new( v ) else new val end end |
.load(*args) ⇒ Object
22860 22861 22862 22863 22864 22865 22866 22867 22868 22869 22870 22871 22872 22873 22874 22875 22876 22877 22878 22879 22880 22881 22882 22883 22884 22885 22886 22887 22888 22889 22890 22891 22892 22893 22894 22895 22896 22897 22898 22899 22900 22901 22902 22903 22904 |
# File 'ext/cntk/cntk_wrap.cxx', line 22860
SWIGINTERN VALUE
_wrap_DictionaryValue_load(int argc, VALUE *argv, VALUE self) {
std::wstring *arg1 = 0 ;
int res1 = SWIG_OLDOBJ ;
CNTK::DictionaryValue result;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
{
std::wstring *ptr = (std::wstring *)0;
res1 = SWIG_AsPtr_std_wstring(argv[0], &ptr);
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::wstring const &","CNTK::DictionaryValue::Load", 1, argv[0] ));
}
if (!ptr) {
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::wstring const &","CNTK::DictionaryValue::Load", 1, argv[0]));
}
arg1 = ptr;
}
{
try {
result = CNTK::DictionaryValue::Load((std::wstring const &)*arg1);
}
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_NewPointerObj((new CNTK::DictionaryValue(static_cast< const CNTK::DictionaryValue& >(result))), SWIGTYPE_p_CNTK__DictionaryValue, SWIG_POINTER_OWN | 0 );
if (SWIG_IsNewObj(res1)) delete arg1;
return vresult;
fail:
if (SWIG_IsNewObj(res1)) delete arg1;
return Qnil;
}
|
.type_name(*args) ⇒ Object
22907 22908 22909 22910 22911 22912 22913 22914 22915 22916 22917 22918 22919 22920 22921 22922 22923 22924 22925 22926 22927 22928 22929 22930 22931 22932 22933 22934 22935 22936 22937 22938 22939 22940 22941 22942 22943 22944 |
# File 'ext/cntk/cntk_wrap.cxx', line 22907
SWIGINTERN VALUE
_wrap_DictionaryValue_type_name(int argc, VALUE *argv, VALUE self) {
CNTK::DictionaryValue::Type arg1 ;
int val1 ;
int ecode1 = 0 ;
char *result = 0 ;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
ecode1 = SWIG_AsVal_int(argv[0], &val1);
if (!SWIG_IsOK(ecode1)) {
SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "CNTK::DictionaryValue::Type","CNTK::DictionaryValue::TypeName", 1, argv[0] ));
}
arg1 = static_cast< CNTK::DictionaryValue::Type >(val1);
{
try {
result = (char *)CNTK::DictionaryValue::TypeName(arg1);
}
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_FromCharPtr((const char *)result);
return vresult;
fail:
return Qnil;
}
|
Instance Method Details
#==(*args) ⇒ Object
call-seq:
==(other) -> bool
Equality comparison operator.
22956 22957 22958 22959 22960 22961 22962 22963 22964 22965 22966 22967 22968 22969 22970 22971 22972 22973 22974 22975 22976 22977 22978 22979 22980 22981 22982 22983 22984 22985 22986 22987 22988 22989 22990 22991 22992 22993 22994 22995 22996 22997 22998 22999 23000 23001 23002 23003 23004 |
# File 'ext/cntk/cntk_wrap.cxx', line 22956
SWIGINTERN VALUE
_wrap_DictionaryValue___eq__(int argc, VALUE *argv, VALUE self) {
CNTK::DictionaryValue *arg1 = (CNTK::DictionaryValue *) 0 ;
CNTK::DictionaryValue *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_CNTK__DictionaryValue, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CNTK::DictionaryValue *","__eq__", 1, self ));
}
arg1 = reinterpret_cast< CNTK::DictionaryValue * >(argp1);
res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_CNTK__DictionaryValue, 0 );
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "CNTK::DictionaryValue const &","__eq__", 2, argv[0] ));
}
if (!argp2) {
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "CNTK::DictionaryValue const &","__eq__", 2, argv[0]));
}
arg2 = reinterpret_cast< CNTK::DictionaryValue * >(argp2);
{
try {
result = (bool)CNTK_DictionaryValue___eq__(arg1,(CNTK::DictionaryValue 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_bool(static_cast< bool >(result));
return vresult;
fail:
return Qnil;
}
|
#has_value(*args) ⇒ Object
22728 22729 22730 22731 22732 22733 22734 22735 22736 22737 22738 22739 22740 22741 22742 22743 22744 22745 22746 22747 22748 22749 22750 22751 22752 22753 22754 22755 22756 22757 22758 22759 22760 22761 22762 22763 22764 22765 |
# File 'ext/cntk/cntk_wrap.cxx', line 22728
SWIGINTERN VALUE
_wrap_DictionaryValue_has_value(int argc, VALUE *argv, VALUE self) {
CNTK::DictionaryValue *arg1 = (CNTK::DictionaryValue *) 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_CNTK__DictionaryValue, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CNTK::DictionaryValue *","HasValue", 1, self ));
}
arg1 = reinterpret_cast< CNTK::DictionaryValue * >(argp1);
{
try {
result = (bool)(arg1)->HasValue();
}
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_bool(static_cast< bool >(result));
return vresult;
fail:
return Qnil;
}
|
#save(*args) ⇒ Object
22808 22809 22810 22811 22812 22813 22814 22815 22816 22817 22818 22819 22820 22821 22822 22823 22824 22825 22826 22827 22828 22829 22830 22831 22832 22833 22834 22835 22836 22837 22838 22839 22840 22841 22842 22843 22844 22845 22846 22847 22848 22849 22850 22851 22852 22853 22854 22855 22856 22857 |
# File 'ext/cntk/cntk_wrap.cxx', line 22808
SWIGINTERN VALUE
_wrap_DictionaryValue_save(int argc, VALUE *argv, VALUE self) {
CNTK::DictionaryValue *arg1 = (CNTK::DictionaryValue *) 0 ;
std::wstring *arg2 = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
int res2 = SWIG_OLDOBJ ;
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_CNTK__DictionaryValue, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CNTK::DictionaryValue *","Save", 1, self ));
}
arg1 = reinterpret_cast< CNTK::DictionaryValue * >(argp1);
{
std::wstring *ptr = (std::wstring *)0;
res2 = SWIG_AsPtr_std_wstring(argv[0], &ptr);
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "std::wstring const &","Save", 2, argv[0] ));
}
if (!ptr) {
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::wstring const &","Save", 2, argv[0]));
}
arg2 = ptr;
}
{
try {
(arg1)->Save((std::wstring 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");
}
}
if (SWIG_IsNewObj(res2)) delete arg2;
return Qnil;
fail:
if (SWIG_IsNewObj(res2)) delete arg2;
return Qnil;
}
|
#value ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/cntk/dictionary.rb', line 20 def value case value_type when Type_Bool value_bool__ when Type_Int value_int__ when Type_SizeT value_size_t__ when Type_Float value_float__ when Type_Double value_double__ when Type_String value_string__ when Type_NDShape value_ndshape__ when Type_Axis value_axis__ when Type_Vector value_vec_dict_value__ when Type_Dictionary value_dict__ when Type_NDArrayView value_ndarrayview__ else raise "unknown type" end end |
#value_axis__(*args) ⇒ Object
23207 23208 23209 23210 23211 23212 23213 23214 23215 23216 23217 23218 23219 23220 23221 23222 23223 23224 23225 23226 23227 23228 23229 23230 23231 23232 23233 23234 23235 23236 23237 23238 23239 23240 23241 23242 23243 23244 |
# File 'ext/cntk/cntk_wrap.cxx', line 23207
SWIGINTERN VALUE
_wrap_DictionaryValue_value_axis__(int argc, VALUE *argv, VALUE self) {
CNTK::DictionaryValue *arg1 = (CNTK::DictionaryValue *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
CNTK::Axis *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_CNTK__DictionaryValue, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CNTK::DictionaryValue *","Value_axis__", 1, self ));
}
arg1 = reinterpret_cast< CNTK::DictionaryValue * >(argp1);
{
try {
result = (CNTK::Axis *) &CNTK_DictionaryValue_Value_axis__(arg1);
}
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_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CNTK__Axis, 0 | 0 );
return vresult;
fail:
return Qnil;
}
|
#value_bool__(*args) ⇒ Object
23007 23008 23009 23010 23011 23012 23013 23014 23015 23016 23017 23018 23019 23020 23021 23022 23023 23024 23025 23026 23027 23028 23029 23030 23031 23032 23033 23034 23035 23036 23037 23038 23039 23040 23041 23042 23043 23044 |
# File 'ext/cntk/cntk_wrap.cxx', line 23007
SWIGINTERN VALUE
_wrap_DictionaryValue_value_bool__(int argc, VALUE *argv, VALUE self) {
CNTK::DictionaryValue *arg1 = (CNTK::DictionaryValue *) 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_CNTK__DictionaryValue, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CNTK::DictionaryValue *","Value_bool__", 1, self ));
}
arg1 = reinterpret_cast< CNTK::DictionaryValue * >(argp1);
{
try {
result = (bool)CNTK_DictionaryValue_Value_bool__(arg1);
}
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_bool(static_cast< bool >(result));
return vresult;
fail:
return Qnil;
}
|
#value_dict__(*args) ⇒ Object
23327 23328 23329 23330 23331 23332 23333 23334 23335 23336 23337 23338 23339 23340 23341 23342 23343 23344 23345 23346 23347 23348 23349 23350 23351 23352 23353 23354 23355 23356 23357 23358 23359 23360 23361 23362 23363 23364 |
# File 'ext/cntk/cntk_wrap.cxx', line 23327
SWIGINTERN VALUE
_wrap_DictionaryValue_value_dict__(int argc, VALUE *argv, VALUE self) {
CNTK::DictionaryValue *arg1 = (CNTK::DictionaryValue *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
CNTK::Dictionary *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_CNTK__DictionaryValue, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CNTK::DictionaryValue *","Value_dict__", 1, self ));
}
arg1 = reinterpret_cast< CNTK::DictionaryValue * >(argp1);
{
try {
result = (CNTK::Dictionary *) &CNTK_DictionaryValue_Value_dict__(arg1);
}
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_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CNTK__Dictionary, 0 | 0 );
return vresult;
fail:
return Qnil;
}
|
#value_double__(*args) ⇒ Object
23167 23168 23169 23170 23171 23172 23173 23174 23175 23176 23177 23178 23179 23180 23181 23182 23183 23184 23185 23186 23187 23188 23189 23190 23191 23192 23193 23194 23195 23196 23197 23198 23199 23200 23201 23202 23203 23204 |
# File 'ext/cntk/cntk_wrap.cxx', line 23167
SWIGINTERN VALUE
_wrap_DictionaryValue_value_double__(int argc, VALUE *argv, VALUE self) {
CNTK::DictionaryValue *arg1 = (CNTK::DictionaryValue *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
double 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_CNTK__DictionaryValue, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CNTK::DictionaryValue *","Value_double__", 1, self ));
}
arg1 = reinterpret_cast< CNTK::DictionaryValue * >(argp1);
{
try {
result = (double)CNTK_DictionaryValue_Value_double__(arg1);
}
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_double(static_cast< double >(result));
return vresult;
fail:
return Qnil;
}
|
#value_float__(*args) ⇒ Object
23127 23128 23129 23130 23131 23132 23133 23134 23135 23136 23137 23138 23139 23140 23141 23142 23143 23144 23145 23146 23147 23148 23149 23150 23151 23152 23153 23154 23155 23156 23157 23158 23159 23160 23161 23162 23163 23164 |
# File 'ext/cntk/cntk_wrap.cxx', line 23127
SWIGINTERN VALUE
_wrap_DictionaryValue_value_float__(int argc, VALUE *argv, VALUE self) {
CNTK::DictionaryValue *arg1 = (CNTK::DictionaryValue *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
float 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_CNTK__DictionaryValue, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CNTK::DictionaryValue *","Value_float__", 1, self ));
}
arg1 = reinterpret_cast< CNTK::DictionaryValue * >(argp1);
{
try {
result = (float)CNTK_DictionaryValue_Value_float__(arg1);
}
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_float(static_cast< float >(result));
return vresult;
fail:
return Qnil;
}
|
#value_int__(*args) ⇒ Object
23047 23048 23049 23050 23051 23052 23053 23054 23055 23056 23057 23058 23059 23060 23061 23062 23063 23064 23065 23066 23067 23068 23069 23070 23071 23072 23073 23074 23075 23076 23077 23078 23079 23080 23081 23082 23083 23084 |
# File 'ext/cntk/cntk_wrap.cxx', line 23047
SWIGINTERN VALUE
_wrap_DictionaryValue_value_int__(int argc, VALUE *argv, VALUE self) {
CNTK::DictionaryValue *arg1 = (CNTK::DictionaryValue *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
int 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_CNTK__DictionaryValue, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CNTK::DictionaryValue *","Value_int__", 1, self ));
}
arg1 = reinterpret_cast< CNTK::DictionaryValue * >(argp1);
{
try {
result = (int)CNTK_DictionaryValue_Value_int__(arg1);
}
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;
}
|
#value_ndarrayview__(*args) ⇒ Object
23367 23368 23369 23370 23371 23372 23373 23374 23375 23376 23377 23378 23379 23380 23381 23382 23383 23384 23385 23386 23387 23388 23389 23390 23391 23392 23393 23394 23395 23396 23397 23398 23399 23400 23401 23402 23403 23404 23405 23406 23407 |
# File 'ext/cntk/cntk_wrap.cxx', line 23367
SWIGINTERN VALUE
_wrap_DictionaryValue_value_ndarrayview__(int argc, VALUE *argv, VALUE self) {
CNTK::DictionaryValue *arg1 = (CNTK::DictionaryValue *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
CNTK::NDArrayView *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_CNTK__DictionaryValue, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CNTK::DictionaryValue *","Value_ndarrayview__", 1, self ));
}
arg1 = reinterpret_cast< CNTK::DictionaryValue * >(argp1);
{
try {
result = (CNTK::NDArrayView *) &CNTK_DictionaryValue_Value_ndarrayview__(arg1);
}
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");
}
}
{
std::shared_ptr< CNTK::NDArrayView > *smartresult = new std::shared_ptr< CNTK::NDArrayView >(result SWIG_NO_NULL_DELETER_0);
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_CNTK__NDArrayView_t, SWIG_POINTER_OWN);
}
return vresult;
fail:
return Qnil;
}
|
#value_size_t__(*args) ⇒ Object
23087 23088 23089 23090 23091 23092 23093 23094 23095 23096 23097 23098 23099 23100 23101 23102 23103 23104 23105 23106 23107 23108 23109 23110 23111 23112 23113 23114 23115 23116 23117 23118 23119 23120 23121 23122 23123 23124 |
# File 'ext/cntk/cntk_wrap.cxx', line 23087
SWIGINTERN VALUE
_wrap_DictionaryValue_value_size_t__(int argc, VALUE *argv, VALUE self) {
CNTK::DictionaryValue *arg1 = (CNTK::DictionaryValue *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
size_t 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_CNTK__DictionaryValue, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CNTK::DictionaryValue *","Value_size_t__", 1, self ));
}
arg1 = reinterpret_cast< CNTK::DictionaryValue * >(argp1);
{
try {
result = CNTK_DictionaryValue_Value_size_t__(arg1);
}
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_size_t(static_cast< size_t >(result));
return vresult;
fail:
return Qnil;
}
|
#value_type(*args) ⇒ Object
22768 22769 22770 22771 22772 22773 22774 22775 22776 22777 22778 22779 22780 22781 22782 22783 22784 22785 22786 22787 22788 22789 22790 22791 22792 22793 22794 22795 22796 22797 22798 22799 22800 22801 22802 22803 22804 22805 |
# File 'ext/cntk/cntk_wrap.cxx', line 22768
SWIGINTERN VALUE
_wrap_DictionaryValue_value_type(int argc, VALUE *argv, VALUE self) {
CNTK::DictionaryValue *arg1 = (CNTK::DictionaryValue *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
enum CNTK::DictionaryValue::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_CNTK__DictionaryValue, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CNTK::DictionaryValue *","ValueType", 1, self ));
}
arg1 = reinterpret_cast< CNTK::DictionaryValue * >(argp1);
{
try {
result = (enum CNTK::DictionaryValue::Type)(arg1)->ValueType();
}
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;
}
|
#value_vec_dict_value__(*args) ⇒ Object
23287 23288 23289 23290 23291 23292 23293 23294 23295 23296 23297 23298 23299 23300 23301 23302 23303 23304 23305 23306 23307 23308 23309 23310 23311 23312 23313 23314 23315 23316 23317 23318 23319 23320 23321 23322 23323 23324 |
# File 'ext/cntk/cntk_wrap.cxx', line 23287
SWIGINTERN VALUE
_wrap_DictionaryValue_value_vec_dict_value__(int argc, VALUE *argv, VALUE self) {
CNTK::DictionaryValue *arg1 = (CNTK::DictionaryValue *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
std::vector< CNTK::DictionaryValue,std::allocator< CNTK::DictionaryValue > > *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_CNTK__DictionaryValue, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CNTK::DictionaryValue *","Value_vec_dict_value__", 1, self ));
}
arg1 = reinterpret_cast< CNTK::DictionaryValue * >(argp1);
{
try {
result = (std::vector< CNTK::DictionaryValue,std::allocator< CNTK::DictionaryValue > > *) &CNTK_DictionaryValue_Value_vec_dict_value__(arg1);
}
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_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_CNTK__DictionaryValue_std__allocatorT_CNTK__DictionaryValue_t_t, 0 | 0 );
return vresult;
fail:
return Qnil;
}
|
#value_wstring__(*args) ⇒ Object
23247 23248 23249 23250 23251 23252 23253 23254 23255 23256 23257 23258 23259 23260 23261 23262 23263 23264 23265 23266 23267 23268 23269 23270 23271 23272 23273 23274 23275 23276 23277 23278 23279 23280 23281 23282 23283 23284 |
# File 'ext/cntk/cntk_wrap.cxx', line 23247
SWIGINTERN VALUE
_wrap_DictionaryValue_value_wstring__(int argc, VALUE *argv, VALUE self) {
CNTK::DictionaryValue *arg1 = (CNTK::DictionaryValue *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
std::wstring *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_CNTK__DictionaryValue, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CNTK::DictionaryValue *","Value_wstring__", 1, self ));
}
arg1 = reinterpret_cast< CNTK::DictionaryValue * >(argp1);
{
try {
result = (std::wstring *) &CNTK_DictionaryValue_Value_wstring__(arg1);
}
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_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__wstring, 0 | 0 );
return vresult;
fail:
return Qnil;
}
|