aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/Core/Block.h
diff options
context:
space:
mode:
Diffstat (limited to 'Eigen/Core/Block.h')
-rw-r--r--Eigen/Core/Block.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/Eigen/Core/Block.h b/Eigen/Core/Block.h
index 54a93b40f..7dbd14e5c 100644
--- a/Eigen/Core/Block.h
+++ b/Eigen/Core/Block.h
@@ -26,6 +26,28 @@
#ifndef EIGEN_BLOCK_H
#define EIGEN_BLOCK_H
+/** \class Block
+ *
+ * \brief Expression of a fixed-size block
+ *
+ * \param MatrixType the type of the object in which we are taking a block
+ * \param BlockRows the number of rows of the block we are taking
+ * \param BlockCols the number of columns of the block we are taking
+ *
+ * This class represents an expression of a fixed-size block. It is the return
+ * type of MatrixBase::block() and most of the time this is the only way it
+ * is used.
+ *
+ * However, if you want to directly maniputate fixed-size block expressions,
+ * for instance if you want to write a function returning such an expression, you
+ * will need to use this class.
+ *
+ * Here is an example illustrating this:
+ * \include class_Block.cpp
+ * Output: \verbinclude class_Block.out
+ *
+ * \sa MatrixBase::block(), class DynBlock
+ */
template<typename MatrixType, int BlockRows, int BlockCols> class Block
: public MatrixBase<typename MatrixType::Scalar,
Block<MatrixType, BlockRows, BlockCols> >
@@ -71,6 +93,18 @@ template<typename MatrixType, int BlockRows, int BlockCols> class Block
const int m_startRow, m_startCol;
};
+/** \returns a fixed-size expression of a block in *this.
+ *
+ * \param blockRows the number of rows in the block
+ * \param blockCols the number of columns in the block
+ * \param startRow the first row in the block
+ * \param startCol the first column in the block
+ *
+ * Example: \include MatrixBase_block.cpp
+ * Output: \verbinclude MatrixBase_block.out
+ *
+ * \sa class Block, dynBlock()
+ */
template<typename Scalar, typename Derived>
template<int BlockRows, int BlockCols>
Block<Derived, BlockRows, BlockCols> MatrixBase<Scalar, Derived>