第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

使用SWIG連接C ++和Python

使用SWIG連接C ++和Python

拉風(fēng)的咖菲貓 2021-03-18 14:11:46
我嘗試使用SWIG擴(kuò)展Matrix類以創(chuàng)建python接口。我使用了官方的Docu碼。但是我得到了一個(gè)完全荒謬的錯(cuò)誤消息。在聲明我的行類的地方似乎并不重要。我總是在編譯時(shí)收到此錯(cuò)誤。SWIG有什么問(wèn)題?錯(cuò)誤:  ANPyNetCPUPYTHON_wrap.cxx: In function ‘ANN::F2DArray ANN_F2DArray___getitem__(ANN::F2DArray*, int)’:  ANPyNetCPUPYTHON_wrap.cxx:5192: error: ‘Grid2dRow’ was not declared in this scope  ANPyNetCPUPYTHON_wrap.cxx:5192: error: expected `;' before ‘r’  ANPyNetCPUPYTHON_wrap.cxx:5193: error: ‘r’ was not declared in this scope代碼:  %{  #include <AN2DArray.h>  %}  %include <AN2DArray.h>    %inline %{      struct Grid2dRow {          ANN::F2DArray *g;   // Grid          int    y;      // Row number          // These functions are used by Python to access sequence types (lists, tuples, ...)          float __getitem__(int x) {              return g->GetValue(x, y);          }          void __setitem__(int x, float val) {              g->SetValue(x, y, val);          }      };  %}  %extend ANN::F2DArray   {      ANN::F2DArray __getitem__(int y) {          Grid2dRow r;          r.g = self;          r.y = y;          return r;      }  };
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 214 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)