aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc/examples/class_Block.cpp
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2008-03-10 17:23:11 +0000
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2008-03-10 17:23:11 +0000
commit01572b9f54e769a7d1bb3d5073c264a5fbc7ce42 (patch)
treeea9b9ef0469040e8b8ae0805f77d726c319dfeac /doc/examples/class_Block.cpp
parent9d9d81ad71a52c33ba4db9f8a6059d435d279316 (diff)
big change: MatrixBase only takes one template parameter "Derived", the
template parameter "Scalar" is removed. This is achieved by introducting a template <typename Derived> struct Scalar to achieve a forward-declaration of the Scalar typedefs.
Diffstat (limited to 'doc/examples/class_Block.cpp')
-rw-r--r--doc/examples/class_Block.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/examples/class_Block.cpp b/doc/examples/class_Block.cpp
index 26f9666cb..7a4c60a42 100644
--- a/doc/examples/class_Block.cpp
+++ b/doc/examples/class_Block.cpp
@@ -2,16 +2,16 @@
USING_PART_OF_NAMESPACE_EIGEN
using namespace std;
-template<typename Scalar, typename Derived>
+template<typename Derived>
Eigen::Block<Derived>
-topLeftCorner(MatrixBase<Scalar, Derived>& m, int rows, int cols)
+topLeftCorner(MatrixBase<Derived>& m, int rows, int cols)
{
return Eigen::Block<Derived>(m.asArg(), 0, 0, rows, cols);
}
-template<typename Scalar, typename Derived>
+template<typename Derived>
const Eigen::Block<Derived>
-topLeftCorner(const MatrixBase<Scalar, Derived>& m, int rows, int cols)
+topLeftCorner(const MatrixBase<Derived>& m, int rows, int cols)
{
return Eigen::Block<Derived>(m.asArg(), 0, 0, rows, cols);
}