mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
documentation update for alpha 3
This commit is contained in:
5
doc/snippets/MatrixBase_block_int_int.cpp
Normal file
5
doc/snippets/MatrixBase_block_int_int.cpp
Normal file
@@ -0,0 +1,5 @@
|
||||
RowVector4i v = RowVector4i::random();
|
||||
cout << "Here is the vector v:" << endl << v << endl;
|
||||
cout << "Here is v.block(1, 2):" << endl << v.block(1, 2) << endl;
|
||||
v.block(1, 2).setZero();
|
||||
cout << "Now the vector v is:" << endl << v << endl;
|
||||
@@ -1,5 +1,5 @@
|
||||
Matrix3d m = Vector3d(1,2,3).asDiagonal();
|
||||
Matrix4i m = Matrix4i::random();
|
||||
cout << "Here is the matrix m:" << endl << m << endl;
|
||||
cout << "Here is m.block(1, 1, 2, 1):" << endl << m.block(1, 1, 2, 1) << endl;
|
||||
m.block(1, 0, 2, 1) = m.block(1, 1, 2, 1);
|
||||
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;
|
||||
|
||||
6
doc/snippets/MatrixBase_corner_enum_int_int.cpp
Normal file
6
doc/snippets/MatrixBase_corner_enum_int_int.cpp
Normal file
@@ -0,0 +1,6 @@
|
||||
Matrix4i m = Matrix4i::random();
|
||||
cout << "Here is the matrix m:" << endl << m << endl;
|
||||
cout << "Here is the bottom-right 2x3 corner in m:" << endl
|
||||
<< m.corner(Eigen::BottomRight, 2, 3) << endl;
|
||||
m.corner(Eigen::BottomRight, 2, 3).setZero();
|
||||
cout << "Now the matrix m is:" << endl << m << endl;
|
||||
5
doc/snippets/MatrixBase_end_int.cpp
Normal file
5
doc/snippets/MatrixBase_end_int.cpp
Normal file
@@ -0,0 +1,5 @@
|
||||
RowVector4i v = RowVector4i::random();
|
||||
cout << "Here is the vector v:" << endl << v << endl;
|
||||
cout << "Here is v.end(2):" << endl << v.end(2) << endl;
|
||||
v.end(2).setZero();
|
||||
cout << "Now the vector v is:" << endl << v << endl;
|
||||
5
doc/snippets/MatrixBase_start_int.cpp
Normal file
5
doc/snippets/MatrixBase_start_int.cpp
Normal file
@@ -0,0 +1,5 @@
|
||||
RowVector4i v = RowVector4i::random();
|
||||
cout << "Here is the vector v:" << endl << v << endl;
|
||||
cout << "Here is v.start(2):" << endl << v.start(2) << endl;
|
||||
v.start(2).setZero();
|
||||
cout << "Now the vector v is:" << endl << v << endl;
|
||||
Reference in New Issue
Block a user