From 3b94436d2fc7d8f6716b056ed544acecf256c4fe Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Tue, 24 Jun 2008 15:13:00 +0000 Subject: * vectorize dot product, copying code from sum. * make the conj functor vectorizable: it is just identity in real case, and complex doesn't use the vectorized path anyway. * fix bug in Block: a 3x1 block in a 4x4 matrix (all fixed-size) should not be vectorizable, since in fixed-size we are assuming the size to be a multiple of packet size. (Or would you prefer Vector3d to be flagged "packetaccess" even though no packet access is possible on vectors of that type?) * rename: isOrtho for vectors ---> isOrthogonal isOrtho for matrices ---> isUnitary * add normalize() * reimplement normalized with quotient1 functor --- doc/snippets/MatrixBase_isOrthogonal.cpp | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 doc/snippets/MatrixBase_isOrthogonal.cpp (limited to 'doc/snippets/MatrixBase_isOrthogonal.cpp') diff --git a/doc/snippets/MatrixBase_isOrthogonal.cpp b/doc/snippets/MatrixBase_isOrthogonal.cpp new file mode 100644 index 000000000..b22af066c --- /dev/null +++ b/doc/snippets/MatrixBase_isOrthogonal.cpp @@ -0,0 +1,6 @@ +Vector3d v(1,0,0); +Vector3d w(1e-4,0,1); +cout << "Here's the vector v:" << endl << v << endl; +cout << "Here's the vector w:" << endl << w << endl; +cout << "v.isOrthogonal(w) returns: " << v.isOrthogonal(w) << endl; +cout << "v.isOrthogonal(w,1e-3) returns: " << v.isOrthogonal(w,1e-3) << endl; -- cgit v1.2.3