Mapeando array de volta para uma matriz Eigen existente

Eu quero mapear uma matriz de dupla para uma estrutura MatrixXd existente. Até agora eu consegui mapear a matriz Eigen para uma matriz simples, mas não consigo encontrar o caminho para fazer isso de volta.

void foo(MatrixXd matrix, int n){

 double arrayd = new double[n*n];
 // map the input matrix to an array
 Map<MatrixXd>(arrayd, n, n) = matrix;  

  //do something with the array 
             .......
// map array back to the existing matrix

}

questionAnswers(2)

yourAnswerToTheQuestion