aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/adjoint.cpp
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2009-03-31 13:55:40 +0000
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2009-03-31 13:55:40 +0000
commitbf596d0b3ab42afeb69c7343068103615792a4fb (patch)
treebe2ad8de02097867ef09660d5567f63a45f88e9d /test/adjoint.cpp
parenta1ba995f05dfbaf763dc271f246a4bfcb2f694c3 (diff)
add adjointInPlace() and add documentation warnings on adjoint() and transpose() about aliasing effects.
Diffstat (limited to 'test/adjoint.cpp')
-rw-r--r--test/adjoint.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/adjoint.cpp b/test/adjoint.cpp
index f0c321057..d219d8fe6 100644
--- a/test/adjoint.cpp
+++ b/test/adjoint.cpp
@@ -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());
+
}