mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
final fixes and updates for alpha3
This commit is contained in:
@@ -268,10 +268,13 @@ template<typename Scalar, typename Derived>
|
||||
Block<Derived> MatrixBase<Scalar, Derived>
|
||||
::corner(CornerType type, int cRows, int cCols)
|
||||
{
|
||||
if(type == TopLeft) return Block<Derived>(ref(), 0, 0, cRows, cCols);
|
||||
else if(type == TopRight) return Block<Derived>(ref(), 0, cols() - cCols, cRows, cCols);
|
||||
else if(type == BottomLeft) return Block<Derived>(ref(), rows() - cRows, 0, cRows, cCols);
|
||||
else if(type == BottomRight)
|
||||
if(type == TopLeft)
|
||||
return Block<Derived>(ref(), 0, 0, cRows, cCols);
|
||||
else if(type == TopRight)
|
||||
return Block<Derived>(ref(), 0, cols() - cCols, cRows, cCols);
|
||||
else if(type == BottomLeft)
|
||||
return Block<Derived>(ref(), rows() - cRows, 0, cRows, cCols);
|
||||
else
|
||||
return Block<Derived>(ref(), rows() - cRows, cols() - cCols, cRows, cCols);
|
||||
}
|
||||
|
||||
@@ -280,10 +283,13 @@ template<typename Scalar, typename Derived>
|
||||
const Block<Derived> MatrixBase<Scalar, Derived>
|
||||
::corner(CornerType type, int cRows, int cCols) const
|
||||
{
|
||||
if(type == TopLeft) return Block<Derived>(ref(), 0, 0, cRows, cCols);
|
||||
else if(type == TopRight) return Block<Derived>(ref(), 0, cols() - cCols, cRows, cCols);
|
||||
else if(type == BottomLeft) return Block<Derived>(ref(), rows() - cRows, 0, cRows, cCols);
|
||||
else if(type == BottomRight)
|
||||
if(type == TopLeft)
|
||||
return Block<Derived>(ref(), 0, 0, cRows, cCols);
|
||||
else if(type == TopRight)
|
||||
return Block<Derived>(ref(), 0, cols() - cCols, cRows, cCols);
|
||||
else if(type == BottomLeft)
|
||||
return Block<Derived>(ref(), rows() - cRows, 0, cRows, cCols);
|
||||
else
|
||||
return Block<Derived>(ref(), rows() - cRows, cols() - cCols, cRows, cCols);
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
* \include class_FixedBlock.cpp
|
||||
* Output: \verbinclude class_FixedBlock.out
|
||||
*
|
||||
* \sa MatrixBase::fixedBlock(int,int), MatrixBase::fixedBlock(int), class Block
|
||||
* \sa MatrixBase::fixedBlock(int,int), class Block
|
||||
*/
|
||||
template<typename MatrixType, int BlockRows, int BlockCols> class FixedBlock
|
||||
: public MatrixBase<typename MatrixType::Scalar,
|
||||
@@ -107,7 +107,7 @@ template<typename MatrixType, int BlockRows, int BlockCols> class FixedBlock
|
||||
* Example: \include MatrixBase_fixedBlock_int_int.cpp
|
||||
* Output: \verbinclude MatrixBase_fixedBlock_int_int.out
|
||||
*
|
||||
* \sa class FixedBlock, fixedBlock(int), block(int,int,int,int)
|
||||
* \sa class FixedBlock, block(int,int,int,int)
|
||||
*/
|
||||
template<typename Scalar, typename Derived>
|
||||
template<int BlockRows, int BlockCols>
|
||||
|
||||
Reference in New Issue
Block a user