final fixes and updates for alpha3

This commit is contained in:
Benoit Jacob
2008-01-13 23:38:48 +00:00
parent 57d7b7d97b
commit 183bf54d27
7 changed files with 58 additions and 48 deletions

View File

@@ -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);
}

View File

@@ -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>