aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc/snippets/Cwise_product.cpp
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2008-07-26 20:40:29 +0000
committerGravatar Gael Guennebaud <g.gael@free.fr>2008-07-26 20:40:29 +0000
commite77ccf29288a8536e11dc5ea4fadcf775e8a2b8a (patch)
tree23710b6b882d17c2939562c700c1299af0f26ff3 /doc/snippets/Cwise_product.cpp
parent2940617e6f0abaf1d09b3f054687a0adac788505 (diff)
* Rewrite the triangular solver so that we can take advantage of our efficient matrix-vector products:
=> up to 6 times faster ! * Added DirectAccessBit to Part * Added an exemple of a cwise operator * Renamed perpendicular() => someOrthogonal() (geometry module) * Fix a weired bug in ei_constant_functor: the default copy constructor did not copy the imaginary part when the single member of the class is a complex...
Diffstat (limited to 'doc/snippets/Cwise_product.cpp')
-rw-r--r--doc/snippets/Cwise_product.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/snippets/Cwise_product.cpp b/doc/snippets/Cwise_product.cpp
new file mode 100644
index 000000000..460ed6700
--- /dev/null
+++ b/doc/snippets/Cwise_product.cpp
@@ -0,0 +1,4 @@
+Matrix3i a = Matrix3i::Random(), b = Matrix3i::Random();
+Matrix3i c = a.cwise() * b;
+cout << "a:\n" << a << "\nb:\n" << b << "\nc:\n" << c << endl;
+