mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-12 19:20:36 +08:00
Complete doc with MatrixXNt and MatrixNXt
This commit is contained in:
parent
cb5ca1c901
commit
fbc62f7df9
@ -277,6 +277,8 @@ Matrix<typename Scalar,
|
||||
|
||||
Eigen defines the following Matrix typedefs:
|
||||
\li \c MatrixNt for `Matrix<type, N, N>`. For example, \c MatrixXi for `Matrix<int, Dynamic, Dynamic>`.
|
||||
\li \c MatrixXNt for `Matrix<type, Dynamic, N>`. For example, \c MatrixX3i for `Matrix<int, Dynamic, 3>`.
|
||||
\li \c MatrixNXt for `Matrix<type, N, Dynamic>`. For example, \c Matrix4Xd for `Matrix<d, 4, Dynamic>`.
|
||||
\li \c VectorNt for `Matrix<type, N, 1>`. For example, \c Vector2f for `Matrix<float, 2, 1>`.
|
||||
\li \c RowVectorNt for `Matrix<type, 1, N>`. For example, \c RowVector3d for `Matrix<double, 1, 3>`.
|
||||
|
||||
|
@ -3,10 +3,10 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
MatrixXf A = MatrixXf::Random(3, 2);
|
||||
cout << "Here is the matrix A:\n" << A << endl;
|
||||
VectorXf b = VectorXf::Random(3);
|
||||
cout << "Here is the right hand side b:\n" << b << endl;
|
||||
cout << "The least-squares solution is:\n"
|
||||
<< A.template bdcSvd<ComputeThinU | ComputeThinV>().solve(b) << endl;
|
||||
Eigen::MatrixXf A = Eigen::MatrixXf::Random(3, 2);
|
||||
std::cout << "Here is the matrix A:\n" << A << std::endl;
|
||||
Eigen::VectorXf b = Eigen::VectorXf::Random(3);
|
||||
std::cout << "Here is the right hand side b:\n" << b << std::endl;
|
||||
std::cout << "The least-squares solution is:\n"
|
||||
<< A.template bdcSvd<Eigen::ComputeThinU | Eigen::ComputeThinV>().solve(b) << std::endl;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user