This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen
View | Details | Raw Unified | Return to bug 579 | Differences between
and this patch

Collapse All | Expand All

(-)a/Eigen/src/plugins/BlockMethods.h (+28 lines)
Lines 540-555 inline Block<Derived, BlockRows, BlockCo Link Here
540
540
541
/** This is the const version of block<>(Index, Index). */
541
/** This is the const version of block<>(Index, Index). */
542
template<int BlockRows, int BlockCols>
542
template<int BlockRows, int BlockCols>
543
inline const Block<const Derived, BlockRows, BlockCols> block(Index startRow, Index startCol) const
543
inline const Block<const Derived, BlockRows, BlockCols> block(Index startRow, Index startCol) const
544
{
544
{
545
  return Block<const Derived, BlockRows, BlockCols>(derived(), startRow, startCol);
545
  return Block<const Derived, BlockRows, BlockCols>(derived(), startRow, startCol);
546
}
546
}
547
547
548
/** \returns a partial fixed-size expression of a block in *this.
549
  *
550
  * The template parameters \a BlockRows and \a BlockCols are the number of
551
  * rows and columns in the block. One of them is supposed to be \a Dynamic.
552
  *
553
  * \param startRow the first row in the block
554
  * \param startCol the first column in the block
555
  * \param blockRows the number of rows in the block
556
  * \param blockCols the number of columns in the block
557
  *
558
  * \note since block is a templated member, the keyword template has to be used
559
  * if the matrix type is also a template parameter: \code m.template block<3,Dynamic>(1,1,3,n); \endcode
560
  *
561
  * \sa class Block, block(Index,Index,Index,Index), block<>(Index,Index)
562
  */
563
template<int BlockRows, int BlockCols>
564
inline Block<Derived, BlockRows, BlockCols> block(Index startRow, Index startCol, Index numRows, Index numCols)
565
{
566
  return Block<Derived, BlockRows, BlockCols>(derived(), startRow, startCol, numRows, numCols);
567
}
568
569
/** This is the const version of block<>(Index, Index, Index, Index). */
570
template<int BlockRows, int BlockCols>
571
inline const Block<const Derived, BlockRows, BlockCols> block(Index startRow, Index startCol, Index numRows, Index numCols) const
572
{
573
  return Block<const Derived, BlockRows, BlockCols>(derived(), startRow, startCol, numRows, numCols);
574
}
575
548
/** \returns an expression of the \a i-th column of *this. Note that the numbering starts at 0.
576
/** \returns an expression of the \a i-th column of *this. Note that the numbering starts at 0.
549
  *
577
  *
550
  * Example: \include MatrixBase_col.cpp
578
  * Example: \include MatrixBase_col.cpp
551
  * Output: \verbinclude MatrixBase_col.out
579
  * Output: \verbinclude MatrixBase_col.out
552
  *
580
  *
553
  * \sa row(), class Block */
581
  * \sa row(), class Block */
554
inline ColXpr col(Index i)
582
inline ColXpr col(Index i)
555
{
583
{

Return to bug 579