eigen/doc/snippets/DenseBase_setLinSpaced.cpp
Hauke Heibel 4365a48748 Added an ei_linspaced_op to create linearly spaced vectors.
Added setLinSpaced/LinSpaced functionality to DenseBase.
Improved vectorized assignment - overcomes MSVC optimization issues.
CwiseNullaryOp is now requiring functors to offer 1D and 2D operators.
Adapted existing functors to the new CwiseNullaryOp requirements.
Added ei_plset to create packages as [a, a+1, ..., a+size].
Added more nullaray unit tests.
2010-01-26 19:42:17 +01:00

4 lines
72 B
C++

VectorXf v;
v.setLinSpaced(0.5f,1.5f,5).transpose();
cout << v << endl;