ADD: added other eigen lib
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
#include <Eigen/Core>
|
||||
#include <iostream>
|
||||
using namespace Eigen;
|
||||
using namespace std;
|
||||
|
||||
// define a custom template unary functor
|
||||
template<typename Scalar>
|
||||
@@ -13,7 +11,7 @@ struct CwiseClampOp {
|
||||
|
||||
int main(int, char**)
|
||||
{
|
||||
Matrix4d m1 = Matrix4d::Random();
|
||||
cout << m1 << endl << "becomes: " << endl << m1.unaryExpr(CwiseClampOp<double>(-0.5,0.5)) << endl;
|
||||
Eigen::Matrix4d m1 = Eigen::Matrix4d::Random();
|
||||
std::cout << m1 << std::endl << "becomes: " << std::endl << m1.unaryExpr(CwiseClampOp<double>(-0.5,0.5)) << std::endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user