我有一个函数,它接受一个指向特征矩阵的指针。我需要将这个矩阵分割成几个部分,并将矩阵的一部分传递给函数。我想避免复制数据,所以我想用指针传递数据。我分割一个矩阵,例如:// some operations with the matrixMatrixXd*B = &A(seq(2, 4), all);
最后一行无效。我怎样才能得
谢谢你的暗示。invalid argument type 'typename ConstSelfAdjointViewReturnType.... to unary expression' const MatrixXd& A 下面是一个示例:
// this version doesn't compi
我希望将double数组映射到现有的MatrixXd结构。到目前为止,我已经成功地将特征矩阵映射到一个简单的数组,但我找不到返回的方法。void foo(MatrixXd matrix, int n){
// map the input matrix to an arrayMap<MatrixXd>(arrayd, n, n) = matrix;
/