I am currently working with Eigen in c++ and there is a few things about initialization that I couldn't find answers for.
Is it possible to initialize a Dynamic matrix using another dynamic matrix of the same size:
MyClass::MyClass(Eigen::Matrix<T, Eigen::Dynamic, Eigen Dynamic> sourceMatrix)
{
Eigen::Matrix<T, Eigen::Dynamic, Eigen Dynamic> destMatrix(sourceMatrix)
}
The above seems to compile but my project is currently filled with other compile errors so I can't test it and I would like to be sure what it will do before using it. Will this make destMatrix a deep copy of sourceMatrix ? Or a shallow copy?
Is it any different than doing:
MyClass::MyClass(Eigen::Matrix<T, Eigen::Dynamic, Eigen Dynamic> sourceMatrix)
{
Eigen::Matrix<T, Eigen::Dynamic, Eigen Dynamic> destMatrix(sourceMatrix.data())
}