mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
add adjointInPlace() and add documentation warnings on adjoint() and transpose() about aliasing effects.
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License and a copy of the GNU General Public License along with
|
||||
// Eigen. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#define EIGEN_NO_ASSERTION_CHECKING
|
||||
#include "main.h"
|
||||
|
||||
template<typename MatrixType> void adjoint(const MatrixType& m)
|
||||
@@ -100,6 +100,14 @@ template<typename MatrixType> void adjoint(const MatrixType& m)
|
||||
VERIFY_IS_APPROX(m3,m1.transpose());
|
||||
m3.transposeInPlace();
|
||||
VERIFY_IS_APPROX(m3,m1);
|
||||
|
||||
// check inplace adjoint
|
||||
m3 = m1;
|
||||
m3.adjointInPlace();
|
||||
VERIFY_IS_APPROX(m3,m1.adjoint());
|
||||
m3.transposeInPlace();
|
||||
VERIFY_IS_APPROX(m3,m1.conjugate());
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user