-2
我正在將C++代碼轉換爲Matlab。不過,我在將地圖轉換爲matlab語法時遇到困難。從C++ map容器到matlab
使用地圖C++的說明如下:
using kp_idx_t = size_t;
using img_idx_t = size_t;
std::map<kp_idx_t, std::map<img_idx_t, kp_idx_t>> kp_matches;
kp_idx_t& kp_match_idx(size_t kp_idx, size_t img_idx) { return kp_matches[kp_idx][img_idx]; };
bool kp_match_exist(size_t kp_idx, size_t img_idx) { return kp_matches[kp_idx].count(img_idx) > 0; };
如何將它們轉換爲matlab的?
https://www.mathworks.com/help/matlab/ref/containers.map-class.html –