Simplify CwiseNullaryOp example.

This commit is contained in:
Gael Guennebaud
2016-08-31 15:46:04 +02:00
parent 218c37beb4
commit 7ae819123c
2 changed files with 2 additions and 6 deletions

View File

@@ -7,7 +7,7 @@ using namespace Eigen;
int main() {
std::default_random_engine generator;
std::poisson_distribution<int> distribution(4.1);
auto poisson = [&] (Eigen::Index) {return distribution(generator);};
auto poisson = [&] () {return distribution(generator);};
RowVectorXi v = RowVectorXi::NullaryExpr(10, poisson );
std::cout << v << "\n";