我有一个参数为const arma::imat & A
的函数。除了其他事情,我想计算输入矩阵A的决定因素。因此我做了
int det = arma::det(A);
但在编译期间我收到以下错误:
error: no matching function for call to 'det'
int det = arma::det(A);
我试过谷歌但没有找到能解决这个问题的东西。请问可能有什么问题?
答案 0 :(得分:3)
阅读文档,我认为您必须使用conv_to<type>::from
才能调用det
定义的imat::mat
。