mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-03 06:50:57 +08:00
Documentation fixes. Thanks to Rodney Sparapani for reporting these.
This commit is contained in:
parent
a1b405c92e
commit
5eefca637e
@ -43,8 +43,8 @@ x.head(n) // x(1:n)
|
||||
x.head<n>() // x(1:n)
|
||||
x.tail(n) // N = rows(x); x(N - n: N)
|
||||
x.tail<n>() // N = rows(x); x(N - n: N)
|
||||
x.segment(i, n) // x(i+1 : i+n)
|
||||
x.segment<n>(i) // x(i+1 : i+n)
|
||||
x.segment(i, n) // x(i+1 : i+n+1)
|
||||
x.segment<n>(i) // x(i+1 : i+n+1)
|
||||
P.block(i, j, rows, cols) // P(i+1 : i+rows, j+1 : j+cols)
|
||||
P.block<rows, cols>(i, j) // P(i+1 : i+rows, j+1 : j+cols)
|
||||
P.topLeftCorner(rows, cols) // P(1:rows, 1:cols)
|
||||
|
@ -6,10 +6,10 @@ using namespace std;
|
||||
|
||||
int main()
|
||||
{
|
||||
MatrixXf m = MatrixXf::Random(3,3);
|
||||
m = (m + MatrixXf::Constant(3,3,1.2)) * 50;
|
||||
MatrixXd m = MatrixXd::Random(3,3);
|
||||
m = (m + MatrixXd::Constant(3,3,1.2)) * 50;
|
||||
cout << "m =" << endl << m << endl;
|
||||
VectorXf v(3);
|
||||
VectorXd v(3);
|
||||
v << 1, 2, 3;
|
||||
cout << "m * v =" << endl << m * v << endl;
|
||||
}
|
||||
|
@ -6,10 +6,10 @@ using namespace std;
|
||||
|
||||
int main()
|
||||
{
|
||||
Matrix3f m = Matrix3f::Random();
|
||||
m = (m + Matrix3f::Constant(1.2)) * 50;
|
||||
Matrix3d m = Matrix3d::Random();
|
||||
m = (m + Matrix3d::Constant(1.2)) * 50;
|
||||
cout << "m =" << endl << m << endl;
|
||||
Vector3f v(1,2,3);
|
||||
Vector3d v(1,2,3);
|
||||
|
||||
cout << "m * v =" << endl << m * v << endl;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user