0
我在Rcpp
中定義了NumericMatrix
A.第一列存儲行號(整數值)。如何將第一列更改爲IntegerVector
?我如何將NumericMatrix類型的行更改爲Rcpp中的IntegerVector?
我在Rcpp
中定義了NumericMatrix
A.第一列存儲行號(整數值)。如何將第一列更改爲IntegerVector
?我如何將NumericMatrix類型的行更改爲Rcpp中的IntegerVector?
你不能。
NumericMatrix
也是一個NumericVector
,它的數據blob中不能包含不同類型的數據。
也許你需要的是把IntegerVector
在A.attr("somewhere")
。
請包括您嘗試過的一些代碼,您嘗試過的,失敗的等等...... –