Go to the source code of this file.
Classes | |
struct | ConstNColsBlockXpr< N > |
struct | ConstNRowsBlockXpr< N > |
struct | NColsBlockXpr< N > |
struct | NRowsBlockXpr< N > |
Typedefs | |
typedef Block< Derived, internal::traits< Derived > ::RowsAtCompileTime, Dynamic,!IsRowMajor > | ColsBlockXpr |
typedef Block< Derived, internal::traits< Derived > ::RowsAtCompileTime, 1,!IsRowMajor > | ColXpr |
typedef const Block< const Derived, internal::traits < Derived >::RowsAtCompileTime, Dynamic,!IsRowMajor > | ConstColsBlockXpr |
typedef const Block< const Derived, internal::traits < Derived >::RowsAtCompileTime, 1,!IsRowMajor > | ConstColXpr |
typedef const Block< const Derived, Dynamic, internal::traits< Derived > ::ColsAtCompileTime, IsRowMajor > | ConstRowsBlockXpr |
typedef const Block< const Derived, 1, internal::traits < Derived >::ColsAtCompileTime, IsRowMajor > | ConstRowXpr |
typedef Block< Derived, Dynamic, internal::traits < Derived >::ColsAtCompileTime, IsRowMajor > | RowsBlockXpr |
typedef Block< Derived, 1, internal::traits< Derived > ::ColsAtCompileTime, IsRowMajor > | RowXpr |
Functions | |
Block< Derived > | block (Index startRow, Index startCol, Index blockRows, Index blockCols) |
template<int BlockRows, int BlockCols> | |
Block< Derived, BlockRows, BlockCols > | block (Index startRow, Index startCol) |
Block< Derived > | bottomLeftCorner (Index cRows, Index cCols) |
template<int CRows, int CCols> | |
Block< Derived, CRows, CCols > | bottomLeftCorner () |
Block< Derived > | bottomRightCorner (Index cRows, Index cCols) |
template<int CRows, int CCols> | |
Block< Derived, CRows, CCols > | bottomRightCorner () |
RowsBlockXpr | bottomRows (Index n) |
template<int N> | |
NRowsBlockXpr< N >::Type | bottomRows () |
ColXpr | col (Index i) |
ColsBlockXpr | leftCols (Index n) |
template<int N> | |
NColsBlockXpr< N >::Type | leftCols () |
ColsBlockXpr | middleCols (Index startCol, Index numCols) |
template<int N> | |
NColsBlockXpr< N >::Type | middleCols (Index startCol) |
RowsBlockXpr | middleRows (Index startRow, Index numRows) |
template<int N> | |
NRowsBlockXpr< N >::Type | middleRows (Index startRow) |
ColsBlockXpr | rightCols (Index n) |
template<int N> | |
NColsBlockXpr< N >::Type | rightCols () |
RowXpr | row (Index i) |
Block< Derived > | topLeftCorner (Index cRows, Index cCols) |
template<int CRows, int CCols> | |
Block< Derived, CRows, CCols > | topLeftCorner () |
Block< Derived > | topRightCorner (Index cRows, Index cCols) |
template<int CRows, int CCols> | |
Block< Derived, CRows, CCols > | topRightCorner () |
RowsBlockXpr | topRows (Index n) |
template<int N> | |
NRowsBlockXpr< N >::Type | topRows () |
typedef Block<Derived, internal::traits<Derived>::RowsAtCompileTime, Dynamic, !IsRowMajor> ColsBlockXpr |
Definition at line 38 of file BlockMethods.h.
Definition at line 32 of file BlockMethods.h.
typedef const Block<const Derived, internal::traits<Derived>::RowsAtCompileTime, Dynamic, !IsRowMajor> ConstColsBlockXpr |
Definition at line 39 of file BlockMethods.h.
typedef const Block<const Derived, internal::traits<Derived>::RowsAtCompileTime, 1, !IsRowMajor> ConstColXpr |
Definition at line 33 of file BlockMethods.h.
typedef const Block<const Derived, Dynamic, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> ConstRowsBlockXpr |
Definition at line 42 of file BlockMethods.h.
typedef const Block<const Derived, 1, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> ConstRowXpr |
Definition at line 36 of file BlockMethods.h.
typedef Block<Derived, Dynamic, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> RowsBlockXpr |
Definition at line 41 of file BlockMethods.h.
Definition at line 35 of file BlockMethods.h.
const Block< const Derived > block | ( | Index | startRow, |
Index | startCol, | ||
Index | blockRows, | ||
Index | blockCols | ||
) | [inline] |
startRow | the first row in the block |
startCol | the first column in the block |
blockRows | the number of rows in the block |
blockCols | the number of columns in the block |
Example:
Matrix4i m = Matrix4i::Random(); cout << "Here is the matrix m:" << endl << m << endl; cout << "Here is m.block(1, 1, 2, 2):" << endl << m.block(1, 1, 2, 2) << endl; m.block(1, 1, 2, 2).setZero(); cout << "Now the matrix m is:" << endl << m << endl;
Output:
This is the const version of block(Index,Index,Index,Index).
Definition at line 69 of file BlockMethods.h.
const Block< const Derived, BlockRows, BlockCols > block | ( | Index | startRow, |
Index | startCol | ||
) | [inline] |
The template parameters BlockRows and BlockCols are the number of rows and columns in the block.
startRow | the first row in the block |
startCol | the first column in the block |
Example:
Matrix4i m = Matrix4i::Random(); cout << "Here is the matrix m:" << endl << m << endl; cout << "Here is m.block<2,2>(1,1):" << endl << m.block<2,2>(1,1) << endl; m.block<2,2>(1,1).setZero(); cout << "Now the matrix m is:" << endl << m << endl;
Output:
m.template block<3,3>(1,1);
This is the const version of block<>(Index, Index).
Definition at line 549 of file BlockMethods.h.
const Block< const Derived > bottomLeftCorner | ( | Index | cRows, |
Index | cCols | ||
) | [inline] |
cRows | the number of rows in the corner |
cCols | the number of columns in the corner |
Example:
Matrix4i m = Matrix4i::Random(); cout << "Here is the matrix m:" << endl << m << endl; cout << "Here is m.bottomLeftCorner(2, 2):" << endl; cout << m.bottomLeftCorner(2, 2) << endl; m.bottomLeftCorner(2, 2).setZero(); cout << "Now the matrix m is:" << endl << m << endl;
Output:
This is the const version of bottomLeftCorner(Index, Index).
Definition at line 229 of file BlockMethods.h.
const Block< const Derived, CRows, CCols > bottomLeftCorner | ( | ) | [inline] |
The template parameters CRows and CCols are the number of rows and columns in the corner.
Example:
Matrix4i m = Matrix4i::Random(); cout << "Here is the matrix m:" << endl << m << endl; cout << "Here is m.bottomLeftCorner<2,2>():" << endl; cout << m.bottomLeftCorner<2,2>() << endl; m.bottomLeftCorner<2,2>().setZero(); cout << "Now the matrix m is:" << endl << m << endl;
Output:
This is the const version of bottomLeftCorner<int, int>().
Definition at line 250 of file BlockMethods.h.
const Block< const Derived > bottomRightCorner | ( | Index | cRows, |
Index | cCols | ||
) | [inline] |
cRows | the number of rows in the corner |
cCols | the number of columns in the corner |
Example:
Matrix4i m = Matrix4i::Random(); cout << "Here is the matrix m:" << endl << m << endl; cout << "Here is m.bottomRightCorner(2, 2):" << endl; cout << m.bottomRightCorner(2, 2) << endl; m.bottomRightCorner(2, 2).setZero(); cout << "Now the matrix m is:" << endl << m << endl;
Output:
This is the const version of bottomRightCorner(Index, Index).
Definition at line 184 of file BlockMethods.h.
const Block< const Derived, CRows, CCols > bottomRightCorner | ( | ) | [inline] |
The template parameters CRows and CCols are the number of rows and columns in the corner.
Example:
Matrix4i m = Matrix4i::Random(); cout << "Here is the matrix m:" << endl << m << endl; cout << "Here is m.bottomRightCorner<2,2>():" << endl; cout << m.bottomRightCorner<2,2>() << endl; m.bottomRightCorner<2,2>().setZero(); cout << "Now the matrix m is:" << endl << m << endl;
Output:
This is the const version of bottomRightCorner<int, int>().
Definition at line 205 of file BlockMethods.h.
ConstRowsBlockXpr bottomRows | ( | Index | n | ) | [inline] |
n | the number of rows in the block |
Example:
Array44i a = Array44i::Random(); cout << "Here is the array a:" << endl << a << endl; cout << "Here is a.bottomRows(2):" << endl; cout << a.bottomRows(2) << endl; a.bottomRows(2).setZero(); cout << "Now the array a is:" << endl << a << endl;
Output:
This is the const version of bottomRows(Index).
Definition at line 317 of file BlockMethods.h.
ConstNRowsBlockXpr< N >::Type bottomRows | ( | ) | [inline] |
N | the number of rows in the block |
Example:
Array44i a = Array44i::Random(); cout << "Here is the array a:" << endl << a << endl; cout << "Here is a.bottomRows<2>():" << endl; cout << a.bottomRows<2>() << endl; a.bottomRows<2>().setZero(); cout << "Now the array a is:" << endl << a << endl;
Output:
This is the const version of bottomRows<int>().
Definition at line 338 of file BlockMethods.h.
ConstColXpr col | ( | Index | i | ) | [inline] |
ConstColsBlockXpr leftCols | ( | Index | n | ) | [inline] |
n | the number of columns in the block |
Example:
Array44i a = Array44i::Random(); cout << "Here is the array a:" << endl << a << endl; cout << "Here is a.leftCols(2):" << endl; cout << a.leftCols(2) << endl; a.leftCols(2).setZero(); cout << "Now the array a is:" << endl << a << endl;
Output:
This is the const version of leftCols(Index).
Definition at line 407 of file BlockMethods.h.
ConstNColsBlockXpr< N >::Type leftCols | ( | ) | [inline] |
N | the number of columns in the block |
Example:
Array44i a = Array44i::Random(); cout << "Here is the array a:" << endl << a << endl; cout << "Here is a.leftCols<2>():" << endl; cout << a.leftCols<2>() << endl; a.leftCols<2>().setZero(); cout << "Now the array a is:" << endl << a << endl;
Output:
This is the const version of leftCols<int>().
Definition at line 428 of file BlockMethods.h.
ConstColsBlockXpr middleCols | ( | Index | startCol, |
Index | numCols | ||
) | [inline] |
startCol | the index of the first column in the block |
numCols | the number of columns in the block |
Example:
#include <Eigen/Core> #include <iostream> using namespace Eigen; using namespace std; int main(void) { int const N = 5; MatrixXi A(N,N); A.setRandom(); cout << "A =\n" << A << '\n' << endl; cout << "A(1..3,:) =\n" << A.middleCols(1,3) << endl; return 0; }
Output:
This is the const version of middleCols(Index,Index).
Definition at line 496 of file BlockMethods.h.
ConstNColsBlockXpr< N >::Type middleCols | ( | Index | startCol | ) | [inline] |
N | the number of columns in the block |
startCol | the index of the first column in the block |
Example:
#include <Eigen/Core> #include <iostream> using namespace Eigen; using namespace std; int main(void) { int const N = 5; MatrixXi A(N,N); A.setRandom(); cout << "A =\n" << A << '\n' << endl; cout << "A(:,1..3) =\n" << A.middleCols<3>(1) << endl; return 0; }
Output:
This is the const version of middleCols<int>().
Definition at line 518 of file BlockMethods.h.
ConstRowsBlockXpr middleRows | ( | Index | startRow, |
Index | numRows | ||
) | [inline] |
startRow | the index of the first row in the block |
numRows | the number of rows in the block |
Example:
#include <Eigen/Core> #include <iostream> using namespace Eigen; using namespace std; int main(void) { int const N = 5; MatrixXi A(N,N); A.setRandom(); cout << "A =\n" << A << '\n' << endl; cout << "A(2..3,:) =\n" << A.middleRows(2,2) << endl; return 0; }
Output:
This is the const version of middleRows(Index,Index).
Definition at line 362 of file BlockMethods.h.
ConstNRowsBlockXpr< N >::Type middleRows | ( | Index | startRow | ) | [inline] |
N | the number of rows in the block |
startRow | the index of the first row in the block |
Example:
#include <Eigen/Core> #include <iostream> using namespace Eigen; using namespace std; int main(void) { int const N = 5; MatrixXi A(N,N); A.setRandom(); cout << "A =\n" << A << '\n' << endl; cout << "A(1..3,:) =\n" << A.middleRows<3>(1) << endl; return 0; }
Output:
This is the const version of middleRows<int>().
Definition at line 384 of file BlockMethods.h.
ConstColsBlockXpr rightCols | ( | Index | n | ) | [inline] |
n | the number of columns in the block |
Example:
Array44i a = Array44i::Random(); cout << "Here is the array a:" << endl << a << endl; cout << "Here is a.rightCols(2):" << endl; cout << a.rightCols(2) << endl; a.rightCols(2).setZero(); cout << "Now the array a is:" << endl << a << endl;
Output:
This is the const version of rightCols(Index).
Definition at line 451 of file BlockMethods.h.
ConstNColsBlockXpr< N >::Type rightCols | ( | ) | [inline] |
N | the number of columns in the block |
Example:
Array44i a = Array44i::Random(); cout << "Here is the array a:" << endl << a << endl; cout << "Here is a.rightCols<2>():" << endl; cout << a.rightCols<2>() << endl; a.rightCols<2>().setZero(); cout << "Now the array a is:" << endl << a << endl;
Output:
This is the const version of rightCols<int>().
Definition at line 472 of file BlockMethods.h.
ConstRowXpr row | ( | Index | i | ) | [inline] |
const Block< const Derived > topLeftCorner | ( | Index | cRows, |
Index | cCols | ||
) | [inline] |
cRows | the number of rows in the corner |
cCols | the number of columns in the corner |
Example:
Matrix4i m = Matrix4i::Random(); cout << "Here is the matrix m:" << endl << m << endl; cout << "Here is m.topLeftCorner(2, 2):" << endl; cout << m.topLeftCorner(2, 2) << endl; m.topLeftCorner(2, 2).setZero(); cout << "Now the matrix m is:" << endl << m << endl;
Output:
This is the const version of topLeftCorner(Index, Index).
Definition at line 139 of file BlockMethods.h.
const Block< const Derived, CRows, CCols > topLeftCorner | ( | ) | [inline] |
The template parameters CRows and CCols are the number of rows and columns in the corner.
Example:
Matrix4i m = Matrix4i::Random(); cout << "Here is the matrix m:" << endl << m << endl; cout << "Here is m.topLeftCorner<2,2>():" << endl; cout << m.topLeftCorner<2,2>() << endl; m.topLeftCorner<2,2>().setZero(); cout << "Now the matrix m is:" << endl << m << endl;
Output:
This is the const version of topLeftCorner<int, int>().
Definition at line 160 of file BlockMethods.h.
const Block< const Derived > topRightCorner | ( | Index | cRows, |
Index | cCols | ||
) | [inline] |
cRows | the number of rows in the corner |
cCols | the number of columns in the corner |
Example:
Matrix4i m = Matrix4i::Random(); cout << "Here is the matrix m:" << endl << m << endl; cout << "Here is m.topRightCorner(2, 2):" << endl; cout << m.topRightCorner(2, 2) << endl; m.topRightCorner(2, 2).setZero(); cout << "Now the matrix m is:" << endl << m << endl;
Output:
This is the const version of topRightCorner(Index, Index).
Definition at line 93 of file BlockMethods.h.
const Block< const Derived, CRows, CCols > topRightCorner | ( | ) | [inline] |
The template parameters CRows and CCols are the number of rows and columns in the corner.
Example:
Matrix4i m = Matrix4i::Random(); cout << "Here is the matrix m:" << endl << m << endl; cout << "Here is m.topRightCorner<2,2>():" << endl; cout << m.topRightCorner<2,2>() << endl; m.topRightCorner<2,2>().setZero(); cout << "Now the matrix m is:" << endl << m << endl;
Output:
This is the const version of topRightCorner<int, int>().
Definition at line 114 of file BlockMethods.h.
ConstRowsBlockXpr topRows | ( | Index | n | ) | [inline] |
n | the number of rows in the block |
Example:
Array44i a = Array44i::Random(); cout << "Here is the array a:" << endl << a << endl; cout << "Here is a.topRows(2):" << endl; cout << a.topRows(2) << endl; a.topRows(2).setZero(); cout << "Now the array a is:" << endl << a << endl;
Output:
This is the const version of topRows(Index).
Definition at line 273 of file BlockMethods.h.
ConstNRowsBlockXpr< N >::Type topRows | ( | ) | [inline] |
N | the number of rows in the block |
Example:
Array44i a = Array44i::Random(); cout << "Here is the array a:" << endl << a << endl; cout << "Here is a.topRows<2>():" << endl; cout << a.topRows<2>() << endl; a.topRows<2>().setZero(); cout << "Now the array a is:" << endl << a << endl;
Output:
This is the const version of topRows<int>().
Definition at line 294 of file BlockMethods.h.