You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
410 B
19 lines
410 B
#include <Eigen/Dense>
|
|
#include <iostream>
|
|
|
|
using namespace Eigen;
|
|
using namespace std;
|
|
|
|
int main()
|
|
{
|
|
ArrayXf a = ArrayXf::Random(5);
|
|
a *= 2;
|
|
cout << "a =" << endl
|
|
<< a << endl;
|
|
cout << "a.abs() =" << endl
|
|
<< a.abs() << endl;
|
|
cout << "a.abs().sqrt() =" << endl
|
|
<< a.abs().sqrt() << endl;
|
|
cout << "a.min(a.abs().sqrt()) =" << endl
|
|
<< a.min(a.abs().sqrt()) << endl;
|
|
}
|
|
|